[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-chats\u002Fservice\u002Ftask-form":3,"docs-tabs-chats\u002Fservice\u002Ftask-form":6},{"content":4,"lastmod":5},"## Task form\n\n`GET \u002Fv1\u002Fchats\u002F:dialogId\u002Ftask-form`\n\nPrepares the data for the form that creates a task from a chat, but does not create the task itself: the user fills in and saves the form in Bitrix24.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|----------|\n| `dialogId` (path) | string | yes | Dialog ID: `chat123` for a group chat, a user ID for a private chat, `me` for the chat with yourself. `chat123` is the `id` field of a [recent dialogs](\u002Fdocs\u002Fchats\u002Fdiscovery\u002Frecent) row, a user ID comes from the [user list](\u002Fdocs\u002Fentities\u002Fusers\u002Flist) |\n\nThere are no query parameters. `messageId` in the query is rejected with `400` — the form for a message is described on the [Task form for a message](\u002Fdocs\u002Fchats\u002Fservice\u002Ftask-form-message) page.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42\u002Ftask-form\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42\u002Ftask-form\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42\u002Ftask-form', {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst { data } = await res.json()\nconsole.log('Form:', data.link, 'assignee:', data.params.responsibleId)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fchats\u002Fchat42\u002Ftask-form', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { data } = await res.json()\nconsole.log('Form:', data.link)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | Always `true` on success |\n| `data` | object | Form data |\n| `data.link` | string | Relative link to the task creation form in Bitrix24: to open the form, prepend your Bitrix24 address to it |\n| `data.params` | object | Form fields. Their set depends on the chat — see the paragraph after the table |\n| `data.params.responsibleId` | number | Assignee — the calling user |\n| `data.params.imChatId` | number | Chat ID |\n| `data.params.auditors` | string | Observers — comma-separated IDs of the chat members except the caller, no more than 50. A group or project chat has no observers |\n| `data.params.groupId` | number \\| null | Group or project ID — for a group or project chat |\n| `data.params.isTasksV2` | boolean | `true` — the new version of tasks is enabled in Bitrix24. The response then includes the fields below |\n| `data.params.entityId` | number | Chat ID |\n| `data.params.subEntityId` | null | Message ID. Always `null` in the form for a chat |\n| `data.params.taSec`, `data.params.taEl` | string | Source labels for Bitrix24 analytics |\n| `data.params.description` | null | Task description. Always `null` in the form for a chat |\n\nThe contents of `params` depend on the chat and the Bitrix24 settings: Open Channels chats carry a CRM binding, and with the previous version of tasks the `isTasksV2` field and the fields below it are absent.\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"link\": \"\u002Fcompany\u002Fpersonal\u002Fuser\u002F1\u002Ftasks\u002Ftask\u002Fedit\u002F0\u002F?ta_sec=chat&ta_el=chat_context_menu\",\n    \"params\": {\n      \"responsibleId\": 1,\n      \"imChatId\": 42,\n      \"auditors\": \"4\",\n      \"isTasksV2\": true,\n      \"entityId\": 42,\n      \"subEntityId\": null,\n      \"taSec\": \"chat\",\n      \"taEl\": \"chat_context_menu\",\n      \"description\": null,\n      \"groupId\": null\n    }\n  }\n}\n```\n\n## Error response example\n\n400 — `messageId` was passed:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"INVALID_PARAMS\",\n    \"message\": \"Query parameter `messageId` is not accepted by GET \u002Fv1\u002Fchats\u002F:dialogId\u002Ftask-form: the task form of a message is POST \u002Fv1\u002Fchats\u002Fmessages\u002F:messageId\u002Ftask-form.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 400 | `INVALID_PARAMS` | A query parameter was passed — the operation accepts none |\n| 401 | `TOKEN_MISSING` | The API key has no Bitrix24 tokens configured |\n| 403 | `SCOPE_DENIED` | The API key does not have the `im` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only: the call may make the key owner a chat member |\n| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned \"not found\". The Bitrix24 code is in `error.b24Code` |\n| 422 | `BITRIX_ERROR` | Bitrix24 returned an error. The Bitrix24 code is in `error.b24Code`. `TASK_ACCESS_ERROR` — no access to the chat, `TASKS_NOT_INSTALLED` — the tasks module is not installed |\n| 502 | `ME_ALIAS_RESOLUTION_FAILED` | Failed to resolve the current user for `me` |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 is unavailable or returned a server error |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [Task form for a message](\u002Fdocs\u002Fchats\u002Fservice\u002Ftask-form-message)\n- [Flow form](\u002Fdocs\u002Fchats\u002Fservice\u002Fflow-form)\n- [Messages around a message](\u002Fdocs\u002Fchats\u002Fmessages\u002Fcontext)\n- [Service methods](\u002Fdocs\u002Fchats\u002Fservice)\n","2026-10-07",{},1794739552335]