LunaDocs

Loading search...

PortuguêsSign in to the console
On this page

Keys

Use with AI

Create, list and revoke the credentials that authenticate your calls.

List API keys

GET/v1/api-keys

This customer's keys, with scopes, profile, status (active, revoked or expired), creation date, last use, revocation and what the account can do with each one (allowedActions).

Authentication
API key
Required scope
keys:read

Query parameters

  • kindstringoptional
    Values: integration session elevation

Responses

200Success.

No fields.

400The body, query or identifier does not match the contract. Each item of campos gives the field and the reason, and the value you sent never comes back. Repeating the same request repeats the refusal.
Field refused, with the reasonJSON
{
  "error": "invalid_request",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisição inválida.",
  "campos": [
    {
      "campo": "text.body",
      "motivo": "Não pode ficar vazio."
    }
  ]
}
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}

Create an API key

POST/v1/api-keys

Mints a new key and returns the secret exactly once. Store it the moment you receive it, because no route will return it again.

Authentication
API key
Required scope
keys:write

Request body

application/json · required

  • labelstringoptional
    1 to 120 characters
  • scopesarray<string>optional
    O que a chave pode fazer, escopo por escopo. Mande scopes ou profile, e nunca os dois: a lista de escopos que cada perfil concede está em GET /v1/api-keys/profiles.at least 1 items
  • profilestringoptional
    Um perfil pronto no lugar de scopes: agent (atendimento), full (integração completa) ou read_only (somente leitura). A chave nasce com os escopos que o perfil concede no momento da criação, e a lista deles está em GET /v1/api-keys/profiles.Values: agent full read_only
  • expiresAtstring (date-time)optional
  • modestringoptional
    live (o padrão) é a chave de sempre. test cria uma chave do modo de teste: POST /v1/messages com ela NÃO vai à Meta, não usa número seu e não conta na capacidade do plano; a Luna devolve ao seu webhook eventos simulados, assinados e com test: true. Uma chave de teste só usa POST /v1/messages e POST /v1/test-mode/inbound-messages, e não aceita externalId. Não dá para mudar depois: crie outra.Values: live test
  • externalIdstringoptional
    O seu identificador para o cliente a que esta chave pertence (1 a 128 caracteres), o mesmo externalId do link de conexão e dos números. Com ele, a chave é de UM cliente seu: só lê e envia pelos números com este externalId (inclusive os conectados depois), só cria link com ele, e não lista nem cria endpoints de webhook nem chaves. Sem ele, a chave é da conta inteira. Não dá para mudar depois: crie outra.1 to 128 characters

Responses

201Created.
  • idstring (uuid)required
  • labelstring | nullrequired
    O nome que você deu à chave, para reconhecê-la na lista.
  • kindstringrequired
    integration para chave sua, session para uma sessão do console. elevation é valor histórico, de credenciais emitidas até 10/08/2026, e nenhuma chave nova nasce com ele.Values: integration session elevation
  • scopesarray<string>required
    O que esta chave pode fazer. Uma rota fora deste conjunto responde 403.
  • modestringrequired
    live é a chave de sempre. test é a chave do modo de teste: ela envia mensagem simulada, sem ir à Meta, e só usa POST /v1/messages e POST /v1/test-mode/inbound-messages. Não muda depois da criação. O guia Modo de teste explica.Values: live test
  • externalIdstring | nullrequired
    O cliente seu a que a chave se restringe, ou nulo na chave da conta. Com valor, a chave só lê e envia pelos números com este externalId, só cria link de conexão com ele, só vê templates e contas das WABAs desses números, e não lista nem cria endpoints de webhook nem chaves. Não muda depois da criação.
  • createdAtstringrequired
  • expiresAtstring | nullrequired
    Nulo em chave de integração: ela vale até ser revogada.
  • revokedAtstring | nullrequired
  • lastUsedAtstring | nullrequired
    O último uso registrado, para identificar chave esquecida.
  • statusstringrequired
    active: a chave vale. revoked: foi revogada (revokedAt diz quando). expired: passou de expiresAt sem ser revogada. Revogada vale mais que expirada. É a API quem decide, e o seu código não precisa comparar datas.Values: active revoked expired
  • profilestring | nullrequired
    O perfil escolhido ao criar a chave (profile em POST /v1/api-keys), ou nulo quando os escopos foram escolhidos um a um e nas chaves anteriores a este campo. É só o rótulo: o que a chave pode fazer é scopes.Values: agent full read_only
  • allowedActionsarray<string>required
    O que a sua conta pode fazer com a chave agora: revoke (POST /v1/api-keys/{id}/revoke), só em chave de integração que ainda vale. Mostre o botão quando o verbo está na lista. Não leva em conta os escopos da chave que perguntou.
  • secretstringrequired
