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

Rename calendar resource

PATCH /v1/calendar-resources/:id

Changes the name of a calendar resource.

Parameters

Parameter Type Required Description
Parameterid (path) Typenumber Requiredyes DescriptionResource ID. List: GET /v1/calendar-resources

Request fields (body)

Field Type Required Description
Fieldname Typestring Requiredyes DescriptionNew resource name. Any other field in the body is rejected with 400 READONLY_FIELD

Examples

curl — personal key

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/calendar-resources/285" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Meeting room 2, third floor"}'

curl — OAuth application

Terminal
curl -X PATCH "https://vibecode.bitrix24.com/v1/calendar-resources/285" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Meeting room 2, third floor"}'

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar-resources/285', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Meeting room 2, third floor' }),
})

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

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar-resources/285', {
  method: 'PATCH',
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ name: 'Meeting room 2, third floor' }),
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata Typeobject DescriptionThe resource after the change. Its fields are the data.* rows below
Fielddata.id Typenumber DescriptionResource ID
Fielddata.name Typestring DescriptionResource name after the change
Fielddata.createdBy Typenumber DescriptionID of the employee who created the resource. List: GET /v1/users

Response example

JSON
{
  "success": true,
  "data": {
    "id": 285,
    "name": "Meeting room 2, third floor",
    "createdBy": 1295
  }
}

Error response example

404 — no resource with this ID:

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

Errors

HTTP Code Description
HTTP400 CodeMISSING_REQUIRED_FIELDS Descriptionname is not passed or is an empty string
HTTP400 CodeREADONLY_FIELD DescriptionThe body contains fields other than name
HTTP400 CodeINVALID_PARAMS Descriptionid is not a positive integer
HTTP404 CodeENTITY_NOT_FOUND DescriptionNo resource with this id in the resource list
HTTP422 CodeBITRIX_ERROR DescriptionBitrix24 did not confirm the rename or did not save the new name
HTTP403 CodeWRITE_BLOCKED_READONLY_KEY DescriptionThe API key is in read-only mode — writes are forbidden
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the calendar scope
HTTP403 CodeBITRIX_ACCESS_DENIED DescriptionBitrix24 denied the key owner permission to change the resource
HTTP401 CodeTOKEN_MISSING DescriptionThe API key has no configured tokens
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded
HTTP502 CodeBITRIX_UNAVAILABLE DescriptionBitrix24 is unavailable or returned a malformed resource list
HTTP503 CodeBITRIX_TIMEOUT DescriptionBitrix24 did not respond in time

Full list of common API errors — Errors.

Known specifics

No batch rename. POST /v1/calendar-resources/batch with the update action is rejected with 400 ACTION_NOT_SUPPORTED. Rename each resource with a separate call to this method.

See also