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

Errors

Errors come as application/problem+json:

fix appears when the code has a known remedy: what to do, as an action a program can follow. See Actions and MCP in v2.

param names the field when the error is about one. detail is for people and may change. code never does, so branch on it. Every response, success or error, carries a Request-Id header; send it when you write to support.

An unknown /v2 route answers 404, a method the route does not have answers 405 with an Allow header, and broken JSON answers 400. A 500 never shows internal messages.

StatusMeaningWhat to do
400Malformed requestFix it. param names the field
401Missing, invalid or revoked keyCheck the key
403The key lacks a scope, or the organization is closeddetail names the scope
404Does not exist, or is not yoursCheck the id and Lelemon-Subaccount
405Method not supported on this routeCheck the method
409Conflicts with the current stateRead the resource again and decide
413Payload too largeSend less
422Valid, but a rule does not allow itShow detail or change the input
429Too many requestsWait Retry-After seconds
5xxOur side failedRetry with backoff and the same Idempotency-Key

The body also rejects unknown shapes: a missing required field, null in a field that does not accept it, an array where an object is expected, text with the NUL character, and a body nested more than 32 levels deep all answer 400 invalid_request. A field the route does not document answers 400 unknown_field. See Strict bodies.

See every code in the error catalog.

ListsIdempotency
{ "type": "https://docs.lelemon.cl/errors/channel_window_closed", "title": "Channel window closed", "status": 422, "code": "channel_window_closed", "detail": "More than 24 hours passed since the last message of the person and WhatsApp only accepts approved templates now. The message was not sent.", "docUrl": "https://docs.lelemon.cl/errors/channel_window_closed", "requestId": "req_7Hc2LmQ0x8bVw1TqS9mYp3" }