For AI agents: markdown of this page — /docs-content-en/entities/activities/deadline.md documentation index — /llms.txt

Change an activity deadline

POST /v1/activities/:id/deadline

Sets a new deadline for a CRM activity to an exact date and time. Call it when you know the specific date by which the activity must be done.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionActivity ID, a positive integer. List: GET /v1/activities

Request fields (body)

Field Type Required Description
Fielddeadline Typedatetime Requiredyes DescriptionThe new deadline — a date and time in ISO 8601 format: 2026-10-22T14:00:00+02:00, 2026-10-22T12:00:00Z. Pass a time zone offset or Z so that the point in time is unambiguous. A date without a time is rejected

The body accepts no other fields.

Examples

curl — personal key

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/activities/3894/deadline" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"deadline": "2026-10-22T14:00:00+02:00"}'

curl — OAuth application

Terminal
curl -X POST "https://vibecode.bitrix24.com/v1/activities/3894/deadline" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"deadline": "2026-10-22T14:00:00+02:00"}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894/deadline', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ deadline: '2026-10-22T14:00:00+02:00' }),
})

const { success, data } = await res.json()
console.log('New deadline:', data.deadline)

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/activities/3894/deadline', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ deadline: '2026-10-22T14:00:00+02:00' }),
})

const { success, data } = await res.json()

Response fields

Field Type Description
Fieldsuccess Typeboolean Descriptiontrue on a successful request
Fielddata Typeobject DescriptionThe activity, read back after the deadline change. All fields: Activity fields
Fielddata.deadline Typedatetime DescriptionThe new deadline
Fielddata.startTime Typedatetime DescriptionActivity start after the change
Fielddata.endTime Typedatetime DescriptionActivity end after the change

Response example

The main fields are shown. Full list: Activity fields.

JSON
{
  "success": true,
  "data": {
    "id": 3894,
    "ownerTypeId": 3,
    "ownerId": 17,
    "subject": "Call the client",
    "completed": false,
    "status": 1,
    "startTime": "2026-10-22T12:00:00.000Z",
    "endTime": "2026-10-22T12:15:00.000Z",
    "deadline": "2026-10-22T12:00:00.000Z",
    "updatedAt": "2026-10-19T11:47:45.000Z"
  }
}

Error response example

400 — deadline is missing or is not an ISO 8601 date and time:

JSON
{
  "success": false,
  "error": {
    "code": "INVALID_PARAMS",
    "message": "deadline must be an ISO-8601 datetime"
  }
}

Errors

HTTP Code Description
HTTP400 CodeINVALID_PARAMS Descriptiondeadline is missing, is not a string, or is not an ISO 8601 date and time, for example tomorrow or 2026-10-22. Message: deadline must be an ISO-8601 datetime
HTTP400 CodeINVALID_PARAMS DescriptionThe body contains a field other than deadline. Message: Unsupported action field
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer. Message: id must be a positive integer
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo activity with this id
HTTP422 CodeACTIVITY_DEADLINE_UNCHANGED DescriptionBitrix24 confirmed the change, but the activity deadline does not match the deadline that was passed
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 refused to change the deadline. The refusal text is in message
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionThe key's user has no permission for this activity in Bitrix24
HTTP502 CodeBITRIX_ERROR DescriptionThe activity has no valid binding to a CRM entity. Message: Activity has no valid CRM owner
HTTP502 CodeBITRIX_ERROR DescriptionThe change was sent, but the activity could not be read back. Message: Activity could not be read back. Check the activity state with GET /v1/activities/:id
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the crm scope
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors: Errors.

Known specifics

The activity start and end move together with the deadline. The activity duration is kept: for a 15-minute call whose deadline equals its start, after the deadline is changed to 2026-10-22T14:00:00+02:00, the startTime and deadline fields equal 12:00 UTC, and endTime equals 12:15 UTC.

Times in the response are in UTC. A deadline passed as 2026-10-22T14:00:00+02:00 comes back in data.deadline as 2026-10-22T12:00:00.000Z. Compare points in time, not strings.

The deadline of a completed activity can be changed too. Calling the method on a completed activity returns 200, and completed stays true.

See also