Errors
Errors
Every error code the API answers with, and what to do about it.
An error is a problem document (RFC 9457), sent as application/problem+json:
{
"type": "https://developers.aigently.ai/errors/invalid_variables",
"title": "The variables do not fit this agent",
"status": 422,
"code": "invalid_variables",
"detail": "1 variable is missing or invalid.",
"errors": [
{
"field": "variables.first_name",
"code": "required",
"message": "Required"
}
],
"request_id": "a3f9c1e07b2d4c4e"
}
Program against code, which never changes. detail is a sentence for a person and may be reworded; errors names each field a validation failure found. Quote request_id when you ask for help — it is also in every response's X-Request-ID header.
| Status | Code | Means |
|---|---|---|
400 |
idempotency_key_required |
An Idempotency-Key header is required |
400 |
invalid_request |
The request is not valid |
401 |
authentication_failed |
The API key was not accepted |
402 |
insufficient_credit |
There is not enough credit |
403 |
address_not_allowed |
The key does not work from this address |
403 |
live_key_in_browser |
A live key was sent from a browser |
403 |
live_key_required |
Only a live key does this |
403 |
organization_frozen |
The organization is frozen |
403 |
permission_denied |
This key does not have that permission |
403 |
test_key_required |
Only a test key does this |
404 |
not_found |
Not found |
405 |
method_not_allowed |
That method is not allowed here |
409 |
agent_name_taken |
The project already has an agent with that name |
409 |
agent_not_inbound |
The agent does not answer calls |
409 |
agent_not_outbound |
The agent does not place calls |
409 |
agent_not_publishable |
The agent is not ready to publish |
409 |
agent_not_published |
The agent is not published |
409 |
browser_voice_off |
The agent does not take browser calls |
409 |
campaign_empty |
The campaign has nobody to call |
409 |
campaign_finished |
The campaign has finished |
409 |
campaign_status_conflict |
The campaign is not in a state this applies to |
409 |
contact_exists |
The number is already in the phonebook |
409 |
contacts_missing_values |
Contacts lack a value the agent says out loud |
409 |
conversation_busy |
The agent is still answering the last message |
409 |
conversation_ended |
The conversation has ended |
409 |
conversation_in_progress |
The conversation is still in progress |
409 |
conversation_limit_reached |
The conversation has reached its length |
409 |
conversation_not_answered |
The call has not been answered yet |
409 |
crawl_running |
The website is being read |
409 |
credential_revoked |
The credential is revoked |
409 |
do_not_call |
The number is on the do-not-call list |
409 |
duplicate_source |
The file is already in the knowledge base |
409 |
evaluation_limit_reached |
The agent has as many evaluations as it can keep |
409 |
evaluation_run_in_progress |
An evaluation run is already going |
409 |
name_taken |
That name is taken |
409 |
not_a_file |
The source is not a file |
409 |
number_agent_mismatch |
The number and the agent do not fit |
409 |
outside_call_window |
The call's window is closed |
409 |
project_frozen |
The project is frozen |
409 |
scheduled_call_finished |
The scheduled call has already happened |
409 |
scheduled_call_placing |
The scheduled call is being placed |
409 |
source_indexing |
The source is being indexed |
409 |
transfer_already_requested |
The call is already being transferred |
409 |
unsupported_channel |
Not possible on this channel |
409 |
whatsapp_not_ready |
The WhatsApp connection cannot send templates yet |
413 |
file_too_large |
The file is too large |
413 |
request_too_large |
The request is too large |
415 |
unsupported_file_type |
Not a file the knowledge base reads |
422 |
caller_id_unavailable |
There is no number to call from |
422 |
conversation_too_short |
The conversation is too short to analyse |
422 |
destination_not_allowed |
That number cannot be called |
422 |
idempotency_key_reused |
The Idempotency-Key was used for a different request |
422 |
invalid_variables |
The variables do not fit this agent |
422 |
model_misconfigured |
The agent's model is set up wrongly |
422 |
source_limit_reached |
The knowledge base is full |
422 |
test_number_required |
Test keys can only call test numbers |
422 |
unknown_agent_version |
The agent has no such version |
422 |
unknown_field |
The request has a field this endpoint does not take |
422 |
validation_failed |
The request did not pass validation |
424 |
provider_key_missing |
A provider credential is missing |
429 |
concurrency_limit_reached |
Too many calls at once |
429 |
daily_limit_reached |
The daily call limit is reached |
429 |
limits_unavailable |
Limits cannot be checked just now |
429 |
rate_limited |
Too many requests |
500 |
internal_error |
Something went wrong on our side |
501 |
feature_disabled |
Not available on this deployment |
502 |
upstream_unavailable |
A service the platform depends on is not answering |