[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-sign-b2e\u002Fsend-template":3,"docs-tabs-sign-b2e\u002Fsend-template":6},{"content":4,"lastmod":5},"# Send a document from a template\n\n> Available starting with the **sign 26.1300.0** module. On older self-hosted installations the method may be unavailable: the platform returns `422 METHOD_NOT_YET_AVAILABLE` with `error.release`.\n\n`POST \u002Fv1\u002Fsign-b2e\u002Ftemplates\u002Fsend`\n\nCreates a document from an available template and sends it to an employee. Requires permission to add, read and edit documents, and access to the template. Sending has legal consequences.\n\n**Scopes:** `sign.b2e`, `crm`.\n\n## Request body fields\n\n| Parameter | Type | Required | Description |\n|---|---|---|---|\n| `templateUid` | string | yes | Template ID from the [list of templates](.\u002Flist-templates.md). |\n| `signerUserId` | integer \\| string | yes | ID of an active employee or candidate from the [list of users](\u002Fdocs\u002Fentities\u002Fusers). |\n| `responsibleUserId` | integer \\| string \\| null | no | ID of an active responsible person from the [list of users](\u002Fdocs\u002Fentities\u002Fusers). Defaults to the key owner; null is allowed. |\n| `externalSettings` | object \\| null | no | External system settings; null is allowed when sending from a template. |\n| `externalSettings.externalId` | string | no | Document ID in the external system, up to 255 characters. |\n| `externalSettings.externalDateCreate` | string | no | Creation date in the external system in ISO 8601 format. Sending from a template requires ATOM format with a numeric time zone offset. |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsign-b2e\u002Ftemplates\u002Fsend' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"templateUid\": \"DUMMY_TEMPLATE_UID\", \"signerUserId\": 7}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsign-b2e\u002Ftemplates\u002Fsend' \\\n  -H 'X-Api-Key: YOUR_APP_KEY' \\\n  -H 'Authorization: Bearer USER_SESSION_TOKEN' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"templateUid\": \"DUMMY_TEMPLATE_UID\", \"signerUserId\": 7}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsign-b2e\u002Ftemplates\u002Fsend', {\n  \"method\": \"POST\",\n  \"headers\": {\n    \"X-Api-Key\": \"YOUR_API_KEY\",\n    \"Content-Type\": \"application\u002Fjson\"\n  },\n  body: JSON.stringify({\"templateUid\": \"DUMMY_TEMPLATE_UID\", \"signerUserId\": 7})\n});\nconst result = await response.json();\nif (!response.ok || !result.success) throw new Error(result.error?.message);\nconsole.log(result.data);\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fsign-b2e\u002Ftemplates\u002Fsend', {\n  \"method\": \"POST\",\n  \"headers\": {\n    \"X-Api-Key\": \"YOUR_APP_KEY\",\n    \"Authorization\": \"Bearer USER_SESSION_TOKEN\",\n    \"Content-Type\": \"application\u002Fjson\"\n  },\n  body: JSON.stringify({\"templateUid\": \"DUMMY_TEMPLATE_UID\", \"signerUserId\": 7})\n});\nconst result = await response.json();\nif (!response.ok || !result.success) throw new Error(result.error?.message);\nconsole.log(result.data);\n```\n\n## Response fields\n\n| Field | Type | Description |\n|---|---|---|\n| `success` | boolean | Whether the request succeeded. |\n| `data` | object | Operation data. |\n| `data.uid` | string | Document UID. |\n| `data.state` | object | Object state. |\n| `data.state.code` | string | Machine-readable code. |\n| `data.state.name` | string | Localized signing state name. |\n| `data.members` | array | Document members. |\n| `data.members[].uid` | string | Signing member UID. |\n| `data.members[].role` | string | Member role. |\n| `data.members[].state` | object | Object state. |\n| `data.members[].state.code` | string | Machine-readable code. |\n| `data.members[].state.name` | string | Localized signing state name. |\n| `data.members[].user` | object | The member's user. |\n| `data.members[].party` | integer | The member's signing party number. |\n| `data.members[].user.employeeCode` | string \\| null | HCM Link employee code; null for a regular user. |\n| `data.members[].user.employeeId` | integer \\| null | Numeric HCM Link employee ID; null for a regular user. |\n| `data.members[].user.userId` | integer \\| null | User ID. |\n| `meta.redacted` | array\u003Cstring> | Present when credentials are hidden; contains the paths of the replaced values. |\n\n## Response example\n\nShape of a successful response; the data depends on the Bitrix24 account and the request.\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"uid\": \"DUMMY_DOCUMENT_UID\",\n    \"state\": {\n      \"code\": \"ready\",\n      \"name\": \"Ready\"\n    },\n    \"members\": []\n  }\n}\n```\n\n## Error response example\n\n403 — the key lacks a required scope:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"SCOPE_DENIED\",\n    \"message\": \"This endpoint requires 'sign.b2e' scope\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Reason |\n|---|---|---|\n| 400 | `INVALID_PARAMS` | Invalid request shape: types, required fields or an unknown query string parameter. |\n| 401 | `TOKEN_MISSING` | No credentials for the Bitrix24 connection. |\n| 403 | `SCOPE_DENIED` | One of the required scopes is not granted. |\n| 422 | `BITRIX_ERROR` | Bitrix24 rejected the operation; the code is in error.b24Code, the text in error.message. |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only. |\n| 422 | `METHOD_NOT_YET_AVAILABLE` | The method is not yet available on the Bitrix24 account; the release is in error.release. |\n\n[Common API errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\nBitrix24 checks user permissions, HR e-signature availability, business rules, page sizes and field contents. Values are passed through without local correction. Response text is JSON-encoded; credential-bearing links are hidden.\n\nThe operation is not retried automatically. If the outcome is unknown, check the state in the Bitrix24 account first; resending can create another document.\n\nThe Idempotency-Key header is passed to Bitrix24 without generating a new value. It does not enable automatic retries. externalSettings.externalDateCreate requires strict ATOM format with a numeric time zone offset.\n\n## See also\n\n- [Employee signatures](\u002Fdocs\u002Fsign-b2e)\n- [API errors](\u002Fdocs\u002Ferrors)\n","2026-11-18",{},1795344085370]