[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Ftasks\u002Fpause-timer":3,"docs-tabs-entities\u002Ftasks\u002Fpause-timer":6},{"content":4,"lastmod":5},"## Pause task timer\n\n`POST \u002Fv1\u002Ftasks\u002F:taskId\u002Fpause-timer`\n\nStops the time-tracking timer the key's user started on a task and records the worked time in the task's time tracking.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `taskId` (path) | number | yes | Task ID. List: [`GET \u002Fv1\u002Ftasks`](\u002Fdocs\u002Fentities\u002Ftasks\u002Flist) |\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|---------|\n| `params` | object | no | Additional action parameters. Passed to Bitrix24 unchanged |\n\nThe request body can be empty or `{}`. Any field other than `params` is rejected with `400 INVALID_PARAMS`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fpause-timer' \\\n  -H 'X-Api-Key: YOUR_API_KEY' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{}'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST 'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fpause-timer' \\\n  -H 'X-Api-Key: YOUR_APP_KEY' \\\n  -H 'Authorization: Bearer USER_SESSION_TOKEN' \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{}'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fpause-timer', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({}),\n})\nconst result = await response.json()\nconsole.log(result.data)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst response = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Ftasks\u002F289\u002Fpause-timer', {\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({}),\n})\nconst result = await response.json()\nconsole.log(result.data)\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on success |\n| `data` | object \\| null | `null` if time tracking is off for the task. The call changes nothing in that case |\n| `data.task` | object | The full task object when time tracking is on. Values arrive in raw form: numbers as strings (`\"id\": \"289\"`), flags as `Y` or `N` (`\"allowTimeTracking\": \"Y\"`). [`GET \u002Fv1\u002Ftasks\u002F:id`](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget) returns the same fields as numbers and `true`\u002F`false` |\n| `data.task.id` | string | Task ID |\n| `data.task.status` | string | Task status. Pausing the timer does not change it: the task stays at `3` — In Progress |\n| `data.task.allowTimeTracking` | string | Time tracking for the task: `Y` — on |\n| `data.task.action` | object | Which actions the key's user can take: the key is the action name (`start`, `pause`, `complete`, `defer`, `renew` and others), the value is `true` or `false` |\n\n## Response example\n\nTime tracking is on. Only the main fields of the task object are shown:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"task\": {\n      \"id\": \"289\",\n      \"title\": \"Prepare the quarterly report\",\n      \"status\": \"3\",\n      \"createdBy\": \"1\",\n      \"responsibleId\": \"1\",\n      \"allowTimeTracking\": \"Y\",\n      \"timeElapsed\": \"6\",\n      \"action\": {\n        \"start\": false,\n        \"pause\": true,\n        \"complete\": true,\n        \"defer\": false,\n        \"renew\": false\n      }\n    }\n  }\n}\n```\n\nTime tracking is off for the task:\n\n```json\n{\n  \"success\": true,\n  \"data\": null\n}\n```\n\n## Error response example\n\n422 — no timer is running on the task:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Cannot stop task timer\",\n    \"b24Code\": \"0\"\n  }\n}\n```\n\nThe `error.message` text comes from Bitrix24, so its wording and language depend on the Bitrix24 account language. Branch on `error.code`, not on the message text.\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `INVALID_PARAMS` | `taskId` is not a positive integer: `taskId must be a positive integer` |\n| 400 | `INVALID_PARAMS` | The request body is not a JSON object: `body must be an object` |\n| 400 | `INVALID_PARAMS` | The body contains fields other than `params`: `body contains unsupported fields` |\n| 400 | `INVALID_PARAMS` | `params` is not an object: `params must be an object` |\n| 401 | `MISSING_API_KEY` | `X-Api-Key` is missing |\n| 401 | `INVALID_API_KEY` | The key is not found |\n| 401 | `TOKEN_MISSING` | The key has no valid Bitrix24 token |\n| 403 | `SCOPE_DENIED` | The key lacks the `task` or `tasks` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no rights to the task |\n| 422 | `BITRIX_ERROR` | Time tracking is on, but no timer is running on the task: `Cannot stop task timer` |\n| 422 | `BITRIX_ERROR` | No task exists with this `taskId`: `Task not found or not accessible` |\n\nThe full list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **Without time tracking the call does nothing, yet the response is successful.** If `allowTimeTracking` is off for the task, you get `200` with `data: null`. Time tracking is turned on by the `allowTimeTracking` field when you [create](\u002Fdocs\u002Fentities\u002Ftasks\u002Fcreate) or [update](\u002Fdocs\u002Fentities\u002Ftasks\u002Fupdate) the task.\n- **Pausing the timer does not pause the task.** The task stays In Progress. To return it to Pending, call [pause task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fpause).\n- **Where to see the worked time.** Each stop adds an entry to the task's [time tracking](\u002Fdocs\u002Fentities\u002Ftasks\u002Ftime): the start and end of the interval and its length in seconds.\n\n## See also\n\n- [Start task timer](\u002Fdocs\u002Fentities\u002Ftasks\u002Fstart-timer)\n- [Task time tracking](\u002Fdocs\u002Fentities\u002Ftasks\u002Ftime)\n- [Pause task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fpause)\n- [Get task](\u002Fdocs\u002Fentities\u002Ftasks\u002Fget)\n- [Tasks](\u002Fdocs\u002Fentities\u002Ftasks)\n","2026-10-19",{},1794739435702]