Bot API rules and limits
Access rules
- The bot API is available only to users with role
BOT - Authorization uses
Authorization: Bearer <token> - If the token is valid but the user is not
BOT, the API returns403 Bot token required - If the user is missing, the API returns
401 User not found - If the token is invalid, the API returns
401 Invalid token - If the token is expired, the API returns
401 Token has expired
The bot works only within the user's existing form access scope.
Create checks access by form_id.
Read and update check access by task.form_id.
Additional access rule:
- one bot can have access to at most
2forms - if it needs access to more forms, create another bot, issue a separate token, and grant that bot access to the required forms
Supported field types
TextFieldTextareaFieldNumberFieldChoiceFieldDateFieldDueDateFieldPhoneFieldEmailFieldFormFieldTableField
Notes:
PATCH /bot/tasks/{task_id}/items/{form_field_id}updates a single item, soTableFieldis not updated through this endpoint- Table child items support only:
TextField,NumberField,ChoiceField,EmailField,PhoneField,DateField,DueDateField,FormField TextareaFieldis not allowed inside tablesFilesFieldandTimeTrackerFieldare not currently supported and return400 Unsupported field type for bot create: ...
Payload and file limits
- JSON payload:
- create task:
128 KB - update item:
32 KB
- create task:
- Upload file size:
20 MBper file
If the JSON body is too large, the API returns 413 Payload too large. Max size is ... bytes.
If a file is too large, upload returns 400 File too large. Up to 20MB allowed.
Maximum counts
participants_ids <= 5task_items <= 50files <= 10table rows <= 100row items <= 15
Typical validation errors include:
participants_ids limit exceeded: 5task_items limit exceeded: 50files limit exceeded: 10table rows limit exceeded for field {form_field_id}: 100table row items limit exceeded: 15
Rate limits
- create:
30/min - update item:
120/min - upload:
10/min - read:
300/min
When exceeded, the API returns 429 Rate limit exceeded. Retry after {seconds} seconds.
If the business needs higher throughput, the current implementation is better served by creating a second bot user and using a separate token.
Data validation
TextField,EmailField,PhoneField,FormField: string up to1 KB, null bytes are removedTextareaField: string up to30 KB, null bytes are removedChoiceField: onlylistornullNumberField: number or numeric string, normalized toDECIMAL(15,5), rounded to5digitsDateField/DueDateField: must be a valid ISO datetime string
Validation messages include:
value must be a stringvalue must be a list or nullchoice values must contain only strings or nullinvalid numeric value: ...numeric value exceeds DECIMAL(15,5) max: 9999999999.99999value must be an ISO datetime stringinvalid datetime value: ...
Responsible users
For forms with steps:
responsible_idsis required- a bot user cannot be responsible
- only active non-
BOTusers with access to the form are accepted - if no valid responsible users remain, the API returns
400 Responsible users are invalid for this form
For forms without steps, separate assignments are not required.
Common errors
403 Form access not found400 responsible_ids is required for forms with steps400 Responsible users are invalid for this form400 Bot already has access to 2 forms. Create another bot or remove access from another form.404 Form not found404 Task not found400 Form field {id} not found404 Form field not found400 Field {id} type mismatch: expected ..., got ...400 Table child field {id} not found400 Files not found: [...]400 File extension is not allowed: ...400 Invalid file content type for .ext: ...