[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-entities\u002Fbooking-resource-types\u002Fcreate":3,"docs-tabs-entities\u002Fbooking-resource-types\u002Fcreate":6},{"content":4,"lastmod":5},"# Create: Booking resource types\n\n`POST \u002Fv1\u002Fbooking-resource-types`\n\nCreates a booking resource type — a category of online booking resources with the settings for client messages about bookings.\n\nFields go at the root of the JSON, without a `fields` wrapper.\n\n## Request fields (body)\n\n| Field | Type | Required | Description |\n|------|-----|:-----:|----------|\n| `code` | string | yes | Symbolic code of the type. Unique among the types of the Bitrix24 account: a duplicate code is rejected with `422 BITRIX_ERROR` |\n| `name` | string | yes | Type name |\n| `isInfoNotificationOn` | boolean \\| string | no | Booking info message to the client. `true` \u002F `false` or `\"Y\"` \u002F `\"N\"`. Default `true` |\n| `isConfirmationNotificationOn` | boolean \\| string | no | Booking confirmation request. Default `true` |\n| `isReminderNotificationOn` | boolean \\| string | no | Booking reminder. Default `true` |\n| `isFeedbackNotificationOn` | boolean \\| string | no | Feedback request. Default `true` |\n| `isDelayedNotificationOn` | boolean \\| string | no | Message to a client who is running late. Default `true` |\n| `isCancellationNotificationOn` | boolean \\| string | no | Booking cancellation message to the client. Default `true` |\n| `senderCode` | string \\| null | no | Service that sends messages to the client, for example `bitrix24`. Default `null` |\n| `infoNotificationDelay` | number \\| null | no | How many seconds after the booking is made to send the booking info message. Default `null` |\n| `confirmationNotificationDelay` | number \\| null | no | How many seconds before the booking to send the first confirmation request. Default `86400` |\n| `confirmationNotificationRepetitions` | number \\| null | no | How many times to repeat the confirmation request, not counting the first one. Default `null` |\n| `confirmationNotificationRepetitionsInterval` | number \\| null | no | Interval between repeats of the confirmation request, in seconds. Default `10800` |\n| `confirmationCounterDelay` | number \\| null | no | How many seconds before the booking an unconfirmed booking enters the counter. Default `10800` |\n| `reminderNotificationDelay` | number \\| null | no | How many seconds before the booking to send the reminder. `-1` — on the morning of the booking day. Default `-1` |\n| `delayedNotificationDelay` | number \\| null | no | After how many seconds of lateness to send the message to the client. Default `300` |\n| `delayedCounterDelay` | number \\| null | no | After how many seconds of lateness the booking enters the calendar counter. Default `300` |\n| `cancellationNotificationDelay` | number \\| null | no | Delay of the booking cancellation message, in seconds. Default `600` |\n| `templateTypeInfo` | string | no | Booking message template: `inanimate`, `animate`, `inanimate_long`. Default `inanimate`. Saved, but not returned in the type card |\n| `templateTypeConfirmation` | string | no | Confirmation request template: `inanimate`, `animate`, `inanimate_long`. Default `inanimate` |\n| `templateTypeReminder` | string | no | Reminder template. The only value is `base` |\n| `templateTypeFeedback` | string | no | Feedback request template: `inanimate`, `animate`. Default `inanimate` |\n| `templateTypeDelayed` | string | no | Late-arrival message template: `inanimate`, `animate`. Default `inanimate` |\n\nThe built-in \"Expert\" type uses the `animate` templates; the \"Equipment\", \"Car\" and \"Property\" types use `inanimate`.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Technicians\",\n    \"code\": \"master\",\n    \"isInfoNotificationOn\": false,\n    \"isConfirmationNotificationOn\": false,\n    \"isReminderNotificationOn\": false,\n    \"isFeedbackNotificationOn\": false,\n    \"isDelayedNotificationOn\": false,\n    \"isCancellationNotificationOn\": false\n  }'\n```\n\n### curl — OAuth application\n\n```bash\ncurl -X POST \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"name\": \"Technicians\",\n    \"code\": \"master\",\n    \"isInfoNotificationOn\": false,\n    \"isConfirmationNotificationOn\": false,\n    \"isReminderNotificationOn\": false,\n    \"isFeedbackNotificationOn\": false,\n    \"isDelayedNotificationOn\": false,\n    \"isCancellationNotificationOn\": false\n  }'\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_API_KEY',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    name: 'Technicians',\n    code: 'master',\n    isInfoNotificationOn: false,\n    isConfirmationNotificationOn: false,\n    isReminderNotificationOn: false,\n    isFeedbackNotificationOn: false,\n    isDelayedNotificationOn: false,\n    isCancellationNotificationOn: false,\n  }),\n})\n\nconst { data } = await res.json()\nconsole.log('Type ID:', data.id)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fbooking-resource-types', {\n  method: 'POST',\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n    'Content-Type': 'application\u002Fjson',\n  },\n  body: JSON.stringify({\n    name: 'Technicians',\n    code: 'master',\n    isInfoNotificationOn: false,\n    isConfirmationNotificationOn: false,\n    isReminderNotificationOn: false,\n    isFeedbackNotificationOn: false,\n    isDelayedNotificationOn: false,\n    isCancellationNotificationOn: false,\n  }),\n})\n\nconst { data } = await res.json()\nconsole.log('Type ID:', data.id)\n```\n\n## Response fields\n\nOn success, the HTTP status is `201 Created`.\n\n| Field | Type | Description |\n|------|-----|----------|\n| `success` | boolean | `true` on success |\n| `data` | object | Card of the created type. The card fields are listed in the \"Response fields\" section of the [Get a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fget) page |\n| `data.id` | number | Type identifier. Pass it in `typeId` when [creating a booking resource](\u002Fdocs\u002Fentities\u002Fbooking-resources\u002Fcreate) |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"id\": 31,\n    \"code\": \"master\",\n    \"name\": \"Technicians\",\n    \"senderCode\": null,\n    \"isInfoNotificationOn\": false,\n    \"isConfirmationNotificationOn\": false,\n    \"isReminderNotificationOn\": false,\n    \"isFeedbackNotificationOn\": false,\n    \"isDelayedNotificationOn\": false,\n    \"isCancellationNotificationOn\": false,\n    \"infoNotificationDelay\": null,\n    \"confirmationNotificationDelay\": 86400,\n    \"confirmationNotificationRepetitions\": null,\n    \"confirmationNotificationRepetitionsInterval\": 10800,\n    \"confirmationCounterDelay\": 10800,\n    \"reminderNotificationDelay\": -1,\n    \"delayedNotificationDelay\": 300,\n    \"delayedCounterDelay\": 300,\n    \"cancellationNotificationDelay\": 600,\n    \"templateTypeConfirmation\": \"inanimate\",\n    \"templateTypeReminder\": \"base\",\n    \"templateTypeFeedback\": \"inanimate\",\n    \"templateTypeDelayed\": \"inanimate\"\n  }\n}\n```\n\n## Error response example\n\n422 — a type with this code already exists:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"BITRIX_ERROR\",\n    \"message\": \"Resource type with code \\\"master\\\" already exists\",\n    \"b24Code\": \"1010\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|-----|----------|\n| 400 | `MISSING_REQUIRED_FIELDS` | `code` is not passed. Message `code is required` |\n| 400 | `READONLY_FIELD` | `id` is passed in the body. Message `id is read-only` |\n| 400 | `INVALID_PARAMS` | Empty body. Message `Provide a non-empty object of fields` |\n| 400 | `INVALID_PARAMS` | A field not listed in the \"Request fields (body)\" table. Message `Unknown booking field` |\n| 400 | `INVALID_PARAMS` | A field value is an object or an array. Message `Fields must contain scalar values` |\n| 422 | `BITRIX_ERROR` | A type with this `code` already exists, `b24Code` `1010` |\n| 422 | `BITRIX_ERROR` | `name` is not passed. Message `Required fields: name` |\n| 401 | `MISSING_API_KEY` | The `X-Api-Key` header is not passed |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key does not have the `booking` scope |\n| 403 | `WRITE_BLOCKED_READONLY_KEY` | The key is in read-only mode |\n| 429 | `RATE_LIMITED` | Request rate exceeded. The effective cap is in the `x-ratelimit-limit` header |\n| 502 | `BITRIX_RESPONSE_INVALID` | Bitrix24 returned a response of an unexpected shape. If this happened while re-reading the card after the write, the type has already been created — find it in the [list](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Flist) before retrying |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## See also\n\n- [List booking resource types](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Flist)\n- [Update a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fupdate)\n- [Delete a booking resource type](\u002Fdocs\u002Fentities\u002Fbooking-resource-types\u002Fdelete)\n- [Create a booking resource](\u002Fdocs\u002Fentities\u002Fbooking-resources\u002Fcreate)\n- [Errors](\u002Fdocs\u002Ferrors)\n","2026-10-13",{},1795415176047]