Անցնել բովանդակությանը

Տոներին բաց մի թողեք հաղորդագրությունները․ էջերի անվճար վերամիացում

Ընտրել պլան

The API docs are available in English, Romanian and Russian. This is the English version.

Errors

Errors

Every error has the same shape, a stable code and a link to its explanation.

{
  "error": {
    "type": "invalid_request_error",
    "code": "parameter_invalid",
    "message": "limit must be an integer between 1 and 100.",
    "param": "limit",
    "request_id": "req_8f2c1d9b0a7e4c11",
    "doc_url": "https://aichat.md/docs/api/errors#parameter_invalid"
  }
}

Types

HTTPtypeWhen
400 / 413 / 422invalid_request_errormissing or invalid parameter, invalid body, the channel refused the message
401authentication_errormissing, wrong, expired or revoked key, or suspended account
403permission_errorthe key lacks the required scope
404not_found_errorthe object does not exist in the key's workspace
409idempotency_errorIdempotency-Key reused with another request or still running
429rate_limit_errortoo many requests — see Retry-After
5xxapi_errorour side — retry with the same Idempotency-Key

Codes

codeMeaning
api_key_missingThe Authorization: Bearer … header is missing.
api_key_invalidThe key does not exist or is wrong.
api_key_revokedThe key was revoked (or its post-rotation grace period ended).
api_key_expiredThe key expired.
account_inactiveThe account that owns the key is suspended.
scope_missingThe key lacks a permission; the message names it.
parameter_missingA required parameter is missing (param).
parameter_invalidA parameter has a value that is not allowed (param).
parameter_unknownUnknown or read-only parameter (e.g. a lead's phone).
resource_missingThe object does not exist in this workspace.
route_missingNo such route.
body_invalid_jsonThe request body is not valid JSON.
body_too_largeThe body is larger than 1 MB.
idempotency_key_reusedSame Idempotency-Key with a different body.
idempotency_in_progressA request with the same key is still running; retry.
rate_limitedLimit exceeded; wait Retry-After seconds.
channel_delivery_failedThe channel (e.g. Meta) refused the message: 24-hour window, disconnected page.
too_many_endpointsAt most 10 webhooks per workspace.
internal_errorOur error. Keep the request_id.
auth_state_unavailableAccount checks are briefly unavailable; retry in a second.
public_api_unavailableThe API is temporarily unavailable.
NextWebhooks