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

Calendar resource fields

GET /v1/calendar-resources/fields

Returns the calendar resource field schema — use it to check which fields the create and rename requests accept.

Examples

curl — personal key

Terminal
curl "https://vibecode.bitrix24.com/v1/calendar-resources/fields" \
  -H "X-Api-Key: YOUR_API_KEY"

curl — OAuth application

Terminal
curl "https://vibecode.bitrix24.com/v1/calendar-resources/fields" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"

JavaScript — personal key

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar-resources/fields', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
  },
})

const { success, data } = await res.json()
console.log(Object.keys(data.fields))

JavaScript — OAuth application

javascript
const res = await fetch('https://vibecode.bitrix24.com/v1/calendar-resources/fields', {
  headers: {
    'X-Api-Key': 'YOUR_APP_KEY',
    'Authorization': 'Bearer USER_SESSION_TOKEN',
  },
})

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

Response fields

Field Type Description
Fieldsuccess Typeboolean DescriptionAlways true on success
Fielddata.fields Typeobject DescriptionField schema: the key is the resource field name, the value is its description
Fielddata.fields.<field>.type Typestring DescriptionValue type: number or string
Fielddata.fields.<field>.readonly Typeboolean Descriptiontrue — the field is read-only and is not accepted in write requests
Fielddata.fields.<field>.required Typeboolean Descriptiontrue — the field is required on creation. Present only on required fields
Fielddata.fields.<field>.label Typestring DescriptionField label
Fielddata.fields.<field>.description Typestring DescriptionField description
Fielddata.batch Typearray DescriptionWrite actions accepted by POST /v1/calendar-resources/batch: create

Resource fields in data.fields:

Field Type RO Description
Fieldid Typenumber ROyes DescriptionResource ID
Fieldname Typestring ROno DescriptionResource name. Required on creation and renaming
FieldcreatedBy Typenumber ROyes DescriptionID of the employee who created the resource. List: GET /v1/users

Response example

JSON
{
  "success": true,
  "data": {
    "fields": {
      "id": {
        "type": "number",
        "readonly": true,
        "label": "Resource ID",
        "description": "Resource ID."
      },
      "name": {
        "type": "string",
        "readonly": false,
        "required": true,
        "label": "Resource name",
        "description": "Resource name."
      },
      "createdBy": {
        "type": "number",
        "readonly": true,
        "label": "Creator ID",
        "description": "Creator ID."
      }
    },
    "batch": [
      "create"
    ]
  }
}

Error response example

403 — no scope:

JSON
{
  "success": false,
  "error": {
    "code": "SCOPE_DENIED",
    "message": "This endpoint requires 'calendar' scope"
  }
}

Errors

HTTP Code Description
HTTP403 CodeSCOPE_DENIED DescriptionThe API key does not have the calendar scope
HTTP401 CodeMISSING_API_KEY DescriptionThe X-Api-Key header was not passed
HTTP429 CodeRATE_LIMITED DescriptionRate limit exceeded

Full list of common API errors — Errors.

See also