[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Factivities\u002Fcomplete":3,"docs-tabs-entities\u002Factivities\u002Fcomplete":6},{"content":4,"lastmod":5},"\n## Complete an activity\n\n`POST \u002Fv1\u002Factivities\u002F:id\u002Fcomplete`\n\nMarks a CRM activity as completed: a call, meeting, task or email. Call it when the work on the activity is done.\n\n## Parameters\n\n| Parameter | Type | Required | Description |\n|----------|-----|:-----:|---------|\n| `id` (path) | number | yes | Activity ID, a positive integer. List: [`GET \u002Fv1\u002Factivities`](\u002Fdocs\u002Fentities\u002Factivities\u002Flist) |\n\nNo request body is sent. Send the request without a body and without the `Content-Type` header, or pass an empty object `{}` with the `Content-Type: application\u002Fjson` header.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3894\u002Fcomplete\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3894\u002Fcomplete\" \\\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\u002Factivities\u002F3894\u002Fcomplete', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n  },\n})\n\nconst { success, data } = await res.json()\nconsole.log('Activity completed:', data.completed)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Factivities\u002F3894\u002Fcomplete', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst { success, data } = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|------|-----|---------|\n| `success` | boolean | `true` on a successful request |\n| `data` | object | The activity, read back after completion. All fields: [Activity fields](\u002Fdocs\u002Fentities\u002Factivities\u002Ffields) |\n| `data.completed` | boolean | `true` — the activity is completed |\n| `data.status` | number | Activity status: `2` — completed |\n\n## Response example\n\nThe main fields are shown. Full list: [Activity fields](\u002Fdocs\u002Fentities\u002Factivities\u002Ffields).\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 3894,\n    \"ownerTypeId\": 3,\n    \"ownerId\": 17,\n    \"subject\": \"Call the client\",\n    \"completed\": true,\n    \"status\": 2,\n    \"startTime\": \"2026-10-23T12:00:00.000Z\",\n    \"endTime\": \"2026-10-23T12:15:00.000Z\",\n    \"deadline\": \"2026-10-23T12:00:00.000Z\",\n    \"updatedAt\": \"2026-10-19T11:48:07.000Z\"\n  }\n}\n```\n\n## Error response example\n\n404 — no activity with this ID:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"ENTITY_NOT_FOUND\",\n    \"message\": \"Activity does not exist\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 404 | `ENTITY_NOT_FOUND` | No activity with this `id` |\n| 400 | `INVALID_PARAMS` | `id` is not a positive integer. Message: `id must be a positive integer` |\n| 400 | `INVALID_PARAMS` | A field was passed in the body. Message: `Unsupported action field` |\n| 400 | `FST_ERR_CTP_EMPTY_JSON_BODY` | The `Content-Type: application\u002Fjson` header was sent with an empty body. Send `{}` or remove the header |\n| 422 | `BITRIX_ERROR` | Bitrix24 refused to complete the activity. The refusal text is in `message` |\n| 403 | `BITRIX_ACCESS_DENIED` | The key's user has no permission for this activity in Bitrix24 |\n| 502 | `BITRIX_ERROR` | The activity has no valid binding to a CRM entity. Message: `Activity has no valid CRM owner` |\n| 502 | `BITRIX_ERROR` | The completion was sent, but the activity could not be read back. Message: `Activity could not be read back`. Check the activity state with [`GET \u002Fv1\u002Factivities\u002F:id`](\u002Fdocs\u002Fentities\u002Factivities\u002Fget) |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is read-only — see [access rights](\u002Fdocs\u002Faccess-rights) |\n| 403 | `SCOPE_DENIED` | The API key does not have the `crm` scope |\n| 401 | `TOKEN_MISSING` | The API key has no configured tokens |\n\nFull list of common API errors: [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n**Completing again returns no error.** Calling the method on an already completed activity returns `200` and returns the activity unchanged: `completed` stays `true`, `updatedAt` does not change. There is no need to check the activity state before the call.\n\n## See also\n\n- [Postpone an activity](\u002Fdocs\u002Fentities\u002Factivities\u002Fpostpone)\n- [Change an activity deadline](\u002Fdocs\u002Fentities\u002Factivities\u002Fdeadline)\n- [Get an activity](\u002Fdocs\u002Fentities\u002Factivities\u002Fget)\n- [Activity fields](\u002Fdocs\u002Fentities\u002Factivities\u002Ffields)\n","2026-10-19",{},1795000255507]