400The body, query or identifier does not match the contract. Each item of campos gives the field and the reason, and the value you sent never comes back. Repeating the same request repeats the refusal.
Field refused, with the reasonJSON
{
  "error": "invalid_request",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisição inválida.",
  "campos": [
    {
      "campo": "text.body",
      "motivo": "Não pode ficar vazio."
    }
  ]
}
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Free trial endedJSON
{
  "error": "trial_expired",
  "docsUrl": "https://lunahia.com.br/docs/plano-e-numeros",
  "message": "O teste grátis desta conta terminou. O envio de mensagens e as demais escritas estão pausados até a conta ser contratada. Você continua lendo os seus dados, o número segue conectado na Meta e o que chega continua sendo recebido e entregue ao seu webhook. Para continuar, escreva para contato@lunahia.com.br."
}
Account blocked by HelsenJSON
{
  "error": "account_blocked",
  "docsUrl": "https://lunahia.com.br/docs/plano-e-numeros",
  "message": "Esta conta foi bloqueada pela Helsen. O envio de mensagens e as demais escritas estão pausados. Você continua lendo os seus dados, o número segue conectado na Meta e o que chega continua sendo recebido e entregue ao seu webhook. Para saber o motivo e resolver, escreva para contato@lunahia.com.br."
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
415The body came with a content-type the route does not read. Send application/json, or multipart/form-data on the file routes.
Content type not readJSON
{
  "error": "unsupported_media_type",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Envie o corpo como application/json."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}

List the scopes a key can have

GET/v1/api-keys/scopes

The scopes an integration key can receive, each with its name in Portuguese, what it allows and whether it gives a power that calls for care.

Authentication
API key
Required scope
keys:read

Responses

200Success.
  • dataarray<object>required
  • data[].scopestringrequired
    O nome do escopo, o que vai em scopes ao criar a chave.
  • data[].labelstringrequired
    O nome da permissão em português.
  • data[].summarystringrequired
    O que a permissão deixa fazer.
  • data[].sensitivebooleanrequired
    true quando a permissão dá um poder que exige cuidado (criar chaves, redirecionar o webhook).
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}

List the key profiles

GET/v1/api-keys/profiles

The ready-made key profiles (agent, full and read_only) and the scopes each one grants. In POST /v1/api-keys, profile stands in for scopes.

Authentication
API key
Required scope
keys:read

Responses

200Success.
  • dataarray<object>required
  • data[].idstringrequired
    O que vai em profile ao criar a chave.Values: agent full read_only
  • data[].labelstringrequired
  • data[].summarystringrequired
    O que a chave deste perfil permite, em uma frase.
  • data[].scopesarray<string>required
    Os escopos que o perfil concede hoje.
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}

Read one API key

GET/v1/api-keys/{id}

One key's metadata. The secret does not come back, for the reason described on the listing route.

Authentication
API key
Required scope
keys:read

Path parameters

  • idstring (uuid)required

Responses

200Success.
  • idstring (uuid)required
  • labelstring | nullrequired
    O nome que você deu à chave, para reconhecê-la na lista.
  • kindstringrequired
    integration para chave sua, session para uma sessão do console. elevation é valor histórico, de credenciais emitidas até 10/08/2026, e nenhuma chave nova nasce com ele.Values: integration session elevation
  • scopesarray<string>required
    O que esta chave pode fazer. Uma rota fora deste conjunto responde 403.
  • modestringrequired
    live é a chave de sempre. test é a chave do modo de teste: ela envia mensagem simulada, sem ir à Meta, e só usa POST /v1/messages e POST /v1/test-mode/inbound-messages. Não muda depois da criação. O guia Modo de teste explica.Values: live test
  • externalIdstring | nullrequired
    O cliente seu a que a chave se restringe, ou nulo na chave da conta. Com valor, a chave só lê e envia pelos números com este externalId, só cria link de conexão com ele, só vê templates e contas das WABAs desses números, e não lista nem cria endpoints de webhook nem chaves. Não muda depois da criação.
  • createdAtstringrequired
  • expiresAtstring | nullrequired
    Nulo em chave de integração: ela vale até ser revogada.
  • revokedAtstring | nullrequired
  • lastUsedAtstring | nullrequired
    O último uso registrado, para identificar chave esquecida.
  • statusstringrequired
    active: a chave vale. revoked: foi revogada (revokedAt diz quando). expired: passou de expiresAt sem ser revogada. Revogada vale mais que expirada. É a API quem decide, e o seu código não precisa comparar datas.Values: active revoked expired
  • profilestring | nullrequired
    O perfil escolhido ao criar a chave (profile em POST /v1/api-keys), ou nulo quando os escopos foram escolhidos um a um e nas chaves anteriores a este campo. É só o rótulo: o que a chave pode fazer é scopes.Values: agent full read_only
  • allowedActionsarray<string>required
    O que a sua conta pode fazer com a chave agora: revoke (POST /v1/api-keys/{id}/revoke), só em chave de integração que ainda vale. Mostre o botão quando o verbo está na lista. Não leva em conta os escopos da chave que perguntou.
