Lelemon
  • Get started
  • Use cases
  • Guides
  • API basics
  • Webhooks
  • SDK, CLI and MCP
  • API reference
  • Changelog
  • v1 (legacy)
Authentication and scopesScope catalogIDs and objectsListsErrorsIdempotencyRate limitsVersioningError codes
powered by Zudoku
API basics

Error codes

Branch on code, never on detail. Codes are stable; messages may improve. See Errors for the response format.

CodeStatusTitleMeaning
invalid_request400Invalid requestA field of the request is missing, has the wrong type or breaks a limit, or the body has a field that does not exist. The param of the answer names the first field that failed and the detail says which rule it broke.
unknown_field400Unknown fieldThe body has a field the route does not document. param names the first one, and the detail lists up to ten. Remove it and send the request again. Free-form maps such as metadata accept any key.
invalid_cursor400Invalid cursorThe cursor is not one this API issued, was changed on the way, or was issued for a list with other filters. A cursor is only valid for the same filters and the same list.
api_key_invalid401Invalid API keyMissing, invalid or revoked API key. Send it as Authorization: Bearer .
unauthorized401UnauthorizedMissing, invalid or revoked API key. Send it as Authorization: Bearer .
scope_missing403Scope missingThe key is valid but was created without the scope this operation needs. The operation page in the API reference lists the scope it requires and missingScopes in the answer names the ones this key lacks.
agent_not_exposed403Agent not exposedThis agent is internal and was not created through the API, so it is not exposed. Create a copilot with POST /v2/agents and audience internal.
forbidden403ForbiddenThe key is valid and has the scope, but what it asks for is not allowed to it: the object belongs to another organization or subaccount, or the role behind the key is too low.
grant_not_allowed403Grant not allowedA key can only hand out scopes it has itself, and some scopes (the subaccounts:* ones) are never handed down. The request asked for a scope the creating key cannot grant.
organization_deleted403Organization deletedThe organization of this key was deleted.
subscription_canceled403Subscription canceledThe subscription of this organization is canceled. The API is closed until it is reactivated.
budget_exceeded402Budget exceededA budget with the action stop reached its monthly limit, so the agent no longer answers on that scope. The budget object of the answer says which budget, its limit and what was spent.
not_found404Not foundNo object with this id exists in the organization of the key. The id may have a typo, belong to another organization or subaccount, or the object was deleted.
method_not_allowed405Method not allowedThe path exists but not with this HTTP method, for example a DELETE on a route that only reads. The API reference lists the methods of each path.
conflict409ConflictThe request is valid but clashes with the current state of the object, for example changing something that another request changed first or that is in a state that does not allow it. The detail says the state.
idempotency_key_reused409Idempotency key reusedThis Idempotency-Key was already used within the last 24 hours with a different method, path or body. A key identifies one request: the same key must always carry the same request. It also answers when the response stored for the key was erased because it held personal data of a person who was suppressed: send the request again with a new key.
idempotency_key_in_use409Idempotency key in useA request with this Idempotency-Key is still running, so this second copy cannot be answered yet. It happens when a client retries before the first call finished.
agent_version_conflict409Agent version conflictSomeone saved the agent after you read it. Read it again and retry with its current version.
external_ref_conflict409External reference conflictAnother contact in this organization already has this externalRef. An externalRef is unique per organization.
actor_role_above_key403Actor role above the keyThe actor declares a role higher than this key can declare. Declare a lower role or use a key with more reach.
approval_not_pending409Approval not pendingSomeone decided this approval first, or it expired. Read it to see its status. It cannot be decided twice.
approval_decision_not_allowed403Approval decision not allowedThis key is not named as an approver by the policy of the tool, it created the request itself, or it lacks the approvals scope.
review_not_available422Review not availableOnly a decision marked automatedDecision takes a review request, and an approval only once someone decided it.
team_question_not_open409Team question not openThe team question was already answered or closed. It cannot be answered twice.
slot_not_available409Slot not availableThat time is no longer free in the agenda, or it was never one of its slots. Nothing was booked.
meeting_not_active409Meeting not activeThe meeting is canceled, completed or was marked as a no-show, so it cannot be canceled or moved.
invalid_cron422Invalid cron expressionThe cron expression could not be read. Use five fields (minute hour day-of-month month day-of-week), for example 0 9 2 * * for the 2nd of each month at 09:00.
invalid_timezone422Invalid timezoneThe timezone is not an IANA name. Use a name such as America/Santiago.
schedule_limit_reached409Schedule limit reachedThe agent or the organization already has the maximum number of scheduled tasks. Delete or reuse one before creating another.
run_finished409Run finishedThe run already ended (completed, stopped, failed or canceled), so there is nothing left to cancel.
run_not_waiting409Run not waiting for an answerThe run is not paused with a question, so it has nothing to receive an answer. Read the run: only status waiting_for_answer takes one.
case_agent_in_control409Agent in controlThe agent is handling this case and would answer over your message. Take control first, or close the case.
case_message_limit_reached409Message limit reachedThe case reached its limit of messages. Open a new case to keep talking.
resource_in_use409Resource in useSomething still depends on this object, for example a contact with open cases or a pipeline with a case in it, so it cannot be deleted. The detail names what depends on it.
action_origin_not_allowed403Action origin not allowedThis key may not create actions that call that site. An administrator adds the site to the key.
action_destination_blocked400Destination blockedThat address cannot be used. It must be a public http or https URL that answers.
phone_number_in_use409Phone number in useThis number is already connected.
payload_too_large413Payload too largeThe body is bigger than the limit of the route. JSON bodies take up to 1 MB; a file route has its own limit, which the detail states.
unprocessable422UnprocessableThe request is well formed and the fields are valid, but a rule of the object does not allow it in its current state. The detail names the rule and param the field when there is one.
agent_not_ready422Agent not readyThe agent cannot be turned on yet because it lacks something required: instructions or a model. The detail lists what is missing and param names the first field.
agent_channel_disabled422Agent channel disabledThe agent does not have this channel enabled.
case_channel_not_api422Case not from the APIOnly cases that came through the API can be written to as the contact. On other channels the contact writes by themselves.
channel_window_closed422Channel window closedMore than 24 hours passed since the last message of the person and WhatsApp only accepts approved templates now. The message was not sent.
no_outbound_channel422No outbound channelThis case has no channel to write to the person. The message was not sent.
interactive_unsupported_channel422Interactive messages need WhatsAppButtons, lists and catalog messages only exist on WhatsApp. This case is on another channel. The message was not sent.
catalog_not_connected422Catalog not connectedThe WhatsApp number that sends the message has no catalog, or the catalogId is not the one connected to it. The message was not sent.
message_variable_missing422Message variable missingThe template needs a variable that has no value. The message was not created.
template_not_approved422Template not approvedWhatsApp has not approved this template, so nothing can be sent with it yet.
no_whatsapp_number422No WhatsApp numberThe organization has no active WhatsApp number that can send this template.
template_across_accounts422Numbers on different WhatsApp accountsA template belongs to one WhatsApp Business Account. Choose numbers that share it.
sender_domain_not_verified422Sender domain not verifiedThe sender address must belong to a verified domain of the organization. Check GET /v2/email/domains.
field_not_sensitive422Field not sensitiveOnly a field the pipeline marks as sensitive can be revealed. Read any other field from the case.
contact_without_email422Contact without emailThe contact has no email address to write to.
subject_required422Subject requiredThe first email of a case needs a subject.
recipient_not_allowed422Recipient not allowedThis organization cannot send email to that address.
contact_opted_out422Contact opted outThe contact opted out of this channel, so nothing is sent to them.
presence_not_configured409Presence not configuredPresence is off for this organization: no presence setting is saved yet, so signals have nothing to update and presence filters have nothing to read.
action_variable_needs_authorization400Action variable needs authorizationThe action sends contact.phone or contact.whatsapp_id to your system, and those two leave Lelemon only with the authorization of the destination (article 15 bis of Law 21.719). The request has no authorization and the action has no current one for this destination.
action_variable_in_query400Action variable in the queryIn a GET action everything goes in the URL, and the URL stays in the logs of your system and of whatever sits in front of it. contact.phone, contact.whatsapp_id and the variables that come from a field of the case do not go there.
domain_in_use409Domain in useAnother organization already registered this domain.
model_not_supported422Model not supportedThe llmConfig.model is not a public model id of the list in GET /v2/models, or it is one that was withdrawn.
thinking_not_supported422Thinking cannot be turned offThe model in llmConfig.model cannot turn thinking off, so thinking: "off" is rejected. GET /v2/models says which models accept it.
template_variable_missing422Template variable missingThe instructions ask for a variable that has no value.
mcp_server_unreachable422MCP server unreachableThe MCP server did not answer a tools request. Check the URL and the credentials. Redirects are not followed.
linear_rejected422Linear rejected the requestLinear did not accept the API key, the team or the project. Check that the key is valid and can see the team.
required_fields_missing422Required fields missingThe stage the case is moving to or entering requires fields that the case does not have yet. param names the first missing one.
unsupported_file_type422Unsupported file typeAllowed: PDF, DOCX, TXT and MD.
rate_limited429Too many requestsThis key sent more than 3000 requests in the last minute. The RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers of every answer say where the key stands, and Retry-After says how many seconds to wait.
data_connector_unavailable422Data connector unavailableYour connector did not answer in time, answered with an error, or its address is not reachable. Nothing was stored.
data_connector_invalid_response422Data connector response is not validYour connector answered, but an account card, a search answer or a view page does not follow lelemon-connector/v1. The detail lists the failing paths with the rule each breaks, never the values. The check endpoint reads the manifest only, so it can pass while a card fails.
data_connector_not_ready409Data connector not readyThe connector is not active. Read its signing secret, serve the format and call POST /v2/data-connectors/{id}/check.
data_connector_limit422Data connector limit reachedAn organization can have up to 10 data connectors. Delete one first.
webhook_endpoint_limit422Webhook endpoint limit reachedAn organization can have up to 16 webhook endpoints, enabled or disabled. Every event is delivered to each endpoint that listens to it, so the cap also bounds how many deliveries one event can make.
internal_error500Internal errorSomething failed on our side after the request started. The same Idempotency-Key returns this same error, so check whether the operation happened before retrying with a new key.
service_unavailable503Service unavailableLelemon is temporarily unavailable. Retry with backoff.
Versioning