> 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/tasks/create-a-single-task.md).

# Create a single Task

A task is a document sent to one or more recipients for signing. Before creating a task, decide on two things: **where the document comes from**, and **who receives it**.

For defining fields and signature positions on the document, see [Defining Signature Fields](/2sign.co.il-docs/tasks/defining-signature-fields.md).

***

#### Choose Your Approach

| \*                      | From Template                                                          | From File Upload                                               |
| ----------------------- | ---------------------------------------------------------------------- | -------------------------------------------------------------- |
| **Use when**            | You have a fixed document set up in the 2Sign system                   | You have a different document each time                        |
| **Requires upload?**    | No                                                                     | Yes - upload first, then create                                |
| **signature positions** | You can use template signature positions or define them in the request | You must define them in the request if its not view only task. |
| **Key parameter**       | `TemplateId`                                                           | `TaskGuid` + `PdfGuid`                                         |

***

#### Option A  - From Template

```
POST /api/V2/TasksNew/CreateTask
```

json

```json
{
  "ClientId": "235183",
  "TemplateId": "4522",
  "TaskSubject": "document to sign",
  "EmailText": null,
  "IsSendOnCreation": "false",
  "IsSendEmailOnCreation": "true",
  "IsSendSmsOnCreation": "false"
}
```

{% hint style="info" %}
To find your `TemplateId`, use [Get Template by Token or Get Template by ID.](/2sign.co.il-docs/templates/get-tamplates-info.md)
{% endhint %}

#### TemplateIdsList (Merge Multiple Templates)

Use `TemplateIdsList` when you want to create a single signing task from multiple templates.

Pass a comma-separated string containing the Template IDs you would like to combine. The system will retrieve all templates in the specified order, merge them into a single PDF document, and create one signature task containing the combined document.

This is useful when a signer needs to review and sign several documents as part of the same workflow, while receiving only one task.

**Example**

```json
{
  "ClientId": "235183",
  "TemplateIdsList": "4522,4523,4524",
  "TaskSubject": "Documents to Sign",
  "IsSendOnCreation": true
}
```

In this example, templates `4522`, `4523`, and `4524` are merged into a single document and sent as one signing task.

***

#### Option B - From File Upload

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

**Step 1 — Upload the file**

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

For more info you can find it [here](/2sign.co.il-docs/tasks/upload-file.md).

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

**Step 2 - Create the task**

```
POST /api/V2/TasksNew/CreateTask
```

json

```json
{
  "ClientId": "235183",
  "TaskSubject": "document to sign",
  "IsSendOnCreation": "true",
  "TaskGuid": "<from upload response>",
  "PdfGuid": "<from upload response>"
}
```

{% hint style="info" %}
`TaskGuid` and `PdfGuid` must come from the **Upload File** response.
{% endhint %}

> 💡 **Tip** - `TaskGuid` and `PdfGuid` must both come from the same upload response. Don't reuse GUIDs from previous uploads.

***

#### Specifying the Recipient

All three options below can be used with either Option A or Option B above.

**Existing client - by `ClientId`**

json

```json
{
  "ClientId": "235183"
}
```

Use when the recipient already exists in your account. To look up a client's ID, see [Get clients and groups info](/2sign.co.il-docs/clients-and-groups/get-clients-info.md).

***

**New or one-time recipient - by phone or email**

json

```json
{
  "ClientPhones": "0501234567",
  "ClientEmails": "client@example.com"
}
```

No need to create a client record first. At least one of phone or email is required.

***

**Group - by `GroupId`**

json

```json
{
  "GroupId": "23440"
}
```

Use when sending to a predefined group of recipients. To set up a group, see [Create a Group](/2sign.co.il-docs/clients-and-groups/create-clients-and-groups.md).

***

#### Request Parameters

| Parameter                | Type   | Description                                        |
| ------------------------ | ------ | -------------------------------------------------- |
| `TaskSubject`            | string | Document subject line shown to the recipient       |
| `EmailText`              | string | Custom message body in the email                   |
| `Language`               | int    | `1` = Hebrew                                       |
| `IsSendOnCreation`       | bool   | Send immediately when task is created              |
| `IsSendEmailOnCreation`  | bool   | Send via email                                     |
| `IsSendSmsOnCreation`    | bool   | Send via SMS                                       |
| `ForceIdUpload`          | bool   | Require ID photo from signer                       |
| `ForceIdIssueDateUpload` | bool   | Require ID issue date from signer                  |
| `ForceVideoUpload`       | bool   | Require video verification                         |
| `ForceSecretCode`        | bool   | Require secret code                                |
| `SecretCode`             | string | The secret code value if `ForceSecretCode` is true |
| `ApplyStamp`             | bool   | Apply account stamp to document                    |
| `FreeTextInput`          | string | Free text attached to the task                     |

## POST /api/Tasks/CreateTask

> CreateTask

```json
{"openapi":"3.1.1","info":{"title":"Customer API","version":"1.0.0"},"servers":[{"url":"/"}],"paths":{"/api/Tasks/CreateTask":{"post":{"tags":["Tasks"],"summary":"CreateTask","operationId":"CreateTask_POST","responses":{"200":{"description":"Success (No content returned)"},"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/tasks/create-a-single-task.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.