400The body, query or identifier does not match the contract. Each item of campos gives the field and the reason, and the value you sent never comes back. Repeating the same request repeats the refusal.
Field refused, with the reasonJSON
{
  "error": "invalid_request",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisição inválida.",
  "campos": [
    {
      "campo": "text.body",
      "motivo": "Não pode ficar vazio."
    }
  ]
}
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
404The resource does not exist, or is not yours. The two answers are identical, byte for byte.
Does not exist, or is not yoursJSON
{
  "error": "not_found",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Recurso não encontrado."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}

Revoke an API key

POST/v1/api-keys/{id}/revoke

Invalidates the key immediately. The operation is idempotent, so revoking again returns the same result without an error.

Authentication
API key
Required scope
keys:write

Path parameters

  • idstring (uuid)required

Responses

200Success.
  • idstring (uuid)required
  • labelstring | nullrequired
    O nome que você deu à chave, para reconhecê-la na lista.
  • kindstringrequired
    integration para chave sua, session para uma sessão do console. elevation é valor histórico, de credenciais emitidas até 10/08/2026, e nenhuma chave nova nasce com ele.Values: integration session elevation
  • scopesarray<string>required
    O que esta chave pode fazer. Uma rota fora deste conjunto responde 403.
  • modestringrequired
    live é a chave de sempre. test é a chave do modo de teste: ela envia mensagem simulada, sem ir à Meta, e só usa POST /v1/messages e POST /v1/test-mode/inbound-messages. Não muda depois da criação. O guia Modo de teste explica.Values: live test
  • externalIdstring | nullrequired
    O cliente seu a que a chave se restringe, ou nulo na chave da conta. Com valor, a chave só lê e envia pelos números com este externalId, só cria link de conexão com ele, só vê templates e contas das WABAs desses números, e não lista nem cria endpoints de webhook nem chaves. Não muda depois da criação.
  • createdAtstringrequired
  • expiresAtstring | nullrequired
    Nulo em chave de integração: ela vale até ser revogada.
  • revokedAtstring | nullrequired
  • lastUsedAtstring | nullrequired
    O último uso registrado, para identificar chave esquecida.
  • statusstringrequired
    active: a chave vale. revoked: foi revogada (revokedAt diz quando). expired: passou de expiresAt sem ser revogada. Revogada vale mais que expirada. É a API quem decide, e o seu código não precisa comparar datas.Values: active revoked expired
  • profilestring | nullrequired
    O perfil escolhido ao criar a chave (profile em POST /v1/api-keys), ou nulo quando os escopos foram escolhidos um a um e nas chaves anteriores a este campo. É só o rótulo: o que a chave pode fazer é scopes.Values: agent full read_only
  • allowedActionsarray<string>required
    O que a sua conta pode fazer com a chave agora: revoke (POST /v1/api-keys/{id}/revoke), só em chave de integração que ainda vale. Mostre o botão quando o verbo está na lista. Não leva em conta os escopos da chave que perguntou.
400The body, query or identifier does not match the contract. Each item of campos gives the field and the reason, and the value you sent never comes back. Repeating the same request repeats the refusal.
Field refused, with the reasonJSON
{
  "error": "invalid_request",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisição inválida.",
  "campos": [
    {
      "campo": "text.body",
      "motivo": "Não pode ficar vazio."
    }
  ]
}
401The key is missing, malformed, nonexistent, expired or revoked. The body is always the same, without saying which.
  • WWW-Authenticate Always Bearer.
Key refusedJSON
{
  "error": "unauthorized",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Credencial ausente ou inválida."
}
403The key lacks the scope the route requires. On a route that opens a number connection, also when the account cannot connect yet (connection_not_released). On the routes that write or send, also when the account is suspended: trial_expired (the free trial ended) or account_blocked (Helsen blocked the account). Suspension does not touch receiving: what arrives is still delivered to your webhook. A test key (mode test) only uses POST /v1/messages and POST /v1/test-mode/inbound-messages; on every other route it receives test_key_not_allowed.
Insufficient scopeJSON
{
  "error": "forbidden",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Esta chave não tem o escopo numbers:read, que esta operação exige. Crie uma chave com esse escopo (Integração, Chaves de API, no console) e use-a no lugar desta.",
  "requiredScope": "numbers:read"
}
Test key on a route outside test modeJSON
{
  "error": "test_key_not_allowed",
  "docsUrl": "https://lunahia.com.br/docs/modo-de-teste",
  "message": "Esta é uma chave de teste: ela só envia mensagem simulada (POST /v1/messages) e pede mensagem recebida simulada (POST /v1/test-mode/inbound-messages). Para esta operação, use uma chave de produção."
}
404The resource does not exist, or is not yours. The two answers are identical, byte for byte.
Does not exist, or is not yoursJSON
{
  "error": "not_found",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Recurso não encontrado."
}
429Too many requests, or a full queue. Wait the time in the Retry-After header and repeat. For POST /v1/messages, repeat with the same Idempotency-Key.
  • Retry-After Seconds to wait before repeating.
Request limitJSON
{
  "error": "rate_limited",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Requisições demais. Tente novamente em instantes."
}
503The platform cannot serve right now. Repeat after a few moments, with the same Idempotency-Key when there is one.
UnavailableJSON
{
  "error": "unavailable",
  "docsUrl": "https://lunahia.com.br/docs/erros",
  "message": "Não foi possível concluir a operação agora. Tente novamente em instantes."
}