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

Update a booking

PATCH /v1/bookings/:id

Updates the fields of an existing booking. Pass only the fields you want to change, at the top level of the JSON body.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionBooking ID. List: GET /v1/bookings with the required dateFrom and dateTo

Request fields (body)

Field Type Description
FieldresourceIds Typenumber[] DescriptionIDs of the resources the booking reserves. The array cannot be empty. The identifiers come from List booking resources
FielddatePeriod Typeobject DescriptionBooking period
FielddatePeriod.from.timestamp Typenumber DescriptionPeriod start, Unix seconds
FielddatePeriod.from.timezone Typestring DescriptionTime zone of the start in IANA format, e.g. UTC
FielddatePeriod.to.timestamp Typenumber DescriptionPeriod end, Unix seconds
FielddatePeriod.to.timezone Typestring DescriptionTime zone of the end in IANA format
Fieldname Typestring DescriptionBooking name. May be null
Fielddescription Typestring DescriptionBooking description. May be null

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/bookings/27" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Meeting room (updated)",
    "description": "Changed description"
  }'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/bookings/27" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Meeting room (updated)",
    "description": "Changed description"
  }'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bookings/27', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Meeting room (updated)',
    description: 'Changed description',
  }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/bookings/27', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    name: 'Meeting room (updated)',
    description: 'Changed description',
  }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe updated booking
Fielddata.id Typenumber DescriptionBooking ID
Fielddata.name Typestring | null DescriptionBooking name
Fielddata.description Typestring | null DescriptionBooking description
Fielddata.resourceIds Typenumber[] DescriptionIDs of the reserved resources
Fielddata.datePeriod Typeobject DescriptionBooking period: from and to are ISO 8601 date-time strings

Response example

JSON
{
  "success": true,
  "data": {
    "id": 27,
    "name": "Meeting room (updated)",
    "description": "Changed description",
    "resourceIds": [1],
    "datePeriod": {
      "from": "2026-05-30T09:13:04+00:00",
      "to": "2026-05-30T10:13:04+00:00"
    }
  }
}

Error response example

404 — booking not found:

JSON
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Booking not found"
  }
}

Errors

HTTP Code Description
HTTP404 CodeENTITY_NOT_FOUND DescriptionThe booking with the given id does not exist. Message: Booking not found
HTTP400 CodeEMPTY_UPDATE_BODY DescriptionThe request body is empty: there are no fields to change
HTTP422 CodeBITRIX_ERROR DescriptionAn empty resourceIds array was passed. Message: Empty resource collection
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the booking scope
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe key is read-only — see access rights
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens

Full list of common API errors — Errors.

See also