06 Line

Errors

Every error code, what causes it, and what to do.

Every error response carries the same object under error, next to a request_id:

{
  "code": "text_too_long",
  "message": "The text needs 11 segments; the maximum is 10.",
  "param": "text",
  "doc_url": "https://docs.06line.com/docs/errors#text_too_long"
}

Match on code; message is for humans and may change. param points at the offending field.

CodeCauseWhat to do
invalid_requestMalformed JSON, unknown field, missing or wrongly typed fieldFix the request; see param
unauthorizedMissing, unknown, revoked or expired credentialGet a valid credential
forbiddenThe credential cannot act on this line or callUse a credential of the right company or line
not_foundThe line, call or message does not exist in your companyCheck the id
invalid_numberThe number is not E.164Send + and the country code, no spaces
text_too_longMore than 10 segmentsShorten the text, or avoid characters that force UCS-2
line_offlineThe line is not registered on the networkWait for line.state with online: true
line_busyA call is already in progress on the line or on the WebRTC sessionWait for the call to end
call_not_activeAnswering or hanging up a call that already endedIgnore; the call is over
rate_limitedToo many commands or connectionsRetry after retry_after_ms
internalOur faultRetry with the same client_ref; contact support with request_id

A message that ends failed carries its reason in error, in the API and in the sms.status webhook:

CodeCauseWhat to do
send_failedThe modem or the network refused a segmentCheck the number; retry later with a new client_ref
delivery_failedThe network reported the recipient will never get it (unknown or barred number)Check the number
line_offlineThe line went offline before the message leftWait for the line to be online, then send again