> For the complete documentation index, see [llms.txt](https://2sign-co-il.gitbook.io/2sign.co.il-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2sign-co-il.gitbook.io/2sign.co.il-docs/signature-routine-tasks/create-a-signature-routine-with-file.md).

# Create a Signature Routine  with file

Unlike a single task, each signer gets their own designated signature field, identified by their `ClientId` and `SignatureRoutineSignerNumber`.

**Signing Order**

**Sequential** (`SignatureRoutineAsync: false`) -The document is sent to signers one at a time. Each signer receives it only after the previous one has signed.

**Parallel** (`SignatureRoutineAsync: true`) - All signers receive the document at the same time and can sign independently.

> 📌 **Note** - A Group (`GroupId`) is currently required to create a Signature Routine. Support for sending without a predefined group is coming in a future update.

For defining fields and signature positions on the document, see Defining Signature Fields.

#### Choose Your Approach

| \*                   | From Template                                  | From File Upload                        |
| -------------------- | ---------------------------------------------- | --------------------------------------- |
| **Use when**         | You have a fixed document set up in the system | You have a different document each time |
| **Requires upload?** | No                                             | Yes - upload first, then create         |
| **Key parameter**    | `TemplateId`                                   | `TaskGuid` + `PdfGuid`                  |

#### Request Parameters

| Parameter               | Type   | Description                                |
| ----------------------- | ------ | ------------------------------------------ |
| `GroupId`               | int    | The group of signers                       |
| `TemplateId`            | int    | Template ID (Option A only)                |
| `TaskGuid` / `PdfGuid`  | string | From file upload (Option B only)           |
| `TaskSubject`           | string | Document subject line                      |
| `EmailText`             | string | Custom message body                        |
| `IsSendOnCreation`      | bool   | Send immediately when task is created      |
| `SignatureRoutine`      | bool   | Must be `true` for Signature Routine tasks |
| `SignatureRoutineAsync` | bool   | `false` = sequential, `true` = parallel    |
| `Language`              | int    | `1` = Hebrew                               |
| `ForceIdUpload`         | bool   | Require ID photo from each signer          |
| `ForceVideoUpload`      | bool   | Require video verification                 |
| `ForceSecretCode`       | bool   | Require secret code                        |

***

```json
Request Body
{
  "TemplateId": 1612,
  "GroupId": 30928,
  "TaskSubject": "Task Without File",
  "EmailText": "hi",
  "IsSendOnCreation": true,
  "SignatureRoutine": true,
  "SignatureRoutineAsync": false,
  "Language": 1,
  "LanguageMarked": "he"
}
```

***

**Step 1 - Upload the file**

Upload the file first, then use the `taskGuid` and `pdfGuid` from the response to create the task.

```
POST /api/V2/BaseTasks/UploadFileForTask
```

Save `taskGuid` and `pdfGuid` from the response.

**Step 2 - Create the task**

```json
{
  "TaskSubject": "Group Task With File",
  "GroupId": 30928,
  "IsSendOnCreation": true,
  "SignatureRoutine": true,
  "SignatureRoutineAsync": false,
  "EmailText": "hi",
  "TaskGuid": "<from upload response>",
  "PdfGuid": "<from upload response>",
  "SignaturePositions": [
    {
      "X": 20,
      "Y": 100,
      "Width": 30,
      "Height": 20,
      "Page": 1,
      "SignaturePositionTypeId": 1,
      "SignaturePositionStageTypeId": 0,
      "SignaturePositionFieldType": 0,
      "IsMultipleOptionsCheckbox": false,
      "PositionTextContent": null,
      "CheckBoxSelected": false,
      "ClientId": 49728,
      "SignatureRoutineSignerNumber": 1,
      "IsSignatureRoutine": true
    },
    {
      "X": 20,
      "Y": 140,
      "Width": 30,
      "Height": 20,
      "Page": 1,
      "SignaturePositionTypeId": 1,
      "SignaturePositionStageTypeId": 0,
      "SignaturePositionFieldType": 0,
      "IsMultipleOptionsCheckbox": false,
      "PositionTextContent": null,
      "CheckBoxSelected": false,
      "ClientId": 49729,
      "SignatureRoutineSignerNumber": 2,
      "IsSignatureRoutine": true
    }
  ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://2sign-co-il.gitbook.io/2sign.co.il-docs/signature-routine-tasks/create-a-signature-routine-with-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
