A API Mivicall segue convenções REST standard. Errors devolvem JSON estruturado:Documentation Index
Fetch the complete documentation index at: https://docs.mivicall.com/llms.txt
Use this file to discover all available pages before exploring further.
requestId é único por request — sempre incluam-no em pedidos de suporte.
Códigos HTTP
| Code | Significado | Acção |
|---|---|---|
| 200 OK | Sucesso | Processar resposta |
| 201 Created | Recurso criado | Guardar ID retornado |
| 204 No Content | Sucesso sem body | (ex: DELETE) |
| 400 Bad Request | Payload mal-formado | Verificar JSON, encoding |
| 401 Unauthorized | API key inválida/revogada | Verificar Authorization header |
| 403 Forbidden | Scope insuficiente | Gerar key com scope necessário |
| 404 Not Found | Recurso inexistente | Verificar ID |
| 409 Conflict | Conflito de estado | Re-fetch e re-aplicar |
| 422 Unprocessable Entity | Validação Zod falhou | Ver errors[] para detalhes |
| 429 Too Many Requests | Rate limit | Backoff exponencial |
| 500 Internal Server Error | Erro nosso | Retry depois; reportar com requestId |
| 502 Bad Gateway | Upstream indisponível | Retry com backoff |
| 503 Service Unavailable | Manutenção | Ver mivicall.com/status |
Codes de erro específicos
Lererror field para distinguir causas dentro do mesmo HTTP code:
401 Unauthorized
403 Forbidden
404 Not Found
409 Conflict
422 Unprocessable Entity
Validação Zod falhou.errors[] array com cada falha:
Retry policy recomendada
| Code | Retry? | Backoff |
|---|---|---|
| 4xx (excepto 408, 429) | Não | — |
| 408 Request Timeout | Sim | Linear, 3 tentativas |
| 429 Too Many Requests | Sim | Exponential, respeitar Retry-After |
| 500 Internal Server Error | Sim | Exponential, max 5 tentativas |
| 502 Bad Gateway | Sim | Exponential, max 5 |
| 503 Service Unavailable | Sim | Exponential, respeitar Retry-After |
| 504 Gateway Timeout | Sim | Exponential, max 3 |
Quando contactar suporte
Inclui sempre:requestIdda resposta- Timestamp UTC
- API key prefix (primeiros 8 chars, NÃO a key completa)
- Endpoint + method
- Payload enviado (sem PII)
- Resposta recebida
[API Error] {error_code}.