Para agentes de IA: markdown desta página — /docs-content-en/entities/booking-wait-list/create.md índice da documentação — /llms.txt
Os artigos da documentação estão disponíveis atualmente em inglês.
Create an entry
POST /v1/booking-wait-list
Adds a record to the wait list — the queue of clients for whom no free time slot was available to book.
Fields go at the root of the JSON, without a fields wrapper.
Request fields (body)
| Field | Type | Required | Description |
|---|---|---|---|
Fieldnote |
Typestring | null | Requiredno | DescriptionNote on the record. If the field is omitted or null, the record is created without a note |
The body accepts no other fields. The record's clients are set by a separate PUT /v1/booking-wait-list/:id/clients request after creation.
Examples
curl — personal key
curl -X POST "https://vibecode.bitrix24.com/v1/booking-wait-list" \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"note": "Call back after 15:00"}'
curl — OAuth application
curl -X POST "https://vibecode.bitrix24.com/v1/booking-wait-list" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"note": "Call back after 15:00"}'
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-wait-list', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({ note: 'Call back after 15:00' }),
})
const { data } = await res.json()
console.log('Record ID:', data.id)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/booking-wait-list', {
method: 'POST',
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
'Content-Type': 'application/json',
},
body: JSON.stringify({ note: 'Call back after 15:00' }),
})
const { data } = await res.json()
console.log('Record ID:', data.id)
Response fields
On success, the HTTP status is 201 Created.
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata.id |
Typenumber | DescriptionIdentifier of the created record. Pass it in the path of requests to the record, for example PUT /v1/booking-wait-list/:id/clients |
Fielddata.note |
Typestring | null | DescriptionNote on the record. null — no note |
Response example
{
"success": true,
"data": {
"id": 27,
"note": "Call back after 15:00"
}
}
Error response example
400 — the body contains a field other than note:
{
"success": false,
"error": {
"code": "INVALID_PARAMS",
"message": "Only note can be written"
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe body contains a field other than note. Message Only note can be written |
| HTTP400 | CodeINVALID_PARAMS |
Descriptionnote is neither a string nor null. Message note must be a string or null |
| HTTP400 | CodeINVALID_PARAMS |
DescriptionThe body is not a JSON object, for example an array. Message Body must be an object |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionThe X-Api-Key header is not passed |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no Bitrix24 tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key does not have the booking scope |
| HTTP403 | CodeWRITE_BLOCKED_READONLY_KEY |
DescriptionThe key is in read-only mode |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRequest rate exceeded. The effective cap is in the x-ratelimit-limit header |
| HTTP502 | CodeBITRIX_RESPONSE_INVALID |
DescriptionBitrix24 returned a response of an unexpected shape. If this happened while re-reading the record after creation, the record has already been created — find it in the list before retrying |
Full list of common API errors — Errors.