Skip to content

Errors

Every API error (including a route that does not exist or a wrong method) answers with Content-Type: application/problem+json (RFC 9457):

{
"type": "https://api-agent.manoflow.com/problems/validation-failed",
"title": "The request has invalid fields",
"status": 422,
"code": "validation_failed",
"detail": "2 fields are invalid",
"request_id": "01J9ZK8Q4T7X2M5N6P3R1S0V9W",
"errors": [
{ "pointer": "/last_reachout_at", "code": "timestamp_without_offset", "message": "must be ISO-8601 with Z or an offset" },
{ "pointer": "/phone_number", "code": "unknown_field", "message": "is not a field of this resource (extras go inside attributes)" }
]
}
  • Decide on code and errors[].code. They are stable.
  • title, detail and message are English text for people and may change.
  • errors[] has one element per invalid field, all at once. pointer is the field’s JSON Pointer (/messages/0/sent_at; empty means the whole body). message names the field, never its value.
Status code Cause What to do
400 invalid_json The body is not JSON, not an object, has NaN or Infinity, is not UTF-8 or is nested more than 64 levels Fix the body
400 invalid_query List or timeline: unknown parameter, invalid operator or value, limit outside 1 to 1000, bad cursor, contact_id that is not a UUID detail names the parameter
401 unauthorized Key missing, empty, malformed, unknown or revoked Check the key
403 forbidden The URL’s client_id is not the key’s or does not exist Check the URL
404 contact_not_found Search: the contact does not exist (it is a new contact). Timeline: the contact_id does not exist
404 not_found The route is misspelled Does not mean a new contact
404 kb_not_available Your company has no knowledge base available through the API A configuration issue; contact Manoflow
405 method_not_allowed Wrong method (the Allow header lists the valid ones)
413 payload_too_large Body larger than 1 MiB Split the transcript or the batch
415 unsupported_media_type Content-Type: application/json is missing
422 validation_failed Invalid fields See errors[]
429 rate_limited Too many requests Wait as long as Retry-After says
500 internal_error Unexpected error Retry with backoff; if it persists, report the request_id

When several things fail at once, the first in this order wins: 401, 429, 403, 415, 413, 400, 422.

errors[].code Cause
missing_key The record key (user_id, conversation_id…) is missing or "". In search: neither user_id nor phone was sent
required A required field is missing (platform, kind, sender, content, sent_at, meeting_type on an appointment)
unknown_field The field is not in the schema. Extras go in attributes
reserved_name An attributes key uses the name of a field of the resource
not_a_string, not_a_number, not_an_integer, not_a_boolean, not_a_list, not_an_object Wrong type; the API never converts
text_too_long Text over 20,000 characters (255 for the record key)
out_of_range Number out of range, or negative nights / guests
timestamp_without_offset Instant without a zone
invalid_timestamp Instant in another format
invalid_date Not a real YYYY-MM-DD day (2026-02-30)
invalid_currency currency is not 3 letters
invalid_platform platform is not a lowercase token (whatsapp, instagram, web…)
invalid_phone The search phone has something other than digits, +, spaces, -, (, ) or .
invalid_text The text has a NUL character or an incomplete UTF-16 character
unknown_value Value outside a fixed list (kind, status, meeting_type, priority, sender…)
too_many_items More than 2,000 messages, 1,000 tags or 500 batch items
empty_batch Batch with no items
requires_user_id Conversation with contact but no user_id
field_not_allowed Booking with a field of the other kind (nights on an appointment, scheduled_at on a stay)
assignee_not_allowed A ticket’s assigned_to is not a valid person on your team
invalid_value Any other invalid value

Rarely, a 422 arrives without errors[], only with detail: the value passed validation but could not be saved. Read detail, do not retry, and report the request_id.

Every response carries the X-Request-Id header, and every error repeats it as request_id. Quote it when you report a problem: it identifies your request.

You can send your own (1 to 64 characters A-Za-z0-9._-, for example bot-conv_01_test) to link your logs with Manoflow’s. If you do not, the API generates one.

With fetch:

const res = await fetch(url, {
method: 'POST',
headers: { 'x-kyto-key': process.env.MANOFLOW_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify(body),
});
if (res.ok) {
const saved = await res.json();
console.log('ok', res.status, saved.result); // 201 created; 200 updated, unchanged or stale
} else {
const problem = await res.json();
console.log('manoflow failed', res.status, problem.code, problem.request_id,
JSON.stringify(problem.errors));
}

With axios, a 4xx or 5xx throws and the error is in err.response.data. No err.response means there was no response (timeout or network).