Skip to main content

Error response shape

All errors follow a consistent structure:

Error types

authentication_error (401)

The request could not be authenticated.

authorization_error (403)

The API key is valid but lacks permission.

invalid_request_error (400)

The request is malformed or missing required data. A small number of invalid_request_error codes are returned with 403 instead of 400 because they describe a per-line policy violation, not a malformed payload — see contact_has_not_messaged below.

Contact-first

Outside the sandbox, the recipient must message your line first before you can send to them. Sending into a cold contact returns contact_has_not_messaged with HTTP 403. The same rule applies to group chats: at least one inbound message must have been received in the chat before you can post to it.

not_found_error (404)

The requested resource doesn’t exist.

rate_limit_error (429)

Too many requests. Back off and retry after the Retry-After header value. See Limits for the per-line message guidance that sits above the API request rate.

HTTP status codes