> 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.md).

# Create a Signature Routine

A Signature Routine sends the same document to multiple signers.

Create it from a template or from an uploaded file.

Each signer must have their own field assignment. Use `ClientId` and `SignatureRoutineSignerNumber` on every signer field.

```http
POST /api/v2/GroupTasks/CreateTask
```

### Before you start

For field placement and the routine-specific field model, see [Defining Signature Fields (Signature routine)](/2sign.co.il-docs/signature-routine-tasks/defining-signature-fields-signature-routine.md).

### Signing order

* **Sequential** — `SignatureRoutineAsync: false` sends the document to one signer at a time
* **Parallel** — `SignatureRoutineAsync: true` sends the document to all signers at once

In sequential mode, signer `1` signs first, then signer `2`, and so on.

### Choose your approach

|                     | From Template                            | From File Upload                      |
| ------------------- | ---------------------------------------- | ------------------------------------- |
| **Use when**        | The document layout stays the same       | The document changes between requests |
| **Requires upload** | No                                       | Yes                                   |
| **Field placement** | Reuse template fields or send field data | Send field data in the request        |
| **Key parameters**  | `TemplateId`                             | `TaskGuid` and `PdfGuid`              |

### Request parameters

| Parameter               | Type   | Required      | Use                                                             |
| ----------------------- | ------ | ------------- | --------------------------------------------------------------- |
| `GroupId`               | int    | No            | Saved signer group for this routine                             |
| `TemplateId`            | int    | Template flow | Template to use when the document already exists in the system  |
| `TaskGuid`              | string | Upload flow   | File upload task GUID                                           |
| `PdfGuid`               | string | Upload flow   | Uploaded PDF GUID                                               |
| `TaskSubject`           | string | Yes           | Subject shown on the task                                       |
| `EmailText`             | string | No            | Email body sent to signers                                      |
| `IsSendOnCreation`      | bool   | No            | Send the task immediately after creation                        |
| `SignatureRoutine`      | bool   | Yes           | Must be `true`                                                  |
| `SignatureRoutineAsync` | bool   | Yes           | `false` for sequential, `true` for parallel                     |
| `Language`              | int    | No            | Signing language. `1` = Hebrew                                  |
| `LanguageMarked`        | string | No            | Language code used with the selected language, for example `he` |
| `ForceIdUpload`         | bool   | No            | Require an ID photo from each signer                            |
| `ForceVideoUpload`      | bool   | No            | Require video verification                                      |
| `ForceSecretCode`       | bool   | No            | Require a secret code step                                      |

### Option A - create from template

Use this when the document and its fields already exist on a template.

**Request body**

```json
{
  "TemplateId": 1612,
  "GroupId": 30928,
  "TaskSubject": "Board approval package",
  "EmailText": "Please review and sign.",
  "IsSendOnCreation": true,
  "SignatureRoutine": true,
  "SignatureRoutineAsync": false,
  "Language": 1,
  "LanguageMarked": "he"
}
```

### Option B - create from file upload

Use this when you upload a new PDF for each routine.

{% stepper %}
{% step %}

### Upload the file

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

Use [Upload File](broken://spaces/KXFXhom4D3A6rriBMg07/pages/AGDQWYA7W54yk7H2WRsI) and save the returned `TaskGuid` and `PdfGuid`.
{% endstep %}

{% step %}

### Create the routine

**Request body**

```json
{
  "TaskSubject": "Board approval package",
  "GroupId": 30928,
  "IsSendOnCreation": true,
  "SignatureRoutine": true,
  "SignatureRoutineAsync": false,
  "EmailText": "Please review and sign.",
  "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
    }
  ]
}
```

{% endstep %}
{% endstepper %}

### Field mapping rules

For each signer field:

* `ClientId` or  `ClientEmails` / `ClientPhones`+ `ClientName`
* `SignatureRoutineSignerNumber` sets the signer order
* `IsSignatureRoutine` must be `true`

If signer order matters, make sure the signer number and the intended recipient match.

## POST /api/v2/GroupTasks/CreateTask

> CreateTask

```json
{"openapi":"3.1.1","info":{"title":"Customer API","version":"1.0.0"},"servers":[{"url":"/"}],"paths":{"/api/v2/GroupTasks/CreateTask":{"post":{"tags":["GroupTasksNew"],"summary":"CreateTask","operationId":"CreateTask_POST","responses":{"200":{"description":"Success (Custom Example)","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskDetailsRequestModel"}}},"required":true}}}},"components":{"schemas":{"TaskDetailsRequestModel":{"type":"object","properties":{"Token":{"type":"string"},"Email":{"type":"string"},"ClientsForRoutine":{"type":"string"},"ClientId":{"type":"integer"},"TemplateId":{"type":"integer"},"TemplateIdsList":{"type":"string"},"ClientName":{"type":"string"},"ClientPhones":{"type":"string"},"ClientEmails":{"type":"string"},"TaskSubject":{"type":"string"},"EmailText":{"type":"string"},"EmailSubject":{"type":"string"},"Language":{"type":"integer"},"LanguageMarked":{"type":"string"},"IsSendOnCreation":{"type":"boolean"},"IsSendSmsOnCreation":{"type":"boolean"},"IsSendEmailOnCreation":{"type":"boolean"},"IsSendWhatsAppOnCreation":{"type":"boolean"},"ApplyStamp":{"type":"boolean"},"IsTaxAuthorityProcTask":{"type":"boolean"},"SecretCode":{"type":"string"},"ForceSecretCode":{"type":"boolean"},"ForceVideoUpload":{"type":"boolean"},"VideoUploadText":{"type":"string"},"ForceIdIssueDateUpload":{"type":"boolean"},"ForceIdUpload":{"type":"boolean"},"TaskStatus":{"type":"boolean"},"TaskStatusNumeric":{"type":"integer"},"DeclineReason":{"type":"string"},"DeclineOn":{"type":"string"},"TaskGuid":{"type":"string"},"PdfGuid":{"type":"string"},"ImageGuid":{"type":"string"},"RoutinePrimaryTaskGuid":{"type":"string"},"IsPreviousSignedTaskGuid":{"type":"boolean"},"FreeTextInput":{"type":"string"},"SendConfirmEmailAfterSign":{"type":"boolean"},"IsSigned":{"type":"boolean"},"CreatedOn":{"type":"string"},"ViewedOn":{"type":"string"},"SignedOn":{"type":"string"},"IpSender":{"type":"string"},"IpSigner":{"type":"string"},"TaskStatusPriority":{"type":"integer"},"RoutineLastTaskGuidSigned":{"type":"string"},"RoutineStatus":{"type":"integer"},"DeleteSucceeded":{"type":"boolean"},"SignaturePositions":{"type":"string"},"SignaturePositionsSlimModel":{"type":"string"},"SignaturesConstValues":{"type":"string"},"SignaturePositionsStr":{"type":"string"},"SignaturePositionsSignedDocJSON":{"type":"string"},"FileUploadBase64":{"type":"string"},"SignatureBase64":{"type":"string"},"TaskThankYouUrl":{"type":"string"},"DigitalSign":{"type":"boolean"},"ApplyExtraFilesUpload":{"type":"boolean"},"ExtraFilesUploadText":{"type":"string"},"ApplyExtraFilesUploadNumberOfFiles":{"type":"integer"},"TaxYear":{"type":"integer"},"APIResponse":{"type":"string"},"DeletionPrivateOuterKey":{"type":"string"},"DeletionUserId":{"type":"string"},"DeletionDateFrom":{"type":"string"},"DeletionDateTo":{"type":"string"},"TaskBundleGuid":{"type":"string"},"AllowStampAddByClient":{"type":"boolean"},"TaskClientVideoFile":{"type":"string"},"SearchWordForMarkingSignature":{"type":"string"},"SearchWordForMarkingFieldsJson":{"type":"string"},"NotifySecondaryMails":{"type":"boolean"},"SecondaryMails":{"type":"string"},"Invoice4uDocId":{"type":"string"},"TasksCount":{"type":"integer"},"TasksQuotaLeft":{"type":"integer"},"SmsQuotaLeft":{"type":"integer"},"SmsCount":{"type":"integer"},"SmsLogAfterSignDate":{"type":"string"},"IsAutoFlatDocument":{"type":"boolean"},"ObligateClientStampUpload":{"type":"boolean"},"SignatureRoutine":{"type":"boolean"},"GroupId":{"type":"integer"},"SignatureRoutineAsync":{"type":"boolean"},"SignatureRoutineMaxSigners":{"type":"integer"},"SelectedGroupTotalPhonesCount":{"type":"integer"},"ClientIds":{"type":"string"},"TaskClients":{"type":"string"},"OriginalTaskLinkBlob":{"type":"string"},"SignedTaskLinkBlob":{"type":"string"},"IdCardAttachmentLinkBlob":{"type":"string"},"GeneralAttachmentsLinkBlob":{"type":"string"},"ExcelAttachmentsLinkBlob":{"type":"string"},"SmsTemplate":{"type":"string"},"ViewOnlyTask":{"type":"boolean"},"FilterDateFrom":{"type":"string"},"FilterDateTo":{"type":"string"},"FilterTaskStatus":{"type":"integer"},"SignedTaskFile":{"type":"string"},"SignedTaskBase64File":{"type":"string"},"SearchWordForSignatureRoutine":{"type":"string"},"OriginalBlobFile":{"type":"string"},"OriginalBase64File":{"type":"string"},"IdCardAttachmentBlobFile":{"type":"string"},"IdCardAttachmentBase64File":{"type":"string"},"GeneralAttachmentsBlobFile":{"type":"string"},"GeneralAttachmentsBase64File":{"type":"string"},"ExcelAttachmentsBlobFile":{"type":"string"},"ExcelAttachmentsBase64File":{"type":"string"},"AdditionalUserParams":{"type":"string"},"AdditionalUserParamsObject":{"type":"string"},"FileAttachmentLocations":{"type":"string"},"FilesDataForRoutineCheck":{"type":"string"},"FilesPartialAmountForRoutineCheck":{"type":"integer"},"FilesPartialAmountLocationForRoutineCheck":{"type":"integer"},"ShowSigBeforePlacing":{"type":"boolean"},"DeletedFilesCounter":{"type":"integer"},"DeletedFileFullName":{"type":"string"},"ApplyOTP":{"type":"boolean"},"SkipFlatOrRotate":{"type":"boolean"},"TaskClientStatus":{"type":"integer"},"ClickToRedirectToSignatureButtonText":{"type":"string"},"DocumentSignedSuccessfullyText":{"type":"string"},"EmailButton":{"type":"string"},"EmailUserGuide":{"type":"string"}},"required":["TemplateId","Language","ApplyStamp","IsTaxAuthorityProcTask","TaskStatus","IsPreviousSignedTaskGuid","SendConfirmEmailAfterSign","IsSigned","DeleteSucceeded","DigitalSign","ApplyExtraFilesUpload","AllowStampAddByClient","NotifySecondaryMails","IsAutoFlatDocument","SignatureRoutine","SignatureRoutineAsync","ViewOnlyTask","FilesPartialAmountForRoutineCheck","FilesPartialAmountLocationForRoutineCheck","DeletedFilesCounter","SkipFlatOrRotate"]}}}}
```


---

# 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.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.
