47360 lines
1.2 MiB
47360 lines
1.2 MiB
{
|
|
"openapi": "3.1.0",
|
|
"info": {
|
|
"title": "MozOut Mozambique API",
|
|
"version": "1.0.0",
|
|
"summary": "REST API for customers: keys, permissions, limits and usage records.",
|
|
"description": "JSON over HTTPS. Authenticate with `Authorization: Bearer <key>`. The base URL is the same in both modes: the key decides the mode. Keys that start with `sandbox_` are in Sandbox mode (reads are real, writes are simulated and never charge); keys that start with `prod_` are in Production mode (changes are real and can charge). Every authenticated response carries `X-API-Mode`, and simulated writes carry `X-API-Simulated: true`. Send `Accept-Language: pt` or `en` to choose the language of error messages; `en` is the default and `code` never changes.",
|
|
"x-description-pt": "JSON sobre HTTPS. Autentique-se com `Authorization: Bearer <chave>`. O endereço é o mesmo nos dois modos: quem decide o modo é a chave. As chaves que começam por `sandbox_` estão em modo Sandbox (lê dados verdadeiros da conta; as escritas são simuladas e nunca cobram); as que começam por `prod_` estão em modo Produção (altera a conta e pode cobrar). Todas as respostas com chave levam `X-API-Mode`, e as escritas simuladas levam `X-API-Simulated: true`. Envie `Accept-Language: pt` ou `en` para escolher a língua das mensagens de erro; a omissão é `en` e o `code` nunca muda."
|
|
},
|
|
"servers": [
|
|
{
|
|
"url": "https://api.mozout.co.mz",
|
|
"description": "MozOut Mozambique"
|
|
}
|
|
],
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"tags": [
|
|
{
|
|
"name": "status",
|
|
"description": "Service status.",
|
|
"x-description-pt": "Estado do serviço."
|
|
},
|
|
{
|
|
"name": "token",
|
|
"description": "The key in use and its limits.",
|
|
"x-description-pt": "A chave em uso e os seus limites."
|
|
},
|
|
{
|
|
"name": "actions",
|
|
"description": "Long-running operations.",
|
|
"x-description-pt": "Operações longas."
|
|
},
|
|
{
|
|
"name": "specification",
|
|
"description": "This API described in OpenAPI.",
|
|
"x-description-pt": "Esta API descrita em OpenAPI."
|
|
},
|
|
{
|
|
"name": "sms",
|
|
"description": "Send SMS and check balance and senders. Only for accounts with SMS active.",
|
|
"x-description-pt": "Enviar SMS e consultar saldo e remetentes. Só para contas com o SMS activo."
|
|
},
|
|
{
|
|
"name": "email-center",
|
|
"description": "Transactional email: sender domains, sending, templates, suppressions, statistics and webhooks. Only for accounts with E-mail Center active.",
|
|
"x-description-pt": "E-mail transaccional: domínios remetentes, envio, modelos, bloqueados, estatísticas e webhooks. Só para contas com o E-mail Center activo."
|
|
},
|
|
{
|
|
"name": "account",
|
|
"description": "Details of the account, its contacts and users.",
|
|
"x-description-pt": "Dados da conta, contactos e utilizadores."
|
|
},
|
|
{
|
|
"name": "catalog",
|
|
"description": "What is for sale, with prices.",
|
|
"x-description-pt": "O que está à venda, com preços."
|
|
},
|
|
{
|
|
"name": "domains",
|
|
"description": "The domains of the account.",
|
|
"x-description-pt": "Os domínios da conta."
|
|
},
|
|
{
|
|
"name": "whois",
|
|
"description": "Free WHOIS lookup of a domain name.",
|
|
"x-description-pt": "Consulta WHOIS gratuita de um nome de domínio."
|
|
},
|
|
{
|
|
"name": "services",
|
|
"description": "The services of the account: hosting, servers and others.",
|
|
"x-description-pt": "Os serviços da conta: hospedagem, servidores e outros."
|
|
},
|
|
{
|
|
"name": "billing",
|
|
"description": "Invoices, credit and transactions.",
|
|
"x-description-pt": "Facturas, saldo e transacções."
|
|
},
|
|
{
|
|
"name": "support",
|
|
"description": "Tickets and departments.",
|
|
"x-description-pt": "Tickets e departamentos."
|
|
},
|
|
{
|
|
"name": "dns",
|
|
"description": "The DNS zone of each domain.",
|
|
"x-description-pt": "A zona DNS de cada domínio."
|
|
},
|
|
{
|
|
"name": "servers",
|
|
"description": "VPS servers: state, power, password, backups, reverse DNS and reinstall.",
|
|
"x-description-pt": "Servidores VPS: estado, energia, senha, cópias, DNS reverso e reinstalação."
|
|
},
|
|
{
|
|
"name": "hosting",
|
|
"description": "Usage, panel login, domains, databases, cron, SSL, PHP, backups and FTP of a hosting service.",
|
|
"x-description-pt": "Uso, entrada no painel, domínios, bases de dados, cron, SSL, PHP, cópias e FTP de uma hospedagem."
|
|
},
|
|
{
|
|
"name": "email",
|
|
"description": "Mailboxes, forwarders, autoresponders, default address and authentication of a hosting service.",
|
|
"x-description-pt": "Caixas, reencaminhadores, respostas automáticas, conta geral e autenticação de uma hospedagem."
|
|
},
|
|
{
|
|
"name": "extras",
|
|
"description": "Certificates, SiteLock, radio and other extras of the account.",
|
|
"x-description-pt": "Certificados, SiteLock, rádio e outros extras da conta."
|
|
},
|
|
{
|
|
"name": "reseller",
|
|
"description": "The reseller programs and accounts of this account.",
|
|
"x-description-pt": "Os programas e as contas de revenda desta conta."
|
|
},
|
|
{
|
|
"name": "ai",
|
|
"x-displayName": "AI",
|
|
"x-displayName-pt": "IA",
|
|
"description": "Artificial intelligence: text, image, video and voice models, paid with credits. Chat is compatible with the OpenAI SDKs.",
|
|
"x-description-pt": "Inteligência artificial: modelos de texto, imagem, vídeo e voz, pagos com créditos. O chat é compatível com os SDK da OpenAI."
|
|
}
|
|
],
|
|
"x-permissions": {
|
|
"areas": [
|
|
"account",
|
|
"catalog",
|
|
"domains",
|
|
"dns",
|
|
"hosting",
|
|
"email",
|
|
"wordpress",
|
|
"vps",
|
|
"billing",
|
|
"support",
|
|
"extras",
|
|
"reseller",
|
|
"sms",
|
|
"ai",
|
|
"webhooks"
|
|
],
|
|
"levels": [
|
|
"read",
|
|
"write"
|
|
],
|
|
"dangerous": [
|
|
"domains:transfer_code",
|
|
"domains:owner_change",
|
|
"vps:reinstall",
|
|
"vps:restore",
|
|
"billing:pay",
|
|
"billing:purchase",
|
|
"services:cancel"
|
|
],
|
|
"description": "Each area has `:read` and `:write`. Dangerous permissions are separate and off by default. `billing:purchase` buys with credit: domains, plans, plan changes, credits and extras.",
|
|
"x-description-pt": "Cada área tem `:read` e `:write`. As permissões perigosas são separadas e vêm desligadas. `billing:purchase` compra com saldo: domínios, planos, mudanças de plano, créditos e extras."
|
|
},
|
|
"x-limits": {
|
|
"requests_per_minute_per_key": 90,
|
|
"requests_per_minute_per_ip_without_valid_key": 30,
|
|
"idempotency_window_hours": 24,
|
|
"max_keys_per_customer": 20,
|
|
"key_validity_days": [
|
|
30,
|
|
90,
|
|
365,
|
|
0
|
|
],
|
|
"max_request_body_bytes": 1048576
|
|
},
|
|
"paths": {
|
|
"/v1/ping": {
|
|
"get": {
|
|
"operationId": "ping.get",
|
|
"tags": [
|
|
"status"
|
|
],
|
|
"summary": "Check that the API is responding",
|
|
"description": "Answers without a key. Use it to test connectivity.",
|
|
"x-summary-pt": "Confirmar que a API responde",
|
|
"x-description-pt": "Responde sem chave. Serve para testar a ligação.",
|
|
"security": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The API is responding.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/PingResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"status": "ok",
|
|
"version": "v1",
|
|
"time": "2026-11-04T21:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/token": {
|
|
"get": {
|
|
"operationId": "token.get",
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "See the key in use",
|
|
"description": "Returns the permissions, validity and limits of the key that made the request. Any valid key can call it. The key itself is never returned.",
|
|
"x-summary-pt": "Ver a chave em uso",
|
|
"x-description-pt": "Devolve as permissões, a validade e os limites da chave que fez o pedido. Qualquer chave válida pode chamar. A chave em si nunca é devolvida.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "Data about the key.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TokenResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"name": "Example key",
|
|
"type": "sandbox",
|
|
"mode": "sandbox",
|
|
"writes_simulated": true,
|
|
"suffix": "AbCd",
|
|
"permissions": [
|
|
"dns:read"
|
|
],
|
|
"allowed_ips": [
|
|
"198.51.100.0/24"
|
|
],
|
|
"expires_at": "2027-02-02T10:00:00+02:00",
|
|
"created_at": "2026-11-04T10:00:00+02:00",
|
|
"last_used_at": "2026-11-04T21:30:00+02:00",
|
|
"rate_limit": {
|
|
"limit": 90,
|
|
"remaining": 89,
|
|
"reset": 1793820660,
|
|
"window_seconds": 60
|
|
},
|
|
"spending": {
|
|
"limit": 0,
|
|
"spent": 0,
|
|
"currency": "MZN",
|
|
"window_days": 30
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/limits": {
|
|
"get": {
|
|
"operationId": "limits.get",
|
|
"tags": [
|
|
"token"
|
|
],
|
|
"summary": "See the limits of the key",
|
|
"description": "Returns the requests left in the current minute and the spending limit of the key.",
|
|
"x-summary-pt": "Ver os limites da chave",
|
|
"x-description-pt": "Devolve os pedidos que restam no minuto actual e o limite de gastos da chave.",
|
|
"responses": {
|
|
"200": {
|
|
"description": "The limits of the key.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/LimitsResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"mode": "sandbox",
|
|
"requests": {
|
|
"limit": 90,
|
|
"remaining": 88,
|
|
"reset": 1793820660,
|
|
"window_seconds": 60
|
|
},
|
|
"unauthenticated_requests_per_minute": 30,
|
|
"spending": {
|
|
"limit": 500,
|
|
"spent": 120.5,
|
|
"currency": "MZN",
|
|
"window_days": 30
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"/v1/actions/{id}": {
|
|
"get": {
|
|
"operationId": "actions.get",
|
|
"tags": [
|
|
"actions"
|
|
],
|
|
"summary": "Follow a long-running operation",
|
|
"description": "Long operations answer `202` with an `action_id`. Use this operation to follow the result instead of repeating the request. Only actions of your own account can be seen.",
|
|
"x-summary-pt": "Acompanhar uma operação longa",
|
|
"x-description-pt": "As operações longas respondem `202` com um `action_id`. Use esta operação para ver o resultado, em vez de repetir o pedido. Só se vêem as acções da própria conta.",
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "The action_id received in the 202 answer.",
|
|
"x-description-pt": "O action_id recebido na resposta 202.",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
}
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The state of the action.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ActionResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"type": "example.operation",
|
|
"target": "example.com",
|
|
"status": "running",
|
|
"result": null,
|
|
"created_at": "2026-11-04T21:30:00+02:00",
|
|
"updated_at": "2026-11-04T21:30:05+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/openapi.json": {
|
|
"get": {
|
|
"operationId": "openapi.get",
|
|
"tags": [
|
|
"specification"
|
|
],
|
|
"summary": "Download this specification",
|
|
"description": "Answers without a key. Returns this OpenAPI document as it is, without the data and meta envelope.",
|
|
"x-summary-pt": "Descarregar esta especificação",
|
|
"x-description-pt": "Responde sem chave. Devolve este documento OpenAPI tal como está, sem o envelope data e meta.",
|
|
"security": [],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The OpenAPI document.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/messages": {
|
|
"post": {
|
|
"operationId": "sms.messages.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Send an SMS",
|
|
"x-summary-pt": "Enviar um SMS",
|
|
"description": "Needs `sms:write` and SMS active on the account. With a Sandbox key, or while the API is in preparation, the message is simulated: nothing is sent and no credits are used. With a Production key the message enters the queue and credits are taken from the SMS balance (the key spending limit, in currency, does not apply to these credits). Send `Idempotency-Key` so a retry never sends twice. Without `send_at` the message goes out right away and the answer brings its real status: `sent`, `failed`, or `queued` if it has to wait its turn. With `send_at` it stays `scheduled`: the balance is only checked now and the credits leave it when the message goes out (`charged` is `false` until then); if the balance is short at that time, the message is not sent and ends up `failed` with `error` set to `insufficient_credits`. A scheduled message can be cancelled with POST /v1/sms/messages/{id}/cancel.",
|
|
"x-description-pt": "Precisa de `sms:write` e do SMS activo na conta. Com uma chave de Sandbox, ou enquanto a API está em preparação, a mensagem é simulada: não sai nada e não se gastam créditos. Com uma chave de Produção, a mensagem entra na fila e os créditos saem do saldo de SMS (o limite de gastos da chave, em moeda, não se aplica a estes créditos). Envie `Idempotency-Key` para uma repetição nunca enviar duas vezes. Sem `send_at` a mensagem sai logo e a resposta traz o estado real: `sent`, `failed`, ou `queued` se tiver de esperar a vez. Com `send_at` fica `scheduled`: agora só se confere o saldo, e os créditos saem dele quando a mensagem sair (`charged` fica `false` até lá); se nessa hora o saldo não chegar, a mensagem não sai e fica `failed`, com `error` a `insufficient_credits`. Uma mensagem agendada pode ser cancelada com POST /v1/sms/messages/{id}/cancel.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"number",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "With or without the country code, spaces allowed: +258841234567, 258 84 123 4567 or 84 123 4567. Mozambican and Angolan mobile numbers are recognised on their own; any other number without a code uses the country of your account.",
|
|
"x-description-pt": "Com ou sem indicativo, e pode ter espaços: +258841234567, 258 84 123 4567 ou 84 123 4567. Os telemóveis de Moçambique e de Angola reconhecem-se sozinhos; qualquer outro sem indicativo segue o país da sua conta."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 1600
|
|
},
|
|
"sender": {
|
|
"type": "string",
|
|
"description": "Optional. An approved sender; if omitted, the free sender (see GET /v1/sms/senders).",
|
|
"x-description-pt": "Opcional. Um remetente aprovado; se faltar, o remetente grátis (veja GET /v1/sms/senders)."
|
|
},
|
|
"send_at": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "Optional. Schedules the message: ISO 8601 date and time with the time zone, such as `2026-11-20T09:30:00+02:00`. It must be in the future and at most 365 days from now. Without it, the message goes out right away.",
|
|
"x-description-pt": "Opcional. Agenda a mensagem: data e hora em ISO 8601 com o fuso horário, como `2026-11-20T09:30:00+02:00`. Tem de ser no futuro e, no máximo, daqui a 365 dias. Sem este campo, a mensagem sai logo."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"number": "+258841234567",
|
|
"text": "Your order is ready.",
|
|
"send_at": "2026-11-20T09:30:00+02:00"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"201": {
|
|
"description": "The message: sent, simulated, scheduled or waiting in the queue.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsMessageResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "412",
|
|
"status": "scheduled",
|
|
"simulated": false,
|
|
"to": "25884****567",
|
|
"sender": "NETMSG",
|
|
"parts": 1,
|
|
"encoding": "GSM",
|
|
"credits": 1.0,
|
|
"charged": false,
|
|
"mode": "production",
|
|
"error": null,
|
|
"scheduled_for": "2026-11-20T09:30:00+02:00",
|
|
"created_at": "2026-11-10T12:00:00+02:00",
|
|
"sent_at": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
},
|
|
"X-API-Simulated": {
|
|
"$ref": "#/components/headers/X-API-Simulated"
|
|
}
|
|
},
|
|
"x-description-pt": "A mensagem: enviada, simulada, agendada ou à espera na fila."
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/SmsResellerRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/IdempotencyConflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "sms.messages.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List sent messages",
|
|
"x-summary-pt": "Listar as mensagens enviadas",
|
|
"description": "Needs `sms:read`. The messages this account sent, newest first. Account notices and verification codes are not listed, and messages simulated with a Sandbox key are not either. The number comes masked. If a message fails, `error` is `delivery_failed`. `charged` says whether the credits already left the balance.",
|
|
"x-description-pt": "Precisa de `sms:read`. As mensagens que esta conta enviou, as mais recentes primeiro. Os avisos da conta e os códigos de verificação não aparecem, nem as mensagens simuladas com uma chave de Sandbox. O número vem tapado. Se uma mensagem falhar, `error` é `delivery_failed`. `charged` diz se os créditos já saíram do saldo.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"scheduled",
|
|
"queued",
|
|
"sending",
|
|
"sent",
|
|
"simulated",
|
|
"failed",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"description": "Only this status.",
|
|
"x-description-pt": "Só este estado."
|
|
},
|
|
{
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date"
|
|
},
|
|
"description": "First day, `YYYY-MM-DD`.",
|
|
"x-description-pt": "Primeiro dia, `AAAA-MM-DD`."
|
|
},
|
|
{
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date"
|
|
},
|
|
"description": "Last day, `YYYY-MM-DD`.",
|
|
"x-description-pt": "Último dia, `AAAA-MM-DD`."
|
|
},
|
|
{
|
|
"name": "number",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Only this number, with or without the country code.",
|
|
"x-description-pt": "Só este número, com ou sem indicativo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List sent messages.",
|
|
"x-description-pt": "Listar as mensagens enviadas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsMessagesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "128",
|
|
"status": "sent",
|
|
"simulated": false,
|
|
"to": "25884****567",
|
|
"sender": "NETMSG",
|
|
"text": "Your order is ready.",
|
|
"parts": 1,
|
|
"encoding": "GSM",
|
|
"credits": 1.0,
|
|
"campaign_id": null,
|
|
"error": null,
|
|
"scheduled_for": "2026-11-05T09:30:00+02:00",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"sent_at": "2026-11-05T09:30:04+02:00",
|
|
"charged": true
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/messages/{id}": {
|
|
"get": {
|
|
"operationId": "sms.messages.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "See one SMS",
|
|
"x-summary-pt": "Ver um SMS",
|
|
"description": "Needs `sms:read`. Simulated messages can only be seen with the key that created them.",
|
|
"x-description-pt": "Precisa de `sms:read`. As mensagens simuladas só se vêem com a chave que as criou.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when sending.",
|
|
"x-description-pt": "O `id` devolvido ao enviar."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The message.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsMessageResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "7f0c9d2e-3a51-4c7e-9b1a-2d4f6a8b0c11",
|
|
"status": "simulated",
|
|
"simulated": true,
|
|
"to": "25884****567",
|
|
"sender": "NETMSG",
|
|
"parts": 1,
|
|
"encoding": "GSM",
|
|
"would_cost": 1,
|
|
"mode": "sandbox",
|
|
"credits": 0,
|
|
"created_at": "2026-11-04T10:00:00+02:00",
|
|
"error": null,
|
|
"sent_at": null,
|
|
"charged": false,
|
|
"scheduled_for": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/SmsResellerRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/balance": {
|
|
"get": {
|
|
"operationId": "sms.balance.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "See the SMS balance",
|
|
"x-summary-pt": "Ver o saldo de SMS",
|
|
"description": "Needs `sms:read`. The balance is real in both modes.",
|
|
"x-description-pt": "Precisa de `sms:read`. O saldo é o verdadeiro nos dois modos.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Balance and daily limit.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsBalanceResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"balance": 50,
|
|
"unit": "credits",
|
|
"daily_limit": 200,
|
|
"sent_today": 3,
|
|
"mode": "sandbox",
|
|
"scheduled_credits": 0.0
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/SmsResellerRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/senders": {
|
|
"get": {
|
|
"operationId": "sms.senders.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List the SMS senders",
|
|
"x-summary-pt": "Listar os remetentes de SMS",
|
|
"description": "Needs `sms:read`. The free sender always comes first, with `free: true`.",
|
|
"x-description-pt": "Precisa de `sms:read`. O remetente grátis vem sempre em primeiro, com `free: true`.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The senders of this account.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsSendersResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"sender": "NETMSG",
|
|
"status": "approved",
|
|
"free": true
|
|
},
|
|
{
|
|
"sender": "MINHAEMPRESA",
|
|
"status": "pending",
|
|
"free": false
|
|
}
|
|
],
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/SmsResellerRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "sms.senders.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Request a sender",
|
|
"x-summary-pt": "Pedir um remetente",
|
|
"description": "Needs `sms:write`. Up to 11 letters, numbers and spaces, at most 30 in the account, one request per name and country. The registration fee is paid as in the account dashboard: the request is created as `payment_pending` and the response brings `payment_url`, the page where it is paid. Once paid, it moves to `documents_needed` and the entity documents are sent in the account dashboard. If the fee was already paid (a request rejected before refund), it goes straight to `documents_needed` and `payment_url` is null. The team then reviews it and registers it with the operators; approval depends on them. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. O nome tem até 11 caracteres, entre letras, números e espaços; cada conta tem até 30 remetentes, um pedido por nome e país. A taxa de registo paga-se como no painel da conta: o pedido nasce como `payment_pending` e a resposta traz o `payment_url`, a página onde se paga. Depois de pago passa a `documents_needed` e os documentos da entidade enviam-se no painel da conta. Se a taxa já estava paga (pedido recusado antes do reembolso), passa logo a `documents_needed` e o `payment_url` vem nulo. Depois a equipa analisa e regista-o junto das operadoras; a aprovação depende delas. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Request a sender.",
|
|
"x-description-pt": "Pedir um remetente.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsSendersCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"sender": "AMINHAMARCA",
|
|
"status": "payment_pending",
|
|
"free": false,
|
|
"entity": "My Company Ltd",
|
|
"country": "Moçambique",
|
|
"purpose": "Order updates for our customers.",
|
|
"sample": "Your order is ready.",
|
|
"note": null,
|
|
"documents": 0,
|
|
"documents_url": "https://my.example.com/sms-center.php?view=senders&language=portuguese¤cy=5",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00",
|
|
"simulated": false,
|
|
"payment_url": "https://my.example.com/onestep/checkout?v=3f9a1c2b7d4e5f60718293a4b5c6d7e8&language=english¤cy=1"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"sender",
|
|
"entity",
|
|
"country",
|
|
"tax_id",
|
|
"purpose",
|
|
"sample"
|
|
],
|
|
"properties": {
|
|
"sender": {
|
|
"type": "string",
|
|
"maxLength": 11
|
|
},
|
|
"entity": {
|
|
"type": "string",
|
|
"maxLength": 150
|
|
},
|
|
"country": {
|
|
"type": "string",
|
|
"enum": [
|
|
"MZ",
|
|
"AO",
|
|
"Mozambique",
|
|
"Angola",
|
|
"Moçambique"
|
|
],
|
|
"description": "Mozambique (`MZ`) or Angola (`AO`), by code or name.",
|
|
"x-description-pt": "Moçambique (`MZ`) ou Angola (`AO`), pelo código ou pelo nome."
|
|
},
|
|
"tax_id": {
|
|
"type": "string",
|
|
"maxLength": 30
|
|
},
|
|
"purpose": {
|
|
"type": "string",
|
|
"minLength": 10,
|
|
"maxLength": 500
|
|
},
|
|
"sample": {
|
|
"type": "string",
|
|
"minLength": 5,
|
|
"maxLength": 480
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"sender": "AMINHAMARCA",
|
|
"entity": "My Company Ltd",
|
|
"country": "MZ",
|
|
"tax_id": "123456789",
|
|
"purpose": "Order updates for our customers.",
|
|
"sample": "Your order is ready."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/account": {
|
|
"get": {
|
|
"operationId": "account.get",
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"summary": "See the account",
|
|
"x-summary-pt": "Ver a conta",
|
|
"description": "Needs `account:read`. Never returns passwords or card data.",
|
|
"x-description-pt": "Precisa de `account:read`. Nunca devolve senhas nem dados de cartão.",
|
|
"x-permission": "account:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the account.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AccountGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 35,
|
|
"first_name": "Ana",
|
|
"last_name": "Silva",
|
|
"company": "Example Ltd",
|
|
"email": "ana@example.com",
|
|
"phone": "+258.841234567",
|
|
"tax_id": "",
|
|
"address": {
|
|
"line1": "100 Main Street",
|
|
"line2": "",
|
|
"city": "Maputo",
|
|
"state": "Maputo",
|
|
"postcode": "1100",
|
|
"country": "MZ"
|
|
},
|
|
"currency": "MZN",
|
|
"language": "portuguese",
|
|
"status": "active",
|
|
"email_verified": true,
|
|
"created_at": "2026-01-15"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/account/contacts": {
|
|
"get": {
|
|
"operationId": "account.contacts.list",
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"summary": "List the contacts",
|
|
"x-summary-pt": "Listar os contactos",
|
|
"description": "Needs `account:read`. The contacts registered on the account.",
|
|
"x-description-pt": "Precisa de `account:read`. Os contactos registados na conta.",
|
|
"x-permission": "account:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the contacts.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AccountContactsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 7,
|
|
"first_name": "Rui",
|
|
"last_name": "Costa",
|
|
"company": "",
|
|
"email": "rui@example.com",
|
|
"phone": "+258.821234567",
|
|
"address": {
|
|
"line1": "100 Main Street",
|
|
"line2": "",
|
|
"city": "Maputo",
|
|
"state": "Maputo",
|
|
"postcode": "1100",
|
|
"country": "MZ"
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/account/users": {
|
|
"get": {
|
|
"operationId": "account.users.list",
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"summary": "List the users",
|
|
"x-summary-pt": "Listar os utilizadores",
|
|
"description": "Needs `account:read`. The people with access to the account. The owner comes first.",
|
|
"x-description-pt": "Precisa de `account:read`. As pessoas com acesso à conta. Primeiro vem o dono.",
|
|
"x-permission": "account:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the users.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AccountUsersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 35,
|
|
"first_name": "Ana",
|
|
"last_name": "Silva",
|
|
"email": "ana@example.com",
|
|
"owner": true,
|
|
"two_factor_enabled": false,
|
|
"permissions": [],
|
|
"last_login_at": "2026-11-04T09:30:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/catalog/products": {
|
|
"get": {
|
|
"operationId": "catalog.products.list",
|
|
"tags": [
|
|
"catalog"
|
|
],
|
|
"summary": "List the products",
|
|
"x-summary-pt": "Listar os produtos",
|
|
"description": "Needs `catalog:read`. Only what is on sale, with the prices of each billing cycle. `kind` says what the product is and `purchasable` whether it can be bought with POST /v1/services/purchase. The details, with the options and their prices, are in GET /v1/catalog/products/{id}. With a group discount (Reseller Program or another client group), prices come with the discount and the public ones in list_price (list_prices in the extensions); discount says the percentage.",
|
|
"x-description-pt": "Precisa de `catalog:read`. Só o que está à venda, com os preços de cada ciclo. `kind` diz o que é o produto e `purchasable` se se compra com POST /v1/services/purchase. O detalhe, com as opções e os preços delas, está em GET /v1/catalog/products/{id}. Com desconto de grupo (Programa de Revenda ou outro grupo de clientes), os preços vêm com o desconto e os públicos em list_price (list_prices nas extensões); discount diz a percentagem.",
|
|
"x-permission": "catalog:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Currency"
|
|
},
|
|
{
|
|
"name": "group_id",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only the products of this group.",
|
|
"x-description-pt": "Só os produtos deste grupo.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the products.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CatalogProductsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 38,
|
|
"name": "Pro Hosting",
|
|
"type": "hostingaccount",
|
|
"description": "",
|
|
"group": {
|
|
"id": 7,
|
|
"name": "Web Hosting"
|
|
},
|
|
"free": false,
|
|
"currency": "MZN",
|
|
"prices": [
|
|
{
|
|
"billing_cycle": "annually",
|
|
"price": 6336.0,
|
|
"setup_fee": 0.0
|
|
}
|
|
],
|
|
"kind": "hosting",
|
|
"purchasable": true
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/catalog/tlds": {
|
|
"get": {
|
|
"operationId": "catalog.tlds.list",
|
|
"tags": [
|
|
"catalog"
|
|
],
|
|
"summary": "List the domain extensions",
|
|
"x-summary-pt": "Listar as extensões de domínio",
|
|
"description": "Needs `catalog:read`. Register, renew and transfer prices per number of years. A number of years that is missing is not available. With a group discount (Reseller Program or another client group), prices come with the discount and the public ones in list_price (list_prices in the extensions); discount says the percentage.",
|
|
"x-description-pt": "Precisa de `catalog:read`. Preços de registo, renovação e transferência por número de anos. Um número de anos que não aparece não está disponível. Com desconto de grupo (Programa de Revenda ou outro grupo de clientes), os preços vêm com o desconto e os públicos em list_price (list_prices nas extensões); discount diz a percentagem.",
|
|
"x-permission": "catalog:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Currency"
|
|
},
|
|
{
|
|
"name": "extension",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only this extension, with or without the dot.",
|
|
"x-description-pt": "Só esta extensão, com ou sem o ponto.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "co.mz"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the domain extensions.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CatalogTldsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"extension": ".co.mz",
|
|
"currency": "MZN",
|
|
"register": {
|
|
"1": 1900.0,
|
|
"2": 3800.0
|
|
},
|
|
"renew": {
|
|
"1": 1900.0
|
|
},
|
|
"transfer": {
|
|
"1": 0.0
|
|
},
|
|
"features": {
|
|
"dns_management": true,
|
|
"email_forwarding": true,
|
|
"id_protection": false,
|
|
"transfer_code_required": true
|
|
},
|
|
"label": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/catalog/currencies": {
|
|
"get": {
|
|
"operationId": "catalog.currencies.list",
|
|
"tags": [
|
|
"catalog"
|
|
],
|
|
"summary": "List the currencies",
|
|
"x-summary-pt": "Listar as moedas",
|
|
"description": "Needs `catalog:read`. The currencies accepted on the `currency` parameter.",
|
|
"x-description-pt": "Precisa de `catalog:read`. As moedas aceites no parâmetro `currency`.",
|
|
"x-permission": "catalog:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the currencies.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CatalogCurrenciesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"code": "MZN",
|
|
"prefix": "",
|
|
"suffix": "MT",
|
|
"default": true
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/catalog/billing-cycles": {
|
|
"get": {
|
|
"operationId": "catalog.billing_cycles.list",
|
|
"tags": [
|
|
"catalog"
|
|
],
|
|
"summary": "List the billing cycles",
|
|
"x-summary-pt": "Listar os ciclos de pagamento",
|
|
"description": "Needs `catalog:read`. The names used on prices and services.",
|
|
"x-description-pt": "Precisa de `catalog:read`. Os nomes usados nos preços e nos serviços.",
|
|
"x-permission": "catalog:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the billing cycles.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CatalogBillingCyclesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"billing_cycle": "annually",
|
|
"months": 12
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains": {
|
|
"get": {
|
|
"operationId": "domains.list",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "List the domains",
|
|
"x-summary-pt": "Listar os domínios",
|
|
"description": "Needs `domains:read`. The domains of the account, the next to expire first.",
|
|
"x-description-pt": "Precisa de `domains:read`. Os domínios da conta, primeiro os próximos a expirar.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only results in this status.",
|
|
"x-description-pt": "Só os resultados neste estado.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"pending_registration",
|
|
"pending_transfer",
|
|
"active",
|
|
"grace",
|
|
"redemption",
|
|
"expired",
|
|
"transferred_away",
|
|
"cancelled",
|
|
"fraud"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the domains.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 41,
|
|
"domain": "example.co.mz",
|
|
"status": "active",
|
|
"type": "register",
|
|
"registered_at": "2026-02-01",
|
|
"expires_at": "2027-02-01",
|
|
"next_due_date": "2027-02-01",
|
|
"period_years": 1,
|
|
"renewal_amount": 1900.0,
|
|
"currency": "MZN",
|
|
"auto_renew": true,
|
|
"premium": false,
|
|
"features": {
|
|
"dns_management": true,
|
|
"email_forwarding": false,
|
|
"id_protection": false
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}": {
|
|
"get": {
|
|
"operationId": "domains.get",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "See a domain",
|
|
"x-summary-pt": "Ver um domínio",
|
|
"description": "Needs `domains:read`. By name or by `id`.",
|
|
"x-description-pt": "Precisa de `domains:read`. Pelo nome ou pelo `id`.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a domain.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"domain": "example.co.mz",
|
|
"status": "active",
|
|
"type": "register",
|
|
"registered_at": "2026-02-01",
|
|
"expires_at": "2027-02-01",
|
|
"next_due_date": "2027-02-01",
|
|
"period_years": 1,
|
|
"renewal_amount": 1900.0,
|
|
"currency": "MZN",
|
|
"auto_renew": true,
|
|
"premium": false,
|
|
"features": {
|
|
"dns_management": true,
|
|
"email_forwarding": false,
|
|
"id_protection": false
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services": {
|
|
"get": {
|
|
"operationId": "services.list",
|
|
"tags": [
|
|
"services"
|
|
],
|
|
"summary": "List the services",
|
|
"x-summary-pt": "Listar os serviços",
|
|
"description": "Needs `hosting:read`. All the services of the account, the newest first. While a service is unpaid, `domain` and `username` may come as `null`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Todos os serviços da conta, primeiro os mais recentes. Enquanto um serviço está por pagar, `domain` e `username` podem vir a `null`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only results in this status.",
|
|
"x-description-pt": "Só os resultados neste estado.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"active",
|
|
"suspended",
|
|
"terminated",
|
|
"cancelled",
|
|
"fraud",
|
|
"completed"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the services.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 88,
|
|
"product": {
|
|
"id": 12,
|
|
"name": "Business Plan",
|
|
"group": "Hosting",
|
|
"type": "hostingaccount"
|
|
},
|
|
"domain": "example.co.mz",
|
|
"username": "example88",
|
|
"dedicated_ip": null,
|
|
"status": "active",
|
|
"suspension_reason": null,
|
|
"billing_cycle": "annually",
|
|
"amount": 3600.0,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"registered_at": "2026-02-01",
|
|
"next_due_date": "2027-02-01",
|
|
"terminated_at": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}": {
|
|
"get": {
|
|
"operationId": "services.get",
|
|
"tags": [
|
|
"services"
|
|
],
|
|
"summary": "See a service",
|
|
"x-summary-pt": "Ver um serviço",
|
|
"description": "Needs `hosting:read`. Never returns passwords.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Nunca devolve senhas.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the service.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a service.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 88,
|
|
"product": {
|
|
"id": 12,
|
|
"name": "Business Plan",
|
|
"group": "Hosting",
|
|
"type": "hostingaccount"
|
|
},
|
|
"domain": "example.co.mz",
|
|
"username": "example88",
|
|
"dedicated_ip": null,
|
|
"status": "active",
|
|
"suspension_reason": null,
|
|
"billing_cycle": "annually",
|
|
"amount": 3600.0,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"registered_at": "2026-02-01",
|
|
"next_due_date": "2027-02-01",
|
|
"terminated_at": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/invoices": {
|
|
"get": {
|
|
"operationId": "invoices.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "List the invoices",
|
|
"x-summary-pt": "Listar as facturas",
|
|
"description": "Needs `billing:read`. The newest first. `total` includes what was paid with credit; `balance_due` is what is still to pay.",
|
|
"x-description-pt": "Precisa de `billing:read`. Primeiro as mais recentes. `total` inclui o que foi pago com saldo; `balance_due` é o que falta pagar.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only results in this status.",
|
|
"x-description-pt": "Só os resultados neste estado.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"unpaid",
|
|
"paid",
|
|
"cancelled",
|
|
"refunded",
|
|
"collections",
|
|
"payment_pending"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the invoices.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoicesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 1042,
|
|
"number": "0542/2026",
|
|
"status": "unpaid",
|
|
"date": "2026-11-01",
|
|
"due_date": "2026-11-15",
|
|
"paid_at": null,
|
|
"subtotal": 3600.0,
|
|
"tax": 0.0,
|
|
"credit_applied": 100.0,
|
|
"total": 3600.0,
|
|
"balance_due": 3500.0,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"url": "https://my.example.com/viewinvoice.php?id=1042&language=portuguese¤cy=1"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/invoices/{id}": {
|
|
"get": {
|
|
"operationId": "invoices.get",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "See an invoice",
|
|
"x-summary-pt": "Ver uma factura",
|
|
"description": "Needs `billing:read`. With the lines of the invoice.",
|
|
"x-description-pt": "Precisa de `billing:read`. Com as linhas da factura.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the invoice.",
|
|
"x-description-pt": "O `id` da factura."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an invoice.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoicesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 1042,
|
|
"number": "0542/2026",
|
|
"status": "unpaid",
|
|
"date": "2026-11-01",
|
|
"due_date": "2026-11-15",
|
|
"paid_at": null,
|
|
"subtotal": 3600.0,
|
|
"tax": 0.0,
|
|
"credit_applied": 100.0,
|
|
"total": 3600.0,
|
|
"balance_due": 3500.0,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"url": "https://my.example.com/viewinvoice.php?id=1042&language=portuguese¤cy=1",
|
|
"items": [
|
|
{
|
|
"id": 5,
|
|
"type": "Hosting",
|
|
"related_id": 88,
|
|
"description": "Business Plan (01/11/2026 - 31/10/2027)",
|
|
"amount": 3600.0,
|
|
"taxed": false
|
|
}
|
|
],
|
|
"notes": ""
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/billing/credit": {
|
|
"get": {
|
|
"operationId": "billing.credit.get",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "See the credit",
|
|
"x-summary-pt": "Ver o saldo",
|
|
"description": "Needs `billing:read`. The credit available on the account.",
|
|
"x-description-pt": "Precisa de `billing:read`. O saldo disponível na conta.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the credit.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BillingCreditGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"balance": 250.0,
|
|
"currency": "MZN"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/billing/transactions": {
|
|
"get": {
|
|
"operationId": "billing.transactions.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "List the transactions",
|
|
"x-summary-pt": "Listar as transacções",
|
|
"description": "Needs `billing:read`. The payments and refunds of the account, the newest first.",
|
|
"x-description-pt": "Precisa de `billing:read`. Os pagamentos e devoluções da conta, primeiro os mais recentes.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the transactions.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/BillingTransactionsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 300,
|
|
"date": "2026-11-02T10:15:00+02:00",
|
|
"description": "Payment for invoice 0542/2026",
|
|
"amount_in": 3500.0,
|
|
"amount_out": 0.0,
|
|
"currency": "MZN",
|
|
"invoice_id": 1042,
|
|
"payment_method": "M-Pesa",
|
|
"transaction_id": "ABC123"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tickets": {
|
|
"get": {
|
|
"operationId": "tickets.list",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "List the tickets",
|
|
"x-summary-pt": "Listar os tickets",
|
|
"description": "Needs `support:read`. The most recent replies first. The `status` values are the slugs of the status names, such as `open`, `answered` and `closed`.",
|
|
"x-description-pt": "Precisa de `support:read`. Primeiro os que têm a resposta mais recente. Os valores de `status` são os nomes dos estados, como `open`, `answered` e `closed`.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Only tickets in this status.",
|
|
"x-description-pt": "Só os tickets neste estado.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "open"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the tickets.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "482913",
|
|
"subject": "Question about email",
|
|
"status": "answered",
|
|
"priority": "medium",
|
|
"department": {
|
|
"id": 2,
|
|
"name": "Technical Support"
|
|
},
|
|
"unread": false,
|
|
"created_at": "2026-11-03T08:00:00+02:00",
|
|
"last_reply_at": "2026-11-03T09:00:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "tickets.create",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Open a ticket",
|
|
"x-summary-pt": "Abrir um ticket",
|
|
"description": "Needs `support:write`. The ticket stays in the name of the account. Needs the `Idempotency-Key` header. Limited to 10 per hour per account. A department that asks for extra data answers `422` with `department_portal_only`: use the account dashboard. In Sandbox, `id` is `null`.",
|
|
"x-description-pt": "Precisa de `support:write`. O ticket fica em nome da conta. Precisa do cabeçalho `Idempotency-Key`. Limite de 10 por hora por conta. Um departamento que peça dados extra responde `422` com `department_portal_only`: use o painel da conta. Em Sandbox, `id` é `null`.",
|
|
"x-permission": "support:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Open a ticket.",
|
|
"x-description-pt": "Abrir um ticket.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "731942",
|
|
"subject": "Help with the plan",
|
|
"status": "open",
|
|
"priority": "medium",
|
|
"department": {
|
|
"id": 1,
|
|
"name": "Technical Department"
|
|
},
|
|
"unread": false,
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"last_reply_at": "2026-11-05T09:30:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"department_id",
|
|
"subject",
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"department_id": {
|
|
"type": "integer"
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 200
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 20000
|
|
},
|
|
"priority": {
|
|
"type": "string",
|
|
"enum": [
|
|
"low",
|
|
"medium",
|
|
"high"
|
|
],
|
|
"default": "medium"
|
|
},
|
|
"service_id": {
|
|
"type": "integer",
|
|
"description": "A service of the account this ticket is about.",
|
|
"x-description-pt": "Um serviço da conta a que o ticket diz respeito."
|
|
},
|
|
"domain_id": {
|
|
"type": "integer",
|
|
"description": "A domain of the account. Use it instead of `service_id`.",
|
|
"x-description-pt": "Um domínio da conta. Use-o em vez de `service_id`."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"department_id": 1,
|
|
"subject": "Help with the plan",
|
|
"message": "I need help with my plan."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tickets/{id}": {
|
|
"get": {
|
|
"operationId": "tickets.get",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "See a ticket",
|
|
"x-summary-pt": "Ver um ticket",
|
|
"description": "Needs `support:read`. With all the messages, the oldest first. Attachments come by name only.",
|
|
"x-description-pt": "Precisa de `support:read`. Com todas as mensagens, primeiro as mais antigas. Dos anexos, vem só o nome.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The number of the ticket.",
|
|
"x-description-pt": "O número do ticket."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a ticket.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "482913",
|
|
"subject": "Question about email",
|
|
"status": "answered",
|
|
"priority": "medium",
|
|
"department": {
|
|
"id": 2,
|
|
"name": "Technical Support"
|
|
},
|
|
"unread": false,
|
|
"created_at": "2026-11-03T08:00:00+02:00",
|
|
"last_reply_at": "2026-11-03T09:00:00+02:00",
|
|
"messages": [
|
|
{
|
|
"id": "ticket",
|
|
"from": "client",
|
|
"author": "Ana Silva",
|
|
"message": "Hello. How do I set up my email?",
|
|
"attachments": [],
|
|
"created_at": "2026-11-03T08:00:00+02:00"
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/support/departments": {
|
|
"get": {
|
|
"operationId": "support.departments.list",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "List the departments",
|
|
"x-summary-pt": "Listar os departamentos",
|
|
"description": "Needs `support:read`. The departments that can receive tickets.",
|
|
"x-description-pt": "Precisa de `support:read`. Os departamentos que podem receber tickets.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the departments.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SupportDepartmentsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 2,
|
|
"name": "Technical Support",
|
|
"description": ""
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/whois": {
|
|
"get": {
|
|
"operationId": "whois.list",
|
|
"tags": [
|
|
"whois"
|
|
],
|
|
"summary": "Look up several domain names (WHOIS)",
|
|
"x-summary-pt": "Consultar o WHOIS de vários domínios",
|
|
"description": "Free, up to 10 domains per request, with or without a key. Each domain counts 1 in the hourly limit. Same fields as the single lookup, without alternatives, registrar_contact, dnssec and contacts. A name with a problem comes with status error in its place and does not stop the others.",
|
|
"x-description-pt": "Gratuita, até 10 domínios por pedido, com ou sem chave. Cada domínio conta 1 no limite por hora. Os mesmos campos da consulta de um só, sem alternatives, registrar_contact, dnssec e contacts. Um nome com problema vem com status error no seu lugar e não pára os outros.",
|
|
"security": [],
|
|
"parameters": [
|
|
{
|
|
"name": "domains",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "Up to 10 domain names, separated by commas.",
|
|
"x-description-pt": "Até 10 nomes de domínio, separados por vírgulas.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "example.co.mz,example.com"
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Optional. One of the brand currencies, such as USD. Without it: the currency of the account (with a key) or the brand currency. Another code returns 422 with the accepted ones in details.allowed.",
|
|
"x-description-pt": "Opcional. Uma das moedas da marca, como USD. Sem ela: a moeda da conta (com chave) ou a da marca. Outro código dá 422 com as aceites em details.allowed.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "USD"
|
|
},
|
|
{
|
|
"name": "language",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Optional. pt or en: the language of the website links and the free plan name, when the brand has that combination.",
|
|
"x-description-pt": "Opcional. pt ou en: a língua dos links do site e do nome do plano grátis, quando a marca tem essa combinação.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
]
|
|
},
|
|
"example": "en"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The WHOIS of each domain, in the order asked.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"domain": "example.co.mz",
|
|
"extension": ".co.mz",
|
|
"available": true,
|
|
"status": "available",
|
|
"timezone": "Africa/Maputo",
|
|
"checked_at": "2026-11-25T08:48:11+02:00",
|
|
"price": {
|
|
"currency": "MZN",
|
|
"register": 2500.0,
|
|
"renew": 2500.0,
|
|
"transfer": 2500.0,
|
|
"period": "1 year",
|
|
"premium": false
|
|
}
|
|
},
|
|
{
|
|
"domain": "example.xyz",
|
|
"status": "error",
|
|
"error": {
|
|
"code": "validation_failed",
|
|
"message": "This extension is not available.",
|
|
"details": {
|
|
"field": "domain",
|
|
"reason": "extension_not_supported"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"count": 2,
|
|
"currency": "MZN"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/whois/{domain}": {
|
|
"get": {
|
|
"operationId": "whois.get",
|
|
"tags": [
|
|
"whois"
|
|
],
|
|
"summary": "Look up a domain name (WHOIS)",
|
|
"x-summary-pt": "Consultar o WHOIS de um domínio",
|
|
"description": "Free. Works without a key: 60 per hour per IP. With a key of the account (any permission, Sandbox or Production): 1,000 per hour per account (resellers: 10,000). Shows all the data the public WHOIS has. The price can come in any currency of the brand (currency), also without an account.",
|
|
"x-description-pt": "Gratuita. Funciona sem chave: 60 por hora por IP. Com uma chave da conta (qualquer permissão, Sandbox ou Produção): 1.000 por hora por conta (revenda: 10.000). Mostra todos os dados que o WHOIS público tem. O preço pode vir em qualquer moeda da marca (currency), também sem conta.",
|
|
"security": [],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "The domain name.",
|
|
"x-description-pt": "O nome de domínio.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "example.co.mz"
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Optional. One of the brand currencies, such as USD. Without it: the currency of the account (with a key) or the brand currency. Another code returns 422 with the accepted ones in details.allowed.",
|
|
"x-description-pt": "Opcional. Uma das moedas da marca, como USD. Sem ela: a moeda da conta (com chave) ou a da marca. Outro código dá 422 com as aceites em details.allowed.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "USD"
|
|
},
|
|
{
|
|
"name": "language",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Optional. pt or en: the language of the website links and the free plan name, when the brand has that combination.",
|
|
"x-description-pt": "Opcional. pt ou en: a língua dos links do site e do nome do plano grátis, quando a marca tem essa combinação.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
]
|
|
},
|
|
"example": "en"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The WHOIS of the domain.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"extension": {
|
|
"type": "string"
|
|
},
|
|
"available": {
|
|
"type": "boolean",
|
|
"nullable": true,
|
|
"description": "true when free; null when it could not be confirmed.",
|
|
"x-description-pt": "true quando está livre; null quando não foi possível confirmar."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"available",
|
|
"registered",
|
|
"unknown",
|
|
"not_allowed"
|
|
]
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"checked_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"registration": {
|
|
"type": "object",
|
|
"description": "Only when registered: dates, status, nameservers, age, days until expiry, DNSSEC, the company where it is registered with its contacts and abuse contact, and the holder, admin and tech contacts when the registry publishes them.",
|
|
"x-description-pt": "Só quando está registado: datas, estado, nameservers, idade, dias até expirar, DNSSEC, a empresa onde está registado com os contactos e o contacto de abuso, e os contactos do titular, administrativo e técnico quando o registo os publica."
|
|
},
|
|
"price": {
|
|
"type": "object",
|
|
"description": "1-year register, renew and transfer price in the brand currency, with formatted, and prices: register and renew per number of years (only the years with a price), as in domains.availability. Premium names: premium true; names with their own registry price come with empty prices and quote_required true (ask us for a quote).",
|
|
"x-description-pt": "Preço de 1 ano de registo, renovação e transferência na moeda da marca, com formatted, e prices: registo e renovação por número de anos (só os anos com preço), como no domains.availability. Nomes premium: premium true; os nomes com preço próprio do registo vêm com os preços vazios e quote_required true (peça-nos cotação)."
|
|
},
|
|
"register_url": {
|
|
"type": "string",
|
|
"description": "Opens the registration on the website (when free).",
|
|
"x-description-pt": "Abre o registo no site (quando está livre)."
|
|
},
|
|
"transfer_url": {
|
|
"type": "string",
|
|
"description": "Opens the transfer (when registered).",
|
|
"x-description-pt": "Abre a transferência (quando está registado)."
|
|
},
|
|
"alternatives": {
|
|
"type": "array",
|
|
"description": "Up to 4 similar free names, with price and register_url.",
|
|
"x-description-pt": "Até 4 nomes parecidos livres, com preço e register_url.",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"extension": ".co.mz",
|
|
"available": false,
|
|
"status": "registered",
|
|
"timezone": "Africa/Maputo",
|
|
"registration": {
|
|
"created": "2022-05-09T14:32:00+02:00",
|
|
"updated": "2026-11-24T13:52:00+02:00",
|
|
"expires": "2027-05-09T14:32:00+02:00",
|
|
"domain_status": [
|
|
"active",
|
|
"clientTransferProhibited"
|
|
],
|
|
"nameservers": [
|
|
"ns1.example.co.mz",
|
|
"ns2.example.co.mz"
|
|
],
|
|
"age": {
|
|
"years": 4,
|
|
"months": 6,
|
|
"days": 15,
|
|
"total_days": 1660
|
|
},
|
|
"days_until_expiry": 165,
|
|
"dnssec": "unsigned"
|
|
},
|
|
"checked_at": "2026-11-25T08:48:11+02:00",
|
|
"price": {
|
|
"currency": "MZN",
|
|
"register": 2500.0,
|
|
"renew": 2500.0,
|
|
"transfer": 2500.0,
|
|
"prices": [
|
|
{
|
|
"years": 1,
|
|
"register": 2500.0,
|
|
"renew": 2500.0
|
|
},
|
|
{
|
|
"years": 2,
|
|
"register": 5000.0,
|
|
"renew": 5000.0
|
|
}
|
|
],
|
|
"period": "1 year",
|
|
"premium": false
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/availability": {
|
|
"get": {
|
|
"operationId": "domains.availability",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Check a domain name",
|
|
"x-summary-pt": "Consultar um nome de domínio",
|
|
"description": "Needs `domains:read`. Limited to 30 per minute. `unknown` means the answer could not be confirmed. `portal_only` means this name is handled in the account dashboard. `prices` lists the register and renew price for each number of years, from 1 to 10 (only the years with a price). With a group discount (Reseller Program or another client group), prices come with the discount and the public ones in list_price (list_prices in the extensions); discount says the percentage.",
|
|
"x-description-pt": "Precisa de `domains:read`. Limite de 30 por minuto. `unknown` quer dizer que não foi possível confirmar. `portal_only` quer dizer que este nome se trata no painel da conta. `prices` traz o preço de registo e de renovação por número de anos, de 1 a 10 (só os anos com preço). Com desconto de grupo (Programa de Revenda ou outro grupo de clientes), os preços vêm com o desconto e os públicos em list_price (list_prices nas extensões); discount diz a percentagem.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": true,
|
|
"description": "The domain name.",
|
|
"x-description-pt": "O nome de domínio.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "example.co.mz"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Check a domain name.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsAvailabilityResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"extension": ".co.mz",
|
|
"status": "available",
|
|
"available": true,
|
|
"one_year_price": {
|
|
"register": 1900.0,
|
|
"renew": 1900.0,
|
|
"transfer": 1900.0
|
|
},
|
|
"prices": [
|
|
{
|
|
"years": 1,
|
|
"register": 1900.0,
|
|
"renew": 1900.0
|
|
},
|
|
{
|
|
"years": 2,
|
|
"register": 3800.0,
|
|
"renew": 3800.0
|
|
}
|
|
],
|
|
"currency": "MZN",
|
|
"portal_only": false,
|
|
"portal_reason": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/register": {
|
|
"post": {
|
|
"operationId": "domains.register",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Register a domain",
|
|
"x-summary-pt": "Registar um domínio",
|
|
"description": "Needs `billing:purchase`. Also needs `domains:write` and the `Idempotency-Key` header. Paid with credit only, within the spending limit of the key. Answers `202`: follow it with `GET /v1/actions/{id}`. Limited to 5 per minute. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `domains:write` e do cabeçalho `Idempotency-Key`. Paga-se só com saldo, dentro do limite de gastos da chave. Responde `202`: acompanhe com `GET /v1/actions/{id}`. Limite de 5 por minuto. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Register a domain.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsRegisterResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "simulated",
|
|
"simulated": true,
|
|
"domain": "example.co.mz",
|
|
"years": 1,
|
|
"amount": 1900.0,
|
|
"currency": "MZN",
|
|
"credit_sufficient": true,
|
|
"within_spending_limit": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"domain"
|
|
],
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"years": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 10,
|
|
"default": 1,
|
|
"description": "Number of years, from 1 to 10. Without it, 1 year. Also accepted in quotes (\"2\"). If the extension has no price for that many years, it answers `422` with `period_not_available`.",
|
|
"x-description-pt": "Número de anos, de 1 a 10. Sem ele, fica 1 ano. Também se aceita entre aspas (\"2\"). Se a extensão não tiver preço para esse número de anos, responde `422` com `period_not_available`."
|
|
},
|
|
"nameservers": {
|
|
"description": "Optional, 2 to 5. Without them, the domain gets our nameservers.",
|
|
"x-description-pt": "Opcional, de 2 a 5. Sem eles, o domínio fica com os nossos nameservers.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 5
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
},
|
|
"locked": {
|
|
"type": "boolean",
|
|
"default": true,
|
|
"description": "Transfer lock at the registry. Without it, it stays on (true). Send false to register it unlocked.",
|
|
"x-description-pt": "Bloqueio de transferência no registo. Sem ele, fica ligado (true). Envie false para registar sem bloqueio."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"domain": "example.co.mz",
|
|
"years": 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/transfer": {
|
|
"post": {
|
|
"operationId": "domains.transfer",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Transfer a domain to us",
|
|
"x-summary-pt": "Transferir um domínio para nós",
|
|
"description": "Needs `billing:purchase`. Also needs `domains:write` and the `Idempotency-Key` header. Paid with credit only, within the spending limit of the key. Answers `202`: follow it with `GET /v1/actions/{id}`. Limited to 5 per minute. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `domains:write` e do cabeçalho `Idempotency-Key`. Paga-se só com saldo, dentro do limite de gastos da chave. Responde `202`: acompanhe com `GET /v1/actions/{id}`. Limite de 5 por minuto. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Transfer a domain to us.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsTransferResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "simulated",
|
|
"simulated": true,
|
|
"domain": "example.co.mz",
|
|
"years": 1,
|
|
"amount": 1900.0,
|
|
"currency": "MZN",
|
|
"credit_sufficient": true,
|
|
"within_spending_limit": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"domain",
|
|
"transfer_code"
|
|
],
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"transfer_code": {
|
|
"type": "string",
|
|
"maxLength": 128
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"domain": "example.com",
|
|
"transfer_code": "CODIGO-DO-DOMINIO"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/renew": {
|
|
"post": {
|
|
"operationId": "domains.renew",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Renew a domain",
|
|
"x-summary-pt": "Renovar um domínio",
|
|
"description": "Needs `billing:purchase`. Also needs `domains:write` and the `Idempotency-Key` header. Paid with credit only, within the spending limit of the key. Answers `202`: follow it with `GET /v1/actions/{id}`. Limited to 5 per minute. If there is already an unpaid invoice for the domain, it answers `409` with `invoice_id`. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `domains:write` e do cabeçalho `Idempotency-Key`. Paga-se só com saldo, dentro do limite de gastos da chave. Responde `202`: acompanhe com `GET /v1/actions/{id}`. Limite de 5 por minuto. Se já houver uma factura por pagar para o domínio, responde `409` com `invoice_id`. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Renew a domain.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsRenewResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "simulated",
|
|
"simulated": true,
|
|
"domain": "example.co.mz",
|
|
"years": 1,
|
|
"amount": 1900.0,
|
|
"currency": "MZN",
|
|
"credit_sufficient": true,
|
|
"within_spending_limit": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"years": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 10,
|
|
"default": 1,
|
|
"description": "Number of years, from 1 to 10. Without it, 1 year. Also accepted in quotes (\"2\"). If the extension has no price for that many years, it answers `422` with `period_not_available`. The domain cannot be valid for more than 10 years.",
|
|
"x-description-pt": "Número de anos, de 1 a 10. Sem ele, fica 1 ano. Também se aceita entre aspas (\"2\"). Se a extensão não tiver preço para esse número de anos, responde `422` com `period_not_available`. O domínio não pode ficar com mais de 10 anos de validade."
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"years": 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/nameservers": {
|
|
"get": {
|
|
"operationId": "domains.nameservers.get",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "See the nameservers",
|
|
"x-summary-pt": "Ver os nameservers",
|
|
"description": "Needs `domains:read`. Reads them from the registry. Limit: 30 per minute, per account. The answer can come from a copy up to 60 seconds old, which does not count towards the limit.",
|
|
"x-description-pt": "Precisa de `domains:read`. Lê-os no registo do domínio. Limite: 30 por minuto, por conta. A resposta pode vir de uma cópia com até 60 segundos, que não conta para o limite.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the nameservers.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsNameserversGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"nameservers": [
|
|
"ns1.example.com",
|
|
"ns2.example.com"
|
|
],
|
|
"uses_our_nameservers": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "domains.nameservers.update",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Change the nameservers",
|
|
"x-summary-pt": "Mudar os nameservers",
|
|
"description": "Needs `domains:write`. From 2 to 5. Limited to 20 changes per minute. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `domains:write`. Indique de 2 a 5 nameservers. Limite de 20 alterações por minuto. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "domains:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the nameservers.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsNameserversUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"nameservers": [
|
|
"ns1.example.com",
|
|
"ns2.example.com"
|
|
],
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"nameservers"
|
|
],
|
|
"properties": {
|
|
"nameservers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"minItems": 2,
|
|
"maxItems": 5
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"nameservers": [
|
|
"ns1.example.com",
|
|
"ns2.example.com"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/lock": {
|
|
"get": {
|
|
"operationId": "domains.lock.get",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "See the transfer lock",
|
|
"x-summary-pt": "Ver o bloqueio de transferência",
|
|
"description": "Needs `domains:read`. `null` means the registry does not say. Limit: 30 per minute, per account. The answer can come from a copy up to 60 seconds old, which does not count towards the limit.",
|
|
"x-description-pt": "Precisa de `domains:read`. `null` quer dizer que o registo do domínio não informa. Limite: 30 por minuto, por conta. A resposta pode vir de uma cópia com até 60 segundos, que não conta para o limite.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the transfer lock.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsLockGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"locked": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "domains.lock.update",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Change the transfer lock",
|
|
"x-summary-pt": "Mudar o bloqueio de transferência",
|
|
"description": "Needs `domains:write`. Turns the lock on or off.",
|
|
"x-description-pt": "Precisa de `domains:write`. Liga ou desliga o bloqueio.",
|
|
"x-permission": "domains:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the transfer lock.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsLockUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"locked": true,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"locked"
|
|
],
|
|
"properties": {
|
|
"locked": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"locked": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/auto-renew": {
|
|
"put": {
|
|
"operationId": "domains.auto_renew.update",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Change auto-renewal",
|
|
"x-summary-pt": "Mudar a renovação automática",
|
|
"description": "Needs `domains:write`. Turns the renewal invoices of the domain on or off.",
|
|
"x-description-pt": "Precisa de `domains:write`. Liga ou desliga a emissão das facturas de renovação do domínio.",
|
|
"x-permission": "domains:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change auto-renewal.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsAutoRenewUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"auto_renew": true,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"auto_renew"
|
|
],
|
|
"properties": {
|
|
"auto_renew": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"auto_renew": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/contacts": {
|
|
"get": {
|
|
"operationId": "domains.contacts.get",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "See the domain contacts",
|
|
"x-summary-pt": "Ver os contactos do domínio",
|
|
"description": "Needs `domains:read`. As the registry has them. The fields depend on the extension. Limit: 30 per minute, per account. Always read live.",
|
|
"x-description-pt": "Precisa de `domains:read`. Como estão no registo do domínio. Os campos dependem da extensão. Limite: 30 por minuto, por conta. Lidos sempre na hora.",
|
|
"x-permission": "domains:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the domain contacts.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsContactsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"contacts": {
|
|
"Registrant": {
|
|
"Full Name": "Ana Silva",
|
|
"Email": "ana@example.com"
|
|
}
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/transfer-code": {
|
|
"post": {
|
|
"operationId": "domains.transfer_code.request",
|
|
"tags": [
|
|
"domains"
|
|
],
|
|
"summary": "Request the transfer code",
|
|
"x-summary-pt": "Pedir o código de transferência",
|
|
"description": "Needs `domains:transfer_code`. The code never comes in the response: it goes to the email of the account or of the domain owner. Limited to 3 per hour.",
|
|
"x-description-pt": "Precisa de `domains:transfer_code`. O código nunca vem na resposta: vai para o e-mail da conta ou do titular. Limite de 3 por hora.",
|
|
"x-permission": "domains:transfer_code",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Request the transfer code.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DomainsTransferCodeRequestResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"status": "simulated",
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"confirm"
|
|
],
|
|
"properties": {
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The domain name, to confirm.",
|
|
"x-description-pt": "O nome do domínio, para confirmar."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"confirm": "example.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns": {
|
|
"get": {
|
|
"operationId": "dns.records.list",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "List the DNS records",
|
|
"x-summary-pt": "Listar os registos DNS",
|
|
"description": "Needs `dns:read`. `read_only` marks the records that cannot be changed. Limit: 30 per minute, per account. The answer can come from a copy up to 60 seconds old, which does not count towards the limit.",
|
|
"x-description-pt": "Precisa de `dns:read`. `read_only` marca os registos que não se podem alterar. Limite: 30 por minuto, por conta. A resposta pode vir de uma cópia com até 60 segundos, que não conta para o limite.",
|
|
"x-permission": "dns:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the DNS records.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsRecordsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "3f2a91c07d11e4b6",
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400,
|
|
"priority": 0,
|
|
"read_only": false
|
|
}
|
|
],
|
|
"meta": {
|
|
"domain": "example.co.mz",
|
|
"dns_enabled": true,
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "dns.records.create",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Add a DNS record",
|
|
"x-summary-pt": "Adicionar um registo DNS",
|
|
"description": "Needs `dns:write`. A copy of the zone is kept before each change. In a `TXT` record, quotes around the whole value are removed, and quotes or backslashes inside it are refused with `422`. The response shows what stayed in the zone: an `AAAA` address comes in its short form. A CNAME cannot share its name with other records: it answers `409` with `cname_conflict`. If it touches the MX records, or the names they point to, of the domain of the account email or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `dns:write`. Fica uma cópia da zona antes de cada alteração. Num registo `TXT`, as aspas à volta de todo o valor saem, e aspas ou barras invertidas no meio são recusadas com `422`. A resposta mostra o que ficou na zona: um endereço `AAAA` vem na forma curta. Um CNAME não pode ficar com outros registos no mesmo nome: responde `409` com `cname_conflict`. Se mexer nos MX, ou nos nomes para onde apontam, do domínio do e-mail da conta ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "dns:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Add a DNS record.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsRecordsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "3f2a91c07d11e4b6",
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400,
|
|
"priority": 0,
|
|
"read_only": false,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"type",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name, such as `www`. Use `@` for the domain itself.",
|
|
"x-description-pt": "O nome, como `www`. Use `@` para o próprio domínio."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"A",
|
|
"AAAA",
|
|
"CNAME",
|
|
"MX",
|
|
"TXT",
|
|
"NS",
|
|
"SRV",
|
|
"CAA"
|
|
]
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "SRV: `weight port target`. CAA: `tag value`.",
|
|
"x-description-pt": "SRV: `weight port target`. CAA: `tag value`."
|
|
},
|
|
"ttl": {
|
|
"type": "integer",
|
|
"minimum": 60,
|
|
"maximum": 604800,
|
|
"default": 14400
|
|
},
|
|
"priority": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535,
|
|
"default": 0,
|
|
"description": "For MX and SRV. On CAA it is the flag.",
|
|
"x-description-pt": "Para MX e SRV. No CAA é a flag."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns/validate": {
|
|
"post": {
|
|
"operationId": "dns.records.validate",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Check a DNS record",
|
|
"x-summary-pt": "Validar um registo DNS",
|
|
"description": "Needs `dns:read`. Checks the record without saving anything.",
|
|
"x-description-pt": "Precisa de `dns:read`. Confere o registo sem gravar nada.",
|
|
"x-permission": "dns:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Check a DNS record.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsRecordsValidateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"valid": true,
|
|
"record": {
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400,
|
|
"priority": 0
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"type",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name, such as `www`. Use `@` for the domain itself.",
|
|
"x-description-pt": "O nome, como `www`. Use `@` para o próprio domínio."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"A",
|
|
"AAAA",
|
|
"CNAME",
|
|
"MX",
|
|
"TXT",
|
|
"NS",
|
|
"SRV",
|
|
"CAA"
|
|
]
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "SRV: `weight port target`. CAA: `tag value`.",
|
|
"x-description-pt": "SRV: `weight port target`. CAA: `tag value`."
|
|
},
|
|
"ttl": {
|
|
"type": "integer",
|
|
"minimum": 60,
|
|
"maximum": 604800,
|
|
"default": 14400
|
|
},
|
|
"priority": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535,
|
|
"default": 0,
|
|
"description": "For MX and SRV. On CAA it is the flag.",
|
|
"x-description-pt": "Para MX e SRV. No CAA é a flag."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns/{record_id}": {
|
|
"put": {
|
|
"operationId": "dns.records.update",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Change a DNS record",
|
|
"x-summary-pt": "Alterar um registo DNS",
|
|
"description": "Needs `dns:write`. The answer brings the new `id`. In a `TXT` record, quotes around the whole value are removed, and quotes or backslashes inside it are refused with `422`. The response shows what stayed in the zone: an `AAAA` address comes in its short form. A CNAME cannot share its name with other records: it answers `409` with `cname_conflict`. If it touches the MX records, or the names they point to, of the domain of the account email or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `dns:write`. A resposta traz o novo `id`. Num registo `TXT`, as aspas à volta de todo o valor saem, e aspas ou barras invertidas no meio são recusadas com `422`. A resposta mostra o que ficou na zona: um endereço `AAAA` vem na forma curta. Um CNAME não pode ficar com outros registos no mesmo nome: responde `409` com `cname_conflict`. Se mexer nos MX, ou nos nomes para onde apontam, do domínio do e-mail da conta ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "dns:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"name": "record_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the record, from the list. It changes when the record changes.",
|
|
"x-description-pt": "O `id` do registo, da lista. Muda quando o registo muda."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a DNS record.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsRecordsUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "3f2a91c07d11e4b6",
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400,
|
|
"priority": 0,
|
|
"read_only": false,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"type",
|
|
"value"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name, such as `www`. Use `@` for the domain itself.",
|
|
"x-description-pt": "O nome, como `www`. Use `@` para o próprio domínio."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"A",
|
|
"AAAA",
|
|
"CNAME",
|
|
"MX",
|
|
"TXT",
|
|
"NS",
|
|
"SRV",
|
|
"CAA"
|
|
]
|
|
},
|
|
"value": {
|
|
"type": "string",
|
|
"description": "SRV: `weight port target`. CAA: `tag value`.",
|
|
"x-description-pt": "SRV: `weight port target`. CAA: `tag value`."
|
|
},
|
|
"ttl": {
|
|
"type": "integer",
|
|
"minimum": 60,
|
|
"maximum": 604800,
|
|
"default": 14400
|
|
},
|
|
"priority": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 65535,
|
|
"default": 0,
|
|
"description": "For MX and SRV. On CAA it is the flag.",
|
|
"x-description-pt": "Para MX e SRV. No CAA é a flag."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "www",
|
|
"type": "A",
|
|
"value": "192.0.2.10",
|
|
"ttl": 14400
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "dns.records.delete",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Delete a DNS record",
|
|
"x-summary-pt": "Apagar um registo DNS",
|
|
"description": "Needs `dns:write`. A copy of the zone is kept first. If it touches the MX records, or the names they point to, of the domain of the account email or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `dns:write`. Fica primeiro uma cópia da zona. Se mexer nos MX, ou nos nomes para onde apontam, do domínio do e-mail da conta ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "dns:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"name": "record_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the record, from the list. It changes when the record changes.",
|
|
"x-description-pt": "O `id` do registo, da lista. Muda quando o registo muda."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a DNS record.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsRecordsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "3f2a91c07d11e4b6",
|
|
"deleted": true,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns/reset": {
|
|
"post": {
|
|
"operationId": "dns.zone.reset",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Reset the DNS zone",
|
|
"x-summary-pt": "Repor a zona DNS",
|
|
"description": "Needs `dns:write`. Leaves the zone without your records. A copy of the zone is kept first. If it touches the MX records, or the names they point to, of the domain of the account email or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `dns:write`. Deixa a zona sem os seus registos. Fica primeiro uma cópia da zona. Se mexer nos MX, ou nos nomes para onde apontam, do domínio do e-mail da conta ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "dns:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Reset the DNS zone.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsZoneResetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"reset": true,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"confirm"
|
|
],
|
|
"properties": {
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The domain name, to confirm.",
|
|
"x-description-pt": "O nome do domínio, para confirmar."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"confirm": "example.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns/backups": {
|
|
"get": {
|
|
"operationId": "dns.backups.list",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "List the zone backups",
|
|
"x-summary-pt": "Listar as cópias da zona",
|
|
"description": "Needs `dns:read`. The last 20 copies, the newest first.",
|
|
"x-description-pt": "Precisa de `dns:read`. As últimas 20 cópias, primeiro as mais recentes.",
|
|
"x-permission": "dns:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the zone backups.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsBackupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 12,
|
|
"reason": "update",
|
|
"records": 8,
|
|
"created_at": "2026-11-05T09:00:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/domains/{domain}/dns/backups/{id}/restore": {
|
|
"post": {
|
|
"operationId": "dns.backups.restore",
|
|
"tags": [
|
|
"dns"
|
|
],
|
|
"summary": "Restore a zone backup",
|
|
"x-summary-pt": "Restaurar uma cópia da zona",
|
|
"description": "Needs `dns:write`. Removes what was not in the copy and adds what was missing. `complete` is `false` when a record of the copy could not stay exactly as it was. If it touches the MX records, or the names they point to, of the domain of the account email or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `dns:write`. Tira o que não estava na cópia e põe o que faltava. `complete` vem a `false` quando um registo da cópia não pôde ficar exactamente como estava. Se mexer nos MX, ou nos nomes para onde apontam, do domínio do e-mail da conta ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "dns:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name or its `id`.",
|
|
"x-description-pt": "O nome do domínio ou o seu `id`."
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the backup.",
|
|
"x-description-pt": "O `id` da cópia."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Restore a zone backup.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/DnsBackupsRestoreResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"removed": 1,
|
|
"added": 2,
|
|
"simulated": true,
|
|
"complete": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/invoices/{id}/pdf": {
|
|
"get": {
|
|
"operationId": "invoices.pdf",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Get the PDF of an invoice",
|
|
"x-summary-pt": "Obter o PDF de uma factura",
|
|
"description": "Needs `billing:read`. The PDF comes in `content`, in base64. When `pdf_available` is `false`, use `url`; `reason` says why: `internal_text`, `temporary_address`, `not_generated` or `too_large`. Limited to 20 per minute.",
|
|
"x-description-pt": "Precisa de `billing:read`. O PDF vem em `content`, em base64. Quando `pdf_available` é `false`, use `url`; `reason` diz porquê: `internal_text`, `temporary_address`, `not_generated` ou `too_large`. Limite de 20 por minuto.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the invoice.",
|
|
"x-description-pt": "O `id` da factura."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the PDF of an invoice.",
|
|
"x-description-pt": "Obter o PDF de uma factura.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoicesPdfResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"pdf_available": true,
|
|
"filename": "invoice-0669-2026.pdf",
|
|
"content_type": "application/pdf",
|
|
"encoding": "base64",
|
|
"size_bytes": 29556,
|
|
"content": "JVBERi0xLjcK",
|
|
"invoice_id": 3127,
|
|
"number": "0669/2026",
|
|
"url": "https://my.example.co.mz/viewinvoice.php?id=3127&language=portuguese-mz¤cy=1",
|
|
"reason": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/invoices/{id}/pay": {
|
|
"post": {
|
|
"operationId": "invoices.pay",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Pay an invoice with credit",
|
|
"x-summary-pt": "Pagar uma factura com saldo",
|
|
"description": "Needs `billing:pay`. Pays what is still due, with the credit of the account and nothing else. Needs the `Idempotency-Key` header. The invoice total counts towards the spending limit of the key. Limited to 5 per minute, shared with domain purchases. In `conflict`, `details.reason` can be `invoice_not_unpaid`, `credit_not_allowed`, `nothing_to_pay` or `profile_incomplete`.",
|
|
"x-description-pt": "Precisa de `billing:pay`. Paga o que falta, só com o saldo da conta. Precisa do cabeçalho `Idempotency-Key`. O total da factura conta para o limite de gastos da chave. Limite de 5 por minuto, junto com as compras de domínios e de extras. Em `conflict`, `details.reason` pode ser `invoice_not_unpaid`, `credit_not_allowed`, `nothing_to_pay` ou `profile_incomplete`.",
|
|
"x-permission": "billing:pay",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the invoice.",
|
|
"x-description-pt": "O `id` da factura."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Pay an invoice with credit.",
|
|
"x-description-pt": "Pagar uma factura com saldo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/InvoicesPayResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"status": "paid",
|
|
"amount_charged": 229.68,
|
|
"balance_due": 0.0,
|
|
"credit_balance": 770.32,
|
|
"simulated": false,
|
|
"invoice_id": 3127,
|
|
"invoice_total": 229.68,
|
|
"currency": "MZN",
|
|
"url": "https://my.example.co.mz/viewinvoice.php?id=3127&language=portuguese-mz¤cy=1"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/orders": {
|
|
"get": {
|
|
"operationId": "orders.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "List the orders",
|
|
"x-summary-pt": "Listar as encomendas",
|
|
"description": "Needs `billing:read`. The most recent first.",
|
|
"x-description-pt": "Precisa de `billing:read`. Primeiro as mais recentes.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Filter by status: `pending`, `active`, `cancelled` or `fraud`.",
|
|
"x-description-pt": "Filtra pelo estado: `pending`, `active`, `cancelled` ou `fraud`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the orders.",
|
|
"x-description-pt": "Listar as encomendas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrdersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 961,
|
|
"number": "7794007796",
|
|
"status": "active",
|
|
"date": "2026-10-31T14:20:18+02:00",
|
|
"amount": 2900.93,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"invoice_id": 3100,
|
|
"promo_code": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/orders/{id}": {
|
|
"get": {
|
|
"operationId": "orders.get",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "See an order",
|
|
"x-summary-pt": "Ver uma encomenda",
|
|
"description": "Needs `billing:read`. With what came in the order: services, domains, addons and upgrades. A temporary address only appears when the service is active.",
|
|
"x-description-pt": "Precisa de `billing:read`. Com o que veio na encomenda: serviços, domínios, adicionais e upgrades. O endereço temporário só aparece com o serviço activo.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the order.",
|
|
"x-description-pt": "O `id` da encomenda."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an order.",
|
|
"x-description-pt": "Ver uma encomenda.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/OrdersGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 961,
|
|
"number": "7794007796",
|
|
"status": "active",
|
|
"date": "2026-10-31T14:20:18+02:00",
|
|
"amount": 2900.93,
|
|
"currency": "MZN",
|
|
"payment_method": "M-Pesa",
|
|
"invoice_id": 3100,
|
|
"promo_code": null,
|
|
"items": [
|
|
{
|
|
"type": "service",
|
|
"id": 695,
|
|
"name": "Pro Plan",
|
|
"domain": "example.co.mz",
|
|
"status": "active",
|
|
"billing_cycle": "annually",
|
|
"first_payment": 2900.93,
|
|
"recurring_amount": 2900.93
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/quotes": {
|
|
"get": {
|
|
"operationId": "quotes.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "List the quotes",
|
|
"x-summary-pt": "Listar as cotações",
|
|
"description": "Needs `billing:read`. Only the quotes delivered to the account.",
|
|
"x-description-pt": "Precisa de `billing:read`. Só as cotações entregues à conta.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Filter by status: `delivered`, `accepted`, `lost` or `dead`.",
|
|
"x-description-pt": "Filtra pelo estado: `delivered`, `accepted`, `lost` ou `dead`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the quotes.",
|
|
"x-description-pt": "Listar as cotações.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/QuotesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 15,
|
|
"subject": "Website",
|
|
"status": "delivered",
|
|
"created_at": "2026-10-01",
|
|
"sent_at": "2026-10-01",
|
|
"valid_until": "2026-11-01",
|
|
"accepted_at": null,
|
|
"subtotal": 28000.0,
|
|
"tax": 4559.0,
|
|
"total": 32559.0,
|
|
"currency": "MZN",
|
|
"url": "https://my.example.co.mz/viewquote.php?id=15&language=portuguese-mz¤cy=1"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/quotes/{id}": {
|
|
"get": {
|
|
"operationId": "quotes.get",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "See a quote",
|
|
"x-summary-pt": "Ver uma cotação",
|
|
"description": "Needs `billing:read`. With the proposal, the notes for you and the lines.",
|
|
"x-description-pt": "Precisa de `billing:read`. Com a proposta, as notas para si e as linhas.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the quote.",
|
|
"x-description-pt": "O `id` da cotação."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a quote.",
|
|
"x-description-pt": "Ver uma cotação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/QuotesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 15,
|
|
"subject": "Website",
|
|
"status": "delivered",
|
|
"created_at": "2026-10-01",
|
|
"sent_at": "2026-10-01",
|
|
"valid_until": "2026-11-01",
|
|
"accepted_at": null,
|
|
"subtotal": 28000.0,
|
|
"tax": 4559.0,
|
|
"total": 32559.0,
|
|
"currency": "MZN",
|
|
"url": "https://my.example.co.mz/viewquote.php?id=15&language=portuguese-mz¤cy=1",
|
|
"proposal": "Proposal text",
|
|
"notes": "Notes for you",
|
|
"items": [
|
|
{
|
|
"id": 1,
|
|
"description": "Website",
|
|
"quantity": 1.0,
|
|
"unit_price": 28000.0,
|
|
"discount_percent": 0.0,
|
|
"taxed": true
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/billing-cycles": {
|
|
"get": {
|
|
"operationId": "services.billing_cycles.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "See the renewal cycles of a service",
|
|
"x-summary-pt": "Ver os ciclos de renovação de um serviço",
|
|
"description": "Needs `billing:read`. Only the cycles on sale, with the price of each renewal. A cycle where a paid option of the service has no price is not on sale. Nothing changes. `blocked_reason` says why it cannot change now: `service_not_active`, `vps_not_supported`, `no_cycles`, `custom_price` or `invoice_open`. With `vps_not_supported` or `custom_price`, `cycles` is empty: handle the change in the account dashboard or with support.",
|
|
"x-description-pt": "Precisa de `billing:read`. Só os ciclos à venda, com o preço de cada renovação. Um ciclo em que uma opção paga do serviço não tem preço não está à venda. Nada muda. `blocked_reason` diz porque não se pode mudar agora: `service_not_active`, `vps_not_supported`, `no_cycles`, `custom_price` ou `invoice_open`. Com `vps_not_supported` ou `custom_price`, `cycles` vem vazio: trate a mudança no painel da conta ou com o suporte.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the service.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the renewal cycles of a service.",
|
|
"x-description-pt": "Ver os ciclos de renovação de um serviço.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesBillingCyclesListResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"service_id": 695,
|
|
"current_cycle": "monthly",
|
|
"current_amount": 350.0,
|
|
"currency": "MZN",
|
|
"next_due_date": "2026-12-20",
|
|
"can_change": true,
|
|
"blocked_reason": null,
|
|
"invoice_id": null,
|
|
"cycles": [
|
|
{
|
|
"cycle": "annually",
|
|
"amount": 3500.0,
|
|
"current": false
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/billing-cycle": {
|
|
"put": {
|
|
"operationId": "services.billing_cycle.update",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Change the cycle of the next renewal",
|
|
"x-summary-pt": "Mudar o ciclo da próxima renovação",
|
|
"description": "Needs `billing:write`. Nothing is charged now and the next due date stays. Give in `expected_amount` the price from the query: if it changed, it answers `409` with `price_changed`. A VPS or server answers `409` with `vps_not_supported`, and a service whose amount differs from the list price of its current cycle answers `409` with `custom_price`: handle these in the account dashboard or with support. Limited to 20 per minute.",
|
|
"x-description-pt": "Precisa de `billing:write`. Nada se cobra agora e a próxima data de vencimento não muda. Indique em `expected_amount` o preço da consulta: se tiver mudado, responde `409` com `price_changed`. Um VPS ou servidor responde `409` com `vps_not_supported`, e um serviço cujo valor não bate com o preço de lista do ciclo actual responde `409` com `custom_price`: trate-os no painel da conta ou com o suporte. Limite de 20 por minuto.",
|
|
"x-permission": "billing:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the service.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the cycle of the next renewal.",
|
|
"x-description-pt": "Mudar o ciclo da próxima renovação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesBillingCycleUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"service_id": 695,
|
|
"previous_cycle": "monthly",
|
|
"cycle": "annually",
|
|
"amount": 3500.0,
|
|
"currency": "MZN",
|
|
"applies_from": "2026-12-20",
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"cycle",
|
|
"expected_amount"
|
|
],
|
|
"properties": {
|
|
"cycle": {
|
|
"type": "string",
|
|
"enum": [
|
|
"monthly",
|
|
"quarterly",
|
|
"semi_annually",
|
|
"annually",
|
|
"biennially",
|
|
"triennially"
|
|
]
|
|
},
|
|
"expected_amount": {
|
|
"type": "number",
|
|
"description": "The price from the query.",
|
|
"x-description-pt": "O preço da consulta."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"cycle": "annually",
|
|
"expected_amount": 3500.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/upgrade-link": {
|
|
"get": {
|
|
"operationId": "services.upgrade_link.get",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Get the upgrade link of a service",
|
|
"x-summary-pt": "Obter a ligação de upgrade de um serviço",
|
|
"description": "Needs `billing:read`. On that page you choose the new plan and see the amount before paying. Nothing changes here.",
|
|
"x-description-pt": "Precisa de `billing:read`. Nessa página escolhe o plano novo e vê o valor antes de pagar. Aqui nada muda.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the service.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the upgrade link of a service.",
|
|
"x-description-pt": "Obter a ligação de upgrade de um serviço.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesUpgradeLinkGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"service_id": 695,
|
|
"url": "https://my.example.co.mz/onestep/upgrade/695?language=portuguese-mz¤cy=1"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/cancellation": {
|
|
"post": {
|
|
"operationId": "services.cancellation.create",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Request the cancellation of a service",
|
|
"x-summary-pt": "Pedir o cancelamento de um serviço",
|
|
"description": "Needs `services:cancel`. Always at the end of the paid period, never right away. The service stays active until `service_ends_at`. A service with no paid period still running answers `409` with `no_period_end`: ask support. Unpaid invoices of the service can be cancelled. Limited to 5 per hour.",
|
|
"x-description-pt": "Precisa de `services:cancel`. Sempre no fim do período pago, nunca de imediato. O serviço continua activo até `service_ends_at`. Um serviço sem período pago em curso responde `409` com `no_period_end`: fale com o suporte. As facturas por pagar do serviço podem ser canceladas. Limite de 5 por hora.",
|
|
"x-permission": "services:cancel",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the service.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Request the cancellation of a service.",
|
|
"x-description-pt": "Pedir o cancelamento de um serviço.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesCancellationCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"status": "requested",
|
|
"service_id": 695,
|
|
"type": "end_of_billing_period",
|
|
"service_ends_at": "2026-12-20",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"reason",
|
|
"confirm"
|
|
],
|
|
"properties": {
|
|
"reason": {
|
|
"type": "string",
|
|
"minLength": 3,
|
|
"maxLength": 300,
|
|
"description": "Why you are cancelling.",
|
|
"x-description-pt": "O motivo do cancelamento."
|
|
},
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The domain of the service or, if it has none, the plan name.",
|
|
"x-description-pt": "O domínio do serviço ou, se não tiver, o nome do plano."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"end_of_billing_period"
|
|
],
|
|
"default": "end_of_billing_period"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"reason": "I no longer need this plan",
|
|
"confirm": "example.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tickets/{id}/replies": {
|
|
"post": {
|
|
"operationId": "tickets.replies.create",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Reply to a ticket",
|
|
"x-summary-pt": "Responder a um ticket",
|
|
"description": "Needs `support:write`. The reply stays in the name of the account. Replying to a closed ticket opens it again. Limited to 30 per hour per account. Send `Idempotency-Key` so that a retry does not reply twice.",
|
|
"x-description-pt": "Precisa de `support:write`. A resposta fica em nome da conta. Responder a um ticket fechado volta a abri-lo. Limite de 30 por hora por conta. Envie `Idempotency-Key` para que repetir o pedido não responda duas vezes.",
|
|
"x-permission": "support:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The ticket number.",
|
|
"x-description-pt": "O número do ticket."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Reply to a ticket.",
|
|
"x-description-pt": "Responder a um ticket.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketsRepliesCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"ticket_id": "731942",
|
|
"reply_id": "392",
|
|
"status": "customer_reply",
|
|
"reopened": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"message"
|
|
],
|
|
"properties": {
|
|
"message": {
|
|
"type": "string",
|
|
"minLength": 1,
|
|
"maxLength": 20000
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"message": "Thank you, it works now."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/tickets/{id}/close": {
|
|
"post": {
|
|
"operationId": "tickets.close",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Close a ticket",
|
|
"x-summary-pt": "Fechar um ticket",
|
|
"description": "Needs `support:write`. In `conflict`, `details.reason` can be `already_closed` or `closure_not_allowed`.",
|
|
"x-description-pt": "Precisa de `support:write`. Em `conflict`, `details.reason` pode ser `already_closed` ou `closure_not_allowed`.",
|
|
"x-permission": "support:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The ticket number.",
|
|
"x-description-pt": "O número do ticket."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Close a ticket.",
|
|
"x-description-pt": "Fechar um ticket.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/TicketsCloseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"ticket_id": "731942",
|
|
"status": "closed",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/kb/categories": {
|
|
"get": {
|
|
"operationId": "kb.categories.list",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "List the Knowledge Base categories",
|
|
"x-summary-pt": "Listar as categorias da Base de Conhecimento",
|
|
"description": "Needs `support:read`. In the language of `Accept-Language`, when there is a translation.",
|
|
"x-description-pt": "Precisa de `support:read`. Na língua do `Accept-Language`, quando houver tradução.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the Knowledge Base categories.",
|
|
"x-description-pt": "Listar as categorias da Base de Conhecimento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/KbCategoriesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 9,
|
|
"name": "Billing and payments",
|
|
"description": "",
|
|
"articles": 40
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/kb/articles": {
|
|
"get": {
|
|
"operationId": "kb.articles.list",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "List or search Knowledge Base articles",
|
|
"x-summary-pt": "Listar ou pesquisar artigos da Base de Conhecimento",
|
|
"description": "Needs `support:read`. Only published articles. Searches are limited to 30 per minute.",
|
|
"x-description-pt": "Precisa de `support:read`. Só os artigos publicados. As pesquisas têm um limite de 30 por minuto.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Words to find, from 2 to 100 characters.",
|
|
"x-description-pt": "As palavras a procurar, de 2 a 100 caracteres."
|
|
},
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of a category.",
|
|
"x-description-pt": "O `id` de uma categoria."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List or search Knowledge Base articles.",
|
|
"x-description-pt": "Listar ou pesquisar artigos da Base de Conhecimento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/KbArticlesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 28,
|
|
"title": "How to access cPanel",
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "cPanel and WHM"
|
|
}
|
|
],
|
|
"views": 120,
|
|
"translated": false,
|
|
"url": "https://my.example.co.mz/knowledgebase/28?language=english¤cy=1",
|
|
"excerpt": "First words of the article."
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/kb/articles/{id}": {
|
|
"get": {
|
|
"operationId": "kb.articles.get",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Read a Knowledge Base article",
|
|
"x-summary-pt": "Ler um artigo da Base de Conhecimento",
|
|
"description": "Needs `support:read`. The text comes in HTML. In the language of `Accept-Language`, when there is a translation; `translated` says if there was.",
|
|
"x-description-pt": "Precisa de `support:read`. O texto vem em HTML. Na língua do `Accept-Language`, quando houver tradução; `translated` diz se houve.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the article.",
|
|
"x-description-pt": "O `id` do artigo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Read a Knowledge Base article.",
|
|
"x-description-pt": "Ler um artigo da Base de Conhecimento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/KbArticlesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 28,
|
|
"title": "How to access cPanel",
|
|
"categories": [
|
|
{
|
|
"id": 1,
|
|
"name": "cPanel and WHM"
|
|
}
|
|
],
|
|
"views": 120,
|
|
"translated": false,
|
|
"url": "https://my.example.co.mz/knowledgebase/28?language=english¤cy=1",
|
|
"body_html": "<p>Article text.</p>"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/announcements": {
|
|
"get": {
|
|
"operationId": "announcements.list",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "List the announcements",
|
|
"x-summary-pt": "Listar os anúncios",
|
|
"description": "Needs `support:read`. Only published announcements, the most recent first.",
|
|
"x-description-pt": "Precisa de `support:read`. Só os anúncios publicados, primeiro os mais recentes.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the announcements.",
|
|
"x-description-pt": "Listar os anúncios.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AnnouncementsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 7,
|
|
"title": "Scheduled maintenance",
|
|
"published_at": "2026-11-01T08:00:00+02:00",
|
|
"translated": false,
|
|
"url": "https://my.example.co.mz/announcements/7/scheduled-maintenance.html?language=english¤cy=1"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/announcements/{id}": {
|
|
"get": {
|
|
"operationId": "announcements.get",
|
|
"tags": [
|
|
"support"
|
|
],
|
|
"summary": "Read an announcement",
|
|
"x-summary-pt": "Ler um anúncio",
|
|
"description": "Needs `support:read`. The text comes in HTML.",
|
|
"x-description-pt": "Precisa de `support:read`. O texto vem em HTML.",
|
|
"x-permission": "support:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the announcement.",
|
|
"x-description-pt": "O `id` do anúncio."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Read an announcement.",
|
|
"x-description-pt": "Ler um anúncio.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AnnouncementsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"title": "Scheduled maintenance",
|
|
"published_at": "2026-11-01T08:00:00+02:00",
|
|
"translated": false,
|
|
"url": "https://my.example.co.mz/announcements/7/scheduled-maintenance.html?language=english¤cy=1",
|
|
"body_html": "<p>Announcement text.</p>"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers": {
|
|
"get": {
|
|
"operationId": "servers.list",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "List the servers",
|
|
"x-summary-pt": "Listar os servidores",
|
|
"description": "Needs `vps:read`. The active and suspended servers of the account, the newest first. The state comes from a recent copy; `state_checked_at` says when it was read, and is null if it has not been read yet. The states of `power_state` are `running`, `stopped`, `starting`, `stopping`, `restarting`, `reinstalling`, `backing_up` and `unknown`.",
|
|
"x-description-pt": "Precisa de `vps:read`. Os servidores activos e suspensos da conta, primeiro os mais recentes. O estado vem de uma cópia recente; `state_checked_at` diz quando foi lido, e é null se ainda não foi lido. Os estados de `power_state` são `running`, `stopped`, `starting`, `stopping`, `restarting`, `reinstalling`, `backing_up` e `unknown`.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Filter by `active` or `suspended`.",
|
|
"x-description-pt": "Filtra por `active` ou `suspended`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the servers.",
|
|
"x-description-pt": "Listar os servidores.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 700,
|
|
"name": "web1.example.co.mz",
|
|
"status": "active",
|
|
"product": "VPS 1",
|
|
"ip": "203.0.113.10",
|
|
"power_state": "running",
|
|
"state_checked_at": "2026-11-05T09:00:00+02:00",
|
|
"next_due_date": "2026-12-01"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}": {
|
|
"get": {
|
|
"operationId": "servers.get",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "See a server",
|
|
"x-summary-pt": "Ver um servidor",
|
|
"description": "Needs `vps:read`. The state comes from a copy up to 60 seconds old. If it cannot be read now, `state_stale` is true and the last known state is shown. The states of `power_state` are `running`, `stopped`, `starting`, `stopping`, `restarting`, `reinstalling`, `backing_up` and `unknown`.",
|
|
"x-description-pt": "Precisa de `vps:read`. O estado vem de uma cópia com até 60 segundos. Se não for possível ler agora, `state_stale` é true e mostra-se o último estado conhecido. Os estados de `power_state` são `running`, `stopped`, `starting`, `stopping`, `restarting`, `reinstalling`, `backing_up` e `unknown`.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a server.",
|
|
"x-description-pt": "Ver um servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 700,
|
|
"name": "web1.example.co.mz",
|
|
"status": "active",
|
|
"product": "VPS 1",
|
|
"ip": "203.0.113.10",
|
|
"power_state": "running",
|
|
"state_checked_at": "2026-11-05T09:00:00+02:00",
|
|
"next_due_date": "2026-12-01",
|
|
"additional_ips": [
|
|
"203.0.113.11"
|
|
],
|
|
"operating_system": {
|
|
"name": "Ubuntu",
|
|
"version": "24.04"
|
|
},
|
|
"location": "New Jersey, USA",
|
|
"resources": {
|
|
"vcpu": 2,
|
|
"ram_gb": 4,
|
|
"disk_gb": 80,
|
|
"traffic_gb": 4000
|
|
},
|
|
"billing_cycle": "monthly",
|
|
"state_stale": false,
|
|
"portal_url": "https://portal.example.co.mz/clientarea.php?action=productdetails&id=700&language=english¤cy=1"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/traffic": {
|
|
"get": {
|
|
"operationId": "servers.traffic.get",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "See the traffic of the month",
|
|
"x-summary-pt": "Ver o tráfego do mês",
|
|
"description": "Needs `vps:read`. Traffic this month, per day and in total, in GB. Comes from a copy up to 5 minutes old.",
|
|
"x-description-pt": "Precisa de `vps:read`. O tráfego deste mês, por dia e no total, em GB. Vem de uma cópia com até 5 minutos.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the traffic of the month.",
|
|
"x-description-pt": "Ver o tráfego do mês.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersTrafficGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"server_id": 700,
|
|
"month": "2026-11",
|
|
"total_gb": 31.5,
|
|
"in_gb": 8.2,
|
|
"out_gb": 23.3,
|
|
"limit_gb": 4000,
|
|
"days": [
|
|
{
|
|
"date": "2026-11-01",
|
|
"total_gb": 6.4
|
|
}
|
|
],
|
|
"checked_at": "2026-11-05T09:00:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/operating-systems": {
|
|
"get": {
|
|
"operationId": "servers.operating_systems.list",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "List the systems to reinstall",
|
|
"x-summary-pt": "Listar os sistemas para reinstalar",
|
|
"description": "Needs `vps:read`. The systems this server can install. Use the `id` in the reinstall operation.",
|
|
"x-description-pt": "Precisa de `vps:read`. Os sistemas que este servidor pode instalar. Use o `id` na operação de reinstalar.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the systems to reinstall.",
|
|
"x-description-pt": "Listar os sistemas para reinstalar.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersOperatingSystemsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "ubuntu-24.04",
|
|
"name": "Ubuntu",
|
|
"version": "24.04"
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/backups": {
|
|
"get": {
|
|
"operationId": "servers.backups.list",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "List the backups",
|
|
"x-summary-pt": "Listar as cópias",
|
|
"description": "Needs `vps:read`. `kind` is `automatic` or `on_demand`. A server has at most 4 backups, counting the automatic ones. The `id` changes when the backup changes. Comes from a copy up to 2 minutes old.",
|
|
"x-description-pt": "Precisa de `vps:read`. `kind` é `automatic` ou `on_demand`. Um servidor tem no máximo 4 cópias, contando as automáticas. O `id` muda quando a cópia muda. Vem de uma cópia com até 2 minutos.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the backups.",
|
|
"x-description-pt": "Listar as cópias.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersBackupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "3f9a1c7e5b2d4860",
|
|
"title": "Daily automatic backup",
|
|
"kind": "automatic",
|
|
"created_at": "2026-11-05T02:10:00+02:00",
|
|
"size_gb": 12.4
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1,
|
|
"max": 4,
|
|
"checked_at": "2026-11-05T09:00:00+02:00"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "servers.backups.create",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Make a backup",
|
|
"x-summary-pt": "Fazer uma cópia",
|
|
"description": "Needs `vps:write`. Answers `202`; the backup can take up to 50 minutes to appear. With 4 backups it answers `409` with `backup_limit_reached`.",
|
|
"x-description-pt": "Precisa de `vps:write`. Responde `202`; a cópia pode demorar até 50 minutos a aparecer. Com 4 cópias responde `409` com `backup_limit_reached`.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Make a backup.",
|
|
"x-description-pt": "Fazer uma cópia.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersBackupsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"name": "before-update"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Letters, digits, dot, hyphen and underscore, up to 30.",
|
|
"x-description-pt": "Letras, algarismos, ponto, hífen e sublinhado, até 30."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "before-update"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/start": {
|
|
"post": {
|
|
"operationId": "servers.start",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Start a server",
|
|
"x-summary-pt": "Ligar um servidor",
|
|
"description": "Needs `vps:write`. Answers `202`. It takes about 2 minutes. If it is already running, `409` with `already_running`.",
|
|
"x-description-pt": "Precisa de `vps:write`. Responde `202`. Demora cerca de 2 minutos. Se já estiver ligado, `409` com `already_running`.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Start a server.",
|
|
"x-description-pt": "Ligar um servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersStartResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/stop": {
|
|
"post": {
|
|
"operationId": "servers.stop",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Stop a server",
|
|
"x-summary-pt": "Desligar um servidor",
|
|
"description": "Needs `vps:write`. Answers `202`. It can take about 6 minutes. If it is already stopped, `409` with `already_stopped`.",
|
|
"x-description-pt": "Precisa de `vps:write`. Responde `202`. Pode demorar cerca de 6 minutos. Se já estiver desligado, `409` com `already_stopped`.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Stop a server.",
|
|
"x-description-pt": "Desligar um servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersStopResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/restart": {
|
|
"post": {
|
|
"operationId": "servers.restart",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Restart a server",
|
|
"x-summary-pt": "Reiniciar um servidor",
|
|
"description": "Needs `vps:write`. Answers `202`. If it is stopped, `409` with `server_stopped`.",
|
|
"x-description-pt": "Precisa de `vps:write`. Responde `202`. Se estiver desligado, `409` com `server_stopped`.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Restart a server.",
|
|
"x-description-pt": "Reiniciar um servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersRestartResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/password": {
|
|
"post": {
|
|
"operationId": "servers.password.change",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Generate a new root password",
|
|
"x-summary-pt": "Gerar uma nova senha de root",
|
|
"description": "Needs `vps:password`. This permission is separate from `vps:write` and off by default, because the answer brings the root password. Needs the name of the server in `confirm`. The server restarts to apply it, and the new password works after that, in 1 to 2 minutes. It appears only in this response: we do not keep it in the API records. Repeating with the same `Idempotency-Key` does not generate another one and returns `password` as null. In Sandbox the password is not real.",
|
|
"x-description-pt": "Precisa de `vps:password`. Esta permissão é separada de `vps:write` e fica desligada por omissão, porque a resposta traz a senha de root. Precisa do nome do servidor em `confirm`. O servidor reinicia para a aplicar, e a nova senha funciona depois disso, em 1 a 2 minutos. Aparece só nesta resposta: não a guardamos nos registos da API. Repetir com a mesma `Idempotency-Key` não gera outra e devolve `password` a null. Em Sandbox a senha não é verdadeira.",
|
|
"x-permission": "vps:password",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Generate a new root password.",
|
|
"x-description-pt": "Gerar uma nova senha de root.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersPasswordChangeResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"confirm"
|
|
],
|
|
"properties": {
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The `name` of the server, to confirm.",
|
|
"x-description-pt": "O `name` do servidor, para confirmar."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"confirm": "web1.example.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/reverse-dns": {
|
|
"get": {
|
|
"operationId": "servers.reverse_dns.get",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "See the reverse DNS",
|
|
"x-summary-pt": "Ver o DNS reverso",
|
|
"description": "Needs `vps:read`. The name of each IP of the server. `hostname` is null while it is the default one. Comes from a copy up to 5 minutes old.",
|
|
"x-description-pt": "Precisa de `vps:read`. O nome de cada IP do servidor. `hostname` é null enquanto for o de origem. Vem de uma cópia com até 5 minutos.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the reverse DNS.",
|
|
"x-description-pt": "Ver o DNS reverso.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersReverseDnsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"server_id": 700,
|
|
"records": [
|
|
{
|
|
"ip": "203.0.113.10",
|
|
"hostname": "mail.example.co.mz"
|
|
}
|
|
],
|
|
"checked_at": "2026-11-05T09:00:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "servers.reverse_dns.update",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Change the reverse DNS",
|
|
"x-summary-pt": "Mudar o DNS reverso",
|
|
"description": "Needs `vps:write`. If the list of IPs of the server cannot be read, it answers `502` and nothing changes. Only the IPs of this server, up to 64. An empty `hostname` clears it. `changed` says how many were different.",
|
|
"x-description-pt": "Precisa de `vps:write`. Se não for possível ler a lista de IP do servidor, responde `502` e nada muda. Só os IP deste servidor, até 64. Um `hostname` vazio limpa-o. `changed` diz quantos estavam diferentes.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the reverse DNS.",
|
|
"x-description-pt": "Mudar o DNS reverso.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersReverseDnsUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"changed": 1,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"records"
|
|
],
|
|
"properties": {
|
|
"records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"ip",
|
|
"hostname"
|
|
],
|
|
"properties": {
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"hostname": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"records": [
|
|
{
|
|
"ip": "203.0.113.10",
|
|
"hostname": "mail.example.co.mz"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/timezone": {
|
|
"get": {
|
|
"operationId": "servers.timezone.get",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "See the time zone",
|
|
"x-summary-pt": "Ver o fuso horário",
|
|
"description": "Needs `vps:read`. The last time zone saved, and the ones you can choose. `timezone` is null if none was chosen yet.",
|
|
"x-description-pt": "Precisa de `vps:read`. O último fuso gravado e os que pode escolher. `timezone` é null se ainda não foi escolhido.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the time zone.",
|
|
"x-description-pt": "Ver o fuso horário.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersTimezoneGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"server_id": 700,
|
|
"timezone": "Africa/Maputo",
|
|
"available": [
|
|
"Africa/Maputo",
|
|
"UTC"
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "servers.timezone.update",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Change the time zone",
|
|
"x-summary-pt": "Mudar o fuso horário",
|
|
"description": "Needs `vps:write`. Answers `202`. The action ends after about 2 minutes, without a check on the server.",
|
|
"x-description-pt": "Precisa de `vps:write`. Responde `202`. A acção acaba passados cerca de 2 minutos, sem confirmação no servidor.",
|
|
"x-permission": "vps:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Change the time zone.",
|
|
"x-description-pt": "Mudar o fuso horário.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersTimezoneUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"timezone": "Africa/Maputo"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"timezone"
|
|
],
|
|
"properties": {
|
|
"timezone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"timezone": "Africa/Maputo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/reinstall": {
|
|
"post": {
|
|
"operationId": "servers.reinstall",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Reinstall a server",
|
|
"x-summary-pt": "Reinstalar um servidor",
|
|
"description": "Needs `vps:reinstall`. Deletes everything on the server. Needs `Idempotency-Key`, the name of the server in `confirm`, and `backup_first`. With `backup_first` true, it first makes a backup and reinstalls by itself when the backup appears, which can take up to an hour; with 4 backups it answers `409` with `backup_limit_reached` and deletes nothing. The new root password appears only in this response and works when the reinstall ends. Up to 3 per hour, counting restores.",
|
|
"x-description-pt": "Precisa de `vps:reinstall`. Apaga tudo o que está no servidor. Precisa de `Idempotency-Key`, do nome do servidor em `confirm` e de `backup_first`. Com `backup_first` a true, primeiro faz uma cópia e reinstala sozinho quando a cópia aparecer, o que pode demorar até uma hora; com 4 cópias responde `409` com `backup_limit_reached` e não apaga nada. A nova senha de root aparece só nesta resposta e funciona quando a reinstalação acabar. Até 3 por hora, contando os restauros.",
|
|
"x-permission": "vps:reinstall",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Reinstall a server.",
|
|
"x-description-pt": "Reinstalar um servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersReinstallResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"operating_system": "ubuntu-24.04",
|
|
"backup_first": true,
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"confirm",
|
|
"operating_system",
|
|
"backup_first"
|
|
],
|
|
"properties": {
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The `name` of the server, to confirm.",
|
|
"x-description-pt": "O `name` do servidor, para confirmar."
|
|
},
|
|
"operating_system": {
|
|
"type": "string",
|
|
"description": "The `id` of the system, from the list.",
|
|
"x-description-pt": "O `id` do sistema, da lista."
|
|
},
|
|
"backup_first": {
|
|
"type": "boolean",
|
|
"description": "Make a backup before reinstalling.",
|
|
"x-description-pt": "Fazer uma cópia antes de reinstalar."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"confirm": "web1.example.co.mz",
|
|
"operating_system": "ubuntu-24.04",
|
|
"backup_first": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/restore": {
|
|
"post": {
|
|
"operationId": "servers.restore",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Restore a backup",
|
|
"x-summary-pt": "Restaurar uma cópia",
|
|
"description": "Needs `vps:restore`. The server goes back to the state of the backup: everything changed after it is lost. Needs `Idempotency-Key` and the name of the server in `confirm`. Up to 3 per hour, counting reinstalls.",
|
|
"x-description-pt": "Precisa de `vps:restore`. O servidor volta ao estado da cópia: tudo o que mudou depois dela perde-se. Precisa de `Idempotency-Key` e do nome do servidor em `confirm`. Até 3 por hora, contando as reinstalações.",
|
|
"x-permission": "vps:restore",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the server, the same as the `id` of its service.",
|
|
"x-description-pt": "O `id` do servidor, o mesmo do seu serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Restore a backup.",
|
|
"x-description-pt": "Restaurar uma cópia.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersRestoreResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "running",
|
|
"simulated": false,
|
|
"server_id": 700,
|
|
"server": "web1.example.co.mz",
|
|
"backup": "3f9a1c7e5b2d4860"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"confirm",
|
|
"backup"
|
|
],
|
|
"properties": {
|
|
"confirm": {
|
|
"type": "string",
|
|
"description": "The `name` of the server, to confirm.",
|
|
"x-description-pt": "O `name` do servidor, para confirmar."
|
|
},
|
|
"backup": {
|
|
"type": "string",
|
|
"description": "The `id` of the backup, from the list.",
|
|
"x-description-pt": "O `id` da cópia, da lista."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"confirm": "web1.example.co.mz",
|
|
"backup": "3f9a1c7e5b2d4860"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/usage": {
|
|
"get": {
|
|
"operationId": "hosting.usage.get",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "See disk, traffic and resource usage",
|
|
"x-summary-pt": "Ver o uso de disco, tráfego e recursos",
|
|
"description": "Needs `hosting:read`. Disk and traffic in bytes. `limit_bytes` is `null` when there is no limit. The items in `resources` depend on the server. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Disco e tráfego em bytes. `limit_bytes` vem a `null` quando não há limite. Os itens de `resources` dependem do servidor. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See disk, traffic and resource usage.",
|
|
"x-description-pt": "Ver o uso de disco, tráfego e recursos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingUsageGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"disk": {
|
|
"used_bytes": 1048576,
|
|
"limit_bytes": 10737418240
|
|
},
|
|
"bandwidth": {
|
|
"used_bytes": 5242880,
|
|
"limit_bytes": null
|
|
},
|
|
"resources": [
|
|
{
|
|
"id": "email_accounts",
|
|
"used": 2,
|
|
"limit": null
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/cpanel-login": {
|
|
"post": {
|
|
"operationId": "hosting.login.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a direct login link",
|
|
"x-summary-pt": "Criar uma ligação de entrada directa",
|
|
"description": "Needs `hosting:login`. The link works once and gives full access to the panel of this account, so keep it private. It is never stored, so `Idempotency-Key` is not kept here: each call creates a new link. Limit: 5 per minute. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:login`. A ligação só serve uma vez e dá acesso total ao painel desta conta, por isso não a partilhe. A API não a guarda, por isso aqui a `Idempotency-Key` não tem efeito: repetir o pedido volta a executá-lo: cada pedido cria uma ligação nova. Limite: 5 por minuto. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:login",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a direct login link.",
|
|
"x-description-pt": "Criar uma ligação de entrada directa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingLoginCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://srv.example.com:2083/cpsess0000000000/login/?session=example",
|
|
"single_use": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/subdomains": {
|
|
"get": {
|
|
"operationId": "hosting.subdomains.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List subdomains",
|
|
"x-summary-pt": "Listar subdomínios",
|
|
"description": "Needs `hosting:read`. Each one with its folder, relative to the account folder. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Cada um com a sua pasta, relativa à pasta da conta. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List subdomains.",
|
|
"x-description-pt": "Listar subdomínios.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingSubdomainsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"domain": "blog.example.co.mz",
|
|
"root_domain": "example.co.mz",
|
|
"directory": "public_html/blog"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.subdomains.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a subdomain",
|
|
"x-summary-pt": "Criar um subdomínio",
|
|
"description": "Needs `hosting:write`. The `root_domain` must be active in your account: registered with us (or a subdomain of one that is), or the domain of an active hosting service, otherwise it answers `409` with `domain_not_owned`. A domain registered elsewhere is added in cPanel. The `root_domain` must be a domain of this hosting account. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. O `root_domain` tem de estar activo na sua conta: registado connosco (ou subdomínio de um que esteja), ou ser o de uma hospedagem activa; caso contrário responde `409` com `domain_not_owned`. Um domínio registado noutro lado junta-se no cPanel. O `root_domain` tem de ser um domínio desta hospedagem. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a subdomain.",
|
|
"x-description-pt": "Criar um subdomínio.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingSubdomainsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "blog.example.co.mz",
|
|
"root_domain": "example.co.mz",
|
|
"directory": "public_html/blog",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"root_domain": {
|
|
"description": "A domain of this hosting account.",
|
|
"x-description-pt": "Um domínio desta hospedagem.",
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"description": "The name before the domain.",
|
|
"x-description-pt": "O nome antes do domínio.",
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"description": "Folder relative to the account folder, without `..` and outside system folders.",
|
|
"x-description-pt": "Pasta relativa à pasta da conta, sem `..` e fora das pastas de sistema.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"root_domain",
|
|
"name"
|
|
]
|
|
},
|
|
"example": {
|
|
"root_domain": "example.co.mz",
|
|
"name": "blog",
|
|
"directory": "public_html/blog"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/subdomains/{domain}": {
|
|
"delete": {
|
|
"operationId": "hosting.subdomains.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete a subdomain",
|
|
"x-summary-pt": "Apagar um subdomínio",
|
|
"description": "Needs `hosting:write`. Needs the name in `confirm`. The files stay in the folder. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Precisa do nome em `confirm`. Os ficheiros ficam na pasta. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name of the domain.",
|
|
"x-description-pt": "O nome completo do domínio."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a subdomain.",
|
|
"x-description-pt": "Apagar um subdomínio.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingSubdomainsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "blog.example.co.mz",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "blog.example.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/addon-domains": {
|
|
"get": {
|
|
"operationId": "hosting.addon_domains.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List addon domains",
|
|
"x-summary-pt": "Listar domínios adicionais",
|
|
"description": "Needs `hosting:read`. The domains with their own site in this account. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Os domínios com site próprio nesta conta. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List addon domains.",
|
|
"x-description-pt": "Listar domínios adicionais.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingAddonDomainsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"domain": "outro.co.mz",
|
|
"directory": "public_html/outro.co.mz"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.addon_domains.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Add an addon domain",
|
|
"x-summary-pt": "Adicionar um domínio adicional",
|
|
"description": "Needs `hosting:write`. The domain must be active in your account: registered with us (or a subdomain of one that is), or the domain of an active hosting service, otherwise it answers `409` with `domain_not_owned`. A domain registered elsewhere is added in cPanel. Counts towards the limit of sites of the plan. The domain must point to our nameservers. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. O domínio tem de estar activo na sua conta: registado connosco (ou subdomínio de um que esteja), ou ser o de uma hospedagem activa; caso contrário responde `409` com `domain_not_owned`. Um domínio registado noutro lado junta-se no cPanel. Conta para o limite de sites do plano. O domínio tem de apontar para os nossos nameservers. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Add an addon domain.",
|
|
"x-description-pt": "Adicionar um domínio adicional.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingAddonDomainsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "outro.co.mz",
|
|
"directory": "public_html/outro.co.mz",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"description": "The domain to add.",
|
|
"x-description-pt": "O domínio a adicionar.",
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"description": "Folder relative to the account folder, without `..` and outside system folders.",
|
|
"x-description-pt": "Pasta relativa à pasta da conta, sem `..` e fora das pastas de sistema.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain"
|
|
]
|
|
},
|
|
"example": {
|
|
"domain": "outro.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/addon-domains/{domain}": {
|
|
"delete": {
|
|
"operationId": "hosting.addon_domains.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Remove an addon domain",
|
|
"x-summary-pt": "Retirar um domínio adicional",
|
|
"description": "Needs `hosting:write`. Needs the name in `confirm`. The files stay in the folder. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Precisa do nome em `confirm`. Os ficheiros ficam na pasta. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name of the domain.",
|
|
"x-description-pt": "O nome completo do domínio."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Remove an addon domain.",
|
|
"x-description-pt": "Retirar um domínio adicional.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingAddonDomainsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "outro.co.mz",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "outro.co.mz"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/redirects": {
|
|
"get": {
|
|
"operationId": "hosting.redirects.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List redirects",
|
|
"x-summary-pt": "Listar redireccionamentos",
|
|
"description": "Needs `hosting:read`. A `domain` of `all` applies to every domain of the account. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Um `domain` igual a `all` vale para todos os domínios da conta. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List redirects.",
|
|
"x-description-pt": "Listar redireccionamentos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingRedirectsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "3f2a9c1b7d4e8f60",
|
|
"domain": "example.co.mz",
|
|
"source": "/antigo",
|
|
"destination": "https://www.example.co.mz/novo",
|
|
"type": "permanent",
|
|
"wildcard": false
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.redirects.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a redirect",
|
|
"x-summary-pt": "Criar um redireccionamento",
|
|
"description": "Needs `hosting:write`. The `destination` starts with `http://` or `https://` and cannot have spaces, quotes or `%`. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. O `destination` começa por `http://` ou `https://` e não pode ter espaços, aspas nem `%`. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a redirect.",
|
|
"x-description-pt": "Criar um redireccionamento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingRedirectsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "3f2a9c1b7d4e8f60",
|
|
"domain": "example.co.mz",
|
|
"source": "/antigo",
|
|
"destination": "https://www.example.co.mz/novo",
|
|
"type": "permanent",
|
|
"wildcard": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"description": "A domain of this hosting account.",
|
|
"x-description-pt": "Um domínio desta hospedagem.",
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"description": "Path starting with `/`. If omitted, `/`.",
|
|
"x-description-pt": "Caminho a começar por `/`. Sem ele, `/`.",
|
|
"type": "string"
|
|
},
|
|
"destination": {
|
|
"description": "Where it goes.",
|
|
"x-description-pt": "Para onde vai.",
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"description": "`permanent` or `temporary`.",
|
|
"x-description-pt": "`permanent` ou `temporary`.",
|
|
"type": "string"
|
|
},
|
|
"wildcard": {
|
|
"description": "Keeps the rest of the path.",
|
|
"x-description-pt": "Mantém o resto do caminho.",
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain",
|
|
"destination"
|
|
]
|
|
},
|
|
"example": {
|
|
"domain": "example.co.mz",
|
|
"source": "/antigo",
|
|
"destination": "https://www.example.co.mz/novo"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/redirects/{redirect_id}": {
|
|
"delete": {
|
|
"operationId": "hosting.redirects.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete a redirect",
|
|
"x-summary-pt": "Apagar um redireccionamento",
|
|
"description": "Needs `hosting:write`. Use the `id` from the list. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Use o `id` da lista. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "redirect_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` from the list.",
|
|
"x-description-pt": "O `id` da lista."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a redirect.",
|
|
"x-description-pt": "Apagar um redireccionamento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingRedirectsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "3f2a9c1b7d4e8f60",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/databases": {
|
|
"get": {
|
|
"operationId": "hosting.databases.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List databases",
|
|
"x-summary-pt": "Listar bases de dados",
|
|
"description": "Needs `hosting:read`. Each one with its size and users. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Cada uma com o tamanho e os utilizadores. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List databases.",
|
|
"x-description-pt": "Listar bases de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabasesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"name": "conta_site",
|
|
"disk_usage_bytes": 1048576,
|
|
"users": [
|
|
"conta_site"
|
|
]
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.databases.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a database",
|
|
"x-summary-pt": "Criar uma base de dados",
|
|
"description": "Needs `hosting:write`. The answer gives the final name, with the prefix. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. A resposta traz o nome final, com o prefixo. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a database.",
|
|
"x-description-pt": "Criar uma base de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabasesCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"name": "conta_site",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Lowercase letters, digits and `_`. The account prefix is added if missing.",
|
|
"x-description-pt": "Letras minúsculas, números e `_`. O prefixo da conta junta-se se faltar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
]
|
|
},
|
|
"example": {
|
|
"name": "site"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/databases/{name}": {
|
|
"delete": {
|
|
"operationId": "hosting.databases.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete a database",
|
|
"x-summary-pt": "Apagar uma base de dados",
|
|
"description": "Needs `hosting:write`. Needs the name in `confirm`. The data is lost. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Precisa do nome em `confirm`. Os dados perdem-se. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name, with the account prefix.",
|
|
"x-description-pt": "O nome completo, com o prefixo da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a database.",
|
|
"x-description-pt": "Apagar uma base de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabasesDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"name": "conta_site",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "conta_site"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/database-users": {
|
|
"get": {
|
|
"operationId": "hosting.database_users.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List database users",
|
|
"x-summary-pt": "Listar utilizadores de bases de dados",
|
|
"description": "Needs `hosting:read`. Each one with the databases it can reach. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Cada um com as bases a que tem acesso. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List database users.",
|
|
"x-description-pt": "Listar utilizadores de bases de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabaseUsersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"name": "conta_site",
|
|
"databases": [
|
|
"conta_site"
|
|
]
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.database_users.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a database user",
|
|
"x-summary-pt": "Criar um utilizador de bases de dados",
|
|
"description": "Needs `hosting:write`. The password is never stored by the API, so `Idempotency-Key` is not kept here. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. A API nunca guarda a senha, por isso aqui a `Idempotency-Key` não tem efeito: repetir o pedido volta a executá-lo. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a database user.",
|
|
"x-description-pt": "Criar um utilizador de bases de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabaseUsersCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"name": "conta_site",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"description": "Lowercase letters, digits and `_`. The account prefix is added if missing.",
|
|
"x-description-pt": "Letras minúsculas, números e `_`. O prefixo da conta junta-se se faltar.",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"password"
|
|
]
|
|
},
|
|
"example": {
|
|
"name": "site",
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/database-users/{name}/password": {
|
|
"put": {
|
|
"operationId": "hosting.database_users.password",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Change a database user password",
|
|
"x-summary-pt": "Mudar a senha de um utilizador de bases de dados",
|
|
"description": "Needs `hosting:write`. The password never comes back. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. A senha nunca volta. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name, with the account prefix.",
|
|
"x-description-pt": "O nome completo, com o prefixo da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a database user password.",
|
|
"x-description-pt": "Mudar a senha de um utilizador de bases de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabaseUsersPasswordResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"name": "conta_site",
|
|
"password_changed": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"password"
|
|
]
|
|
},
|
|
"example": {
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/database-users/{name}": {
|
|
"delete": {
|
|
"operationId": "hosting.database_users.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete a database user",
|
|
"x-summary-pt": "Apagar um utilizador de bases de dados",
|
|
"description": "Needs `hosting:write`. Needs the name in `confirm`. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Precisa do nome em `confirm`. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name, with the account prefix.",
|
|
"x-description-pt": "O nome completo, com o prefixo da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a database user.",
|
|
"x-description-pt": "Apagar um utilizador de bases de dados.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabaseUsersDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"name": "conta_site",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "conta_site"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/databases/{name}/users/{user}": {
|
|
"put": {
|
|
"operationId": "hosting.databases.grant",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Give a user access to a database",
|
|
"x-summary-pt": "Dar a um utilizador acesso a uma base",
|
|
"description": "Needs `hosting:write`. Use `ALL`, or a list such as `SELECT` and `INSERT`. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Use `ALL`, ou uma lista como `SELECT` e `INSERT`. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name, with the account prefix.",
|
|
"x-description-pt": "O nome completo, com o prefixo da conta."
|
|
},
|
|
{
|
|
"name": "user",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name of the user, with the account prefix.",
|
|
"x-description-pt": "O nome completo do utilizador, com o prefixo da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Give a user access to a database.",
|
|
"x-description-pt": "Dar a um utilizador acesso a uma base.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabasesGrantResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"database": "conta_site",
|
|
"user": "conta_site",
|
|
"privileges": [
|
|
"ALL"
|
|
],
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"privileges": {
|
|
"description": "If omitted, `ALL`.",
|
|
"x-description-pt": "Sem ele, `ALL`.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"privileges": [
|
|
"ALL"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "hosting.databases.revoke",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Remove a user access to a database",
|
|
"x-summary-pt": "Retirar o acesso de um utilizador a uma base",
|
|
"description": "Needs `hosting:write`. The user and the database stay. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. O utilizador e a base ficam. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "name",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name, with the account prefix.",
|
|
"x-description-pt": "O nome completo, com o prefixo da conta."
|
|
},
|
|
{
|
|
"name": "user",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full name of the user, with the account prefix.",
|
|
"x-description-pt": "O nome completo do utilizador, com o prefixo da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Remove a user access to a database.",
|
|
"x-description-pt": "Retirar o acesso de um utilizador a uma base.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingDatabasesRevokeResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"database": "conta_site",
|
|
"user": "conta_site",
|
|
"revoked": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/cron": {
|
|
"get": {
|
|
"operationId": "hosting.cron.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List cron jobs",
|
|
"x-summary-pt": "Listar tarefas cron",
|
|
"description": "Needs `hosting:read`. Includes the jobs created in the panel. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`. `command` can contain passwords: it is only filled in with `hosting:code`; without it, it is `null` and `command_hidden` is `true`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Inclui as tarefas criadas no painel. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`. `command` pode ter senhas: só vem preenchido com `hosting:code`; sem ela, vem a `null` e `command_hidden` a `true`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List cron jobs.",
|
|
"x-description-pt": "Listar tarefas cron.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingCronListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "a1b2c3d4",
|
|
"schedule": "*/15 * * * *",
|
|
"command": null,
|
|
"command_hidden": true
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.cron.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create a cron job",
|
|
"x-summary-pt": "Criar uma tarefa cron",
|
|
"description": "Needs `hosting:code`. A cron job runs code on the account, so this permission is separate from `hosting:write` and off by default. In `url`, only public domain names that resolve to public addresses are accepted. Free commands are not accepted: give either `php_script`, a PHP file of the account, or `url`, a public address that is called. The minimum interval is 5 minutes and each account has up to 20 jobs. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:code`. Uma tarefa cron corre código na conta, por isso esta permissão é separada de `hosting:write` e fica desligada por omissão. Em `url`, só se aceitam nomes de domínio públicos, que resolvam para endereços públicos. Não se aceitam comandos livres: indique `php_script`, um ficheiro PHP da conta, ou `url`, um endereço público que é chamado. O intervalo mínimo é de 5 minutos e cada conta tem até 20 tarefas. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:code",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a cron job.",
|
|
"x-description-pt": "Criar uma tarefa cron.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingCronCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "a1b2c3d4",
|
|
"schedule": "*/15 * * * *",
|
|
"command": "/usr/local/bin/php -q public_html/cron.php >/dev/null 2>&1",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"schedule": {
|
|
"description": "Five fields, with digits and `*`, `,`, `/`, `-`.",
|
|
"x-description-pt": "Cinco campos, com números e `*`, `,`, `/`, `-`.",
|
|
"type": "string"
|
|
},
|
|
"php_script": {
|
|
"description": "A PHP file, relative to the account folder.",
|
|
"x-description-pt": "Um ficheiro PHP, relativo à pasta da conta.",
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"description": "A public `http://` or `https://` address, without `%`.",
|
|
"x-description-pt": "Um endereço público `http://` ou `https://`, sem `%`.",
|
|
"type": "string"
|
|
},
|
|
"args": {
|
|
"description": "Up to 8 values for the script.",
|
|
"x-description-pt": "Até 8 valores para o script.",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"schedule"
|
|
]
|
|
},
|
|
"example": {
|
|
"schedule": "*/15 * * * *",
|
|
"php_script": "public_html/cron.php"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/cron/{cron_id}": {
|
|
"delete": {
|
|
"operationId": "hosting.cron.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete a cron job",
|
|
"x-summary-pt": "Apagar uma tarefa cron",
|
|
"description": "Needs `hosting:write`. Use the `id` from the list. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Use o `id` da lista. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "cron_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` from the list.",
|
|
"x-description-pt": "O `id` da lista."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a cron job.",
|
|
"x-description-pt": "Apagar uma tarefa cron.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingCronDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "a1b2c3d4",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/ssl": {
|
|
"get": {
|
|
"operationId": "hosting.ssl.get",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "See the SSL certificates",
|
|
"x-summary-pt": "Ver os certificados SSL",
|
|
"description": "Needs `hosting:read`. The certificate of each site and its expiry date. `meta.autossl_running` says if a free certificate is being requested. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. O certificado de cada site e a data de fim. `meta.autossl_running` diz se está a ser pedido um certificado gratuito. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the SSL certificates.",
|
|
"x-description-pt": "Ver os certificados SSL.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingSslGetResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"domain": "example.co.mz",
|
|
"domains": [
|
|
"example.co.mz",
|
|
"www.example.co.mz"
|
|
],
|
|
"expires_at": "2027-02-01T10:00:00+02:00",
|
|
"self_signed": false,
|
|
"validation_type": "dv"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1,
|
|
"autossl_running": false
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/ssl/autossl": {
|
|
"post": {
|
|
"operationId": "hosting.ssl.autossl",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Request free certificates",
|
|
"x-summary-pt": "Pedir certificados gratuitos",
|
|
"description": "Needs `hosting:write`. It only works for domains that point to our servers. Limit: once every 15 minutes per account. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Só resulta nos domínios que apontam para os nossos servidores. Limite: uma vez a cada 15 minutos por hospedagem. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Request free certificates.",
|
|
"x-description-pt": "Pedir certificados gratuitos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingSslAutosslResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"requested": true,
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/php": {
|
|
"get": {
|
|
"operationId": "hosting.php.get",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "See the PHP version of each site",
|
|
"x-summary-pt": "Ver a versão do PHP de cada site",
|
|
"description": "Needs `hosting:read`. The version of each domain, or `inherit`. To change the version, use the panel. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. A versão de cada domínio, ou `inherit`. Para mudar a versão, use o painel. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the PHP version of each site.",
|
|
"x-description-pt": "Ver a versão do PHP de cada site.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingPhpGetResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"domain": "example.co.mz",
|
|
"version": "8.2"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1,
|
|
"available_versions": [
|
|
"7.4",
|
|
"8.2"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/php/options": {
|
|
"get": {
|
|
"operationId": "hosting.php.options",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "See the PHP options",
|
|
"x-summary-pt": "Ver as opções do PHP",
|
|
"description": "Needs `hosting:read`. Only the options that can be changed through the API. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. Só as opções que se podem alterar pela API. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "A domain of this hosting account. If omitted, the main domain.",
|
|
"x-description-pt": "Um domínio desta hospedagem. Sem ele, o domínio principal."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the PHP options.",
|
|
"x-description-pt": "Ver as opções do PHP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingPhpOptionsResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"options": {
|
|
"memory_limit": "256M",
|
|
"max_execution_time": "60"
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "hosting.php.options.update",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Change the PHP options",
|
|
"x-summary-pt": "Alterar as opções do PHP",
|
|
"description": "Needs `hosting:write`. Accepted: `memory_limit` (32M to 2048M), `post_max_size` and `upload_max_filesize` (1M to 2048M), `max_execution_time` and `max_input_time` (1 to 600), `max_input_vars` (100 to 20000), `session.gc_maxlifetime` (60 to 86400), `display_errors` and `zlib.output_compression` (true or false). With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Aceites: `memory_limit` (32M a 2048M), `post_max_size` e `upload_max_filesize` (1M a 2048M), `max_execution_time` e `max_input_time` (1 a 600), `max_input_vars` (100 a 20000), `session.gc_maxlifetime` (60 a 86400), `display_errors` e `zlib.output_compression` (true ou false). Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the PHP options.",
|
|
"x-description-pt": "Alterar as opções do PHP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingPhpOptionsUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"options": {
|
|
"memory_limit": "256M"
|
|
},
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"description": "A domain of this hosting account.",
|
|
"x-description-pt": "Um domínio desta hospedagem.",
|
|
"type": "string"
|
|
},
|
|
"options": {
|
|
"description": "The options to change.",
|
|
"x-description-pt": "As opções a alterar.",
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain",
|
|
"options"
|
|
]
|
|
},
|
|
"example": {
|
|
"domain": "example.co.mz",
|
|
"options": {
|
|
"memory_limit": "256M",
|
|
"max_execution_time": 60
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/backups": {
|
|
"get": {
|
|
"operationId": "hosting.backups.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List backup dates",
|
|
"x-summary-pt": "Listar as datas das cópias",
|
|
"description": "Needs `hosting:read`. The dates with a backup on the server. The backup requested with `POST` stays in the account folder and is not in this list. To restore, use the account dashboard or ask support. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. As datas com cópia no servidor. A cópia pedida com `POST` fica na pasta da conta e não entra nesta lista. Para restaurar, use o painel da conta ou fale com o suporte. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List backup dates.",
|
|
"x-description-pt": "Listar as datas das cópias.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingBackupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"date": "2026-11-01"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.backups.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Request a full backup",
|
|
"x-summary-pt": "Pedir uma cópia completa",
|
|
"description": "Needs `hosting:write`. The file stays in the account folder and takes up space of the plan. Limit: once a day per account. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. O ficheiro fica na pasta da conta e ocupa espaço do plano. Limite: uma vez por dia por hospedagem. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Request a full backup.",
|
|
"x-description-pt": "Pedir uma cópia completa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingBackupsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"requested": true,
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/ftp-accounts": {
|
|
"get": {
|
|
"operationId": "hosting.ftp.list",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "List FTP accounts",
|
|
"x-summary-pt": "Listar acessos FTP",
|
|
"description": "Needs `hosting:read`. `quota_mb` is `null` when there is no limit. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `hosting:read`. `quota_mb` vem a `null` quando não há limite. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "hosting:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List FTP accounts.",
|
|
"x-description-pt": "Listar acessos FTP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingFtpListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"login": "ana@example.com",
|
|
"type": "sub",
|
|
"directory": "public_html/ana",
|
|
"used_mb": 1.5,
|
|
"quota_mb": 1024
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "hosting.ftp.create",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Create an FTP account",
|
|
"x-summary-pt": "Criar um acesso FTP",
|
|
"description": "Needs `hosting:code`. FTP in the site folder can run code on the account, so this permission is separate from `hosting:write` and off by default. The access only sees its folder. The password is never stored by the API, so `Idempotency-Key` is not kept here. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:code`. O FTP na pasta do site pode correr código na conta, por isso esta permissão é separada de `hosting:write` e fica desligada por omissão. O acesso só vê a sua pasta. A API nunca guarda a senha, por isso aqui a `Idempotency-Key` não tem efeito: repetir o pedido volta a executá-lo. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:code",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create an FTP account.",
|
|
"x-description-pt": "Criar um acesso FTP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingFtpCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"login": "ana@example.com",
|
|
"directory": "public_html/ana",
|
|
"quota_mb": 1024,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"user": {
|
|
"description": "The name before the domain.",
|
|
"x-description-pt": "O nome antes do domínio.",
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"description": "A domain of this hosting account.",
|
|
"x-description-pt": "Um domínio desta hospedagem.",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"description": "Folder relative to the account folder, without `..` and outside system folders.",
|
|
"x-description-pt": "Pasta relativa à pasta da conta, sem `..` e fora das pastas de sistema.",
|
|
"type": "string"
|
|
},
|
|
"quota_mb": {
|
|
"description": "From 1 to 102400. If omitted, 1024.",
|
|
"x-description-pt": "De 1 a 102400. Sem ele, 1024.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"user",
|
|
"domain",
|
|
"password",
|
|
"directory"
|
|
]
|
|
},
|
|
"example": {
|
|
"user": "ana",
|
|
"domain": "example.co.mz",
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a",
|
|
"directory": "public_html/ana"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/ftp-accounts/{login}/password": {
|
|
"put": {
|
|
"operationId": "hosting.ftp.password",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Change an FTP password",
|
|
"x-summary-pt": "Mudar a senha de um acesso FTP",
|
|
"description": "Needs `hosting:code`. FTP in the site folder can run code on the account, so this permission is separate from `hosting:write` and off by default. The main account cannot be changed here. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:code`. O FTP na pasta do site pode correr código na conta, por isso esta permissão é separada de `hosting:write` e fica desligada por omissão. A conta principal não se altera por aqui. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:code",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "login",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The login, as `name@domain`.",
|
|
"x-description-pt": "O acesso, como `nome@dominio`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change an FTP password.",
|
|
"x-description-pt": "Mudar a senha de um acesso FTP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingFtpPasswordResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"login": "ana@example.com",
|
|
"password_changed": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"password"
|
|
]
|
|
},
|
|
"example": {
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/ftp-accounts/{login}": {
|
|
"delete": {
|
|
"operationId": "hosting.ftp.delete",
|
|
"tags": [
|
|
"hosting"
|
|
],
|
|
"summary": "Delete an FTP account",
|
|
"x-summary-pt": "Apagar um acesso FTP",
|
|
"description": "Needs `hosting:write`. Needs the login in `confirm`. The files stay. The main account cannot be deleted. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `hosting:write`. Precisa do acesso em `confirm`. Os ficheiros ficam. A conta principal não se apaga. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "hosting:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "login",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The login, as `name@domain`.",
|
|
"x-description-pt": "O acesso, como `nome@dominio`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete an FTP account.",
|
|
"x-description-pt": "Apagar um acesso FTP.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/HostingFtpDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"login": "ana@example.com",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "ana@example.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/mailboxes": {
|
|
"get": {
|
|
"operationId": "email.mailboxes.list",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "List mailboxes",
|
|
"x-summary-pt": "Listar caixas de e-mail",
|
|
"description": "Needs `email:read`. `quota_mb` is `null` when the mailbox has no limit of its own. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. `quota_mb` vem a `null` quando a caixa não tem limite próprio. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List mailboxes.",
|
|
"x-description-pt": "Listar caixas de e-mail.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMailboxesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"address": "info@example.com",
|
|
"used_mb": 12.5,
|
|
"quota_mb": 1024
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.mailboxes.create",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Create a mailbox",
|
|
"x-summary-pt": "Criar uma caixa de e-mail",
|
|
"description": "Needs `email:write`. System names of the server, such as `_mainaccount`, are not accepted. The domain must be of this hosting account. The password is never stored by the API, so `Idempotency-Key` is not kept here. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Os nomes de sistema do servidor, como `_mainaccount`, não são aceites. O domínio tem de ser desta hospedagem. A API nunca guarda a senha, por isso aqui a `Idempotency-Key` não tem efeito: repetir o pedido volta a executá-lo. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a mailbox.",
|
|
"x-description-pt": "Criar uma caixa de e-mail.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMailboxesCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"quota_mb": 1024,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo.",
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
},
|
|
"quota_mb": {
|
|
"description": "In MB, from 1 to the disk space of the plan. Unlimited is not accepted.",
|
|
"x-description-pt": "Em MB, de 1 ao espaço do plano. Não se aceita quota ilimitada.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"address",
|
|
"password"
|
|
]
|
|
},
|
|
"example": {
|
|
"address": "info@example.com",
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a",
|
|
"quota_mb": 1024
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/mailboxes/{address}": {
|
|
"delete": {
|
|
"operationId": "email.mailboxes.delete",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Delete a mailbox",
|
|
"x-summary-pt": "Apagar uma caixa de e-mail",
|
|
"description": "Needs `email:write`. Needs the address in `confirm`. The messages are lost. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Precisa do endereço em `confirm`. As mensagens perdem-se. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a mailbox.",
|
|
"x-description-pt": "Apagar uma caixa de e-mail.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMailboxesDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"confirm": {
|
|
"description": "The exact name of what you are deleting, to confirm.",
|
|
"x-description-pt": "O nome exacto do que vai apagar, para confirmar.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"confirm"
|
|
]
|
|
},
|
|
"example": {
|
|
"confirm": "info@example.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/mailboxes/{address}/password": {
|
|
"put": {
|
|
"operationId": "email.mailboxes.password",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Change a mailbox password",
|
|
"x-summary-pt": "Mudar a senha de uma caixa",
|
|
"description": "Needs `email:write`. System names of the server, such as `_mainaccount`, are not accepted. The password never comes back. Limit: 10 per minute per account. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Os nomes de sistema do servidor, como `_mainaccount`, não são aceites. A senha nunca volta. Limite: 10 por minuto por hospedagem. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a mailbox password.",
|
|
"x-description-pt": "Mudar a senha de uma caixa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMailboxesPasswordResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"password_changed": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"password": {
|
|
"description": "12 to 128 characters, with at least 3 kinds among lowercase, uppercase, digits and symbols, without the account name. It never comes back.",
|
|
"x-description-pt": "De 12 a 128 caracteres, com pelo menos 3 tipos entre minúsculas, maiúsculas, números e símbolos, sem o nome da conta, nem o do utilizador ou da caixa. Nunca volta.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"password"
|
|
]
|
|
},
|
|
"example": {
|
|
"password": "pP7-kX2mQ9vL4tR8wZ3a"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/mailboxes/{address}/quota": {
|
|
"put": {
|
|
"operationId": "email.mailboxes.quota",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Change a mailbox quota",
|
|
"x-summary-pt": "Mudar a quota de uma caixa",
|
|
"description": "Needs `email:write`. The quota can never go above the disk space of the plan. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. A quota nunca passa do espaço do plano. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a mailbox quota.",
|
|
"x-description-pt": "Mudar a quota de uma caixa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMailboxesQuotaResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"quota_mb": 2048,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"quota_mb": {
|
|
"description": "In MB, from 1 to the disk space of the plan. Unlimited is not accepted.",
|
|
"x-description-pt": "Em MB, de 1 ao espaço do plano. Não se aceita quota ilimitada.",
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"required": [
|
|
"quota_mb"
|
|
]
|
|
},
|
|
"example": {
|
|
"quota_mb": 2048
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/forwarders": {
|
|
"get": {
|
|
"operationId": "email.forwarders.list",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "List forwarders",
|
|
"x-summary-pt": "Listar reencaminhadores",
|
|
"description": "Needs `email:read`. `forward_to` is `null` if the forwarder goes to a program, set in the panel. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. `forward_to` vem a `null` se o reencaminhador for para um programa, definido no painel. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "A domain of this hosting account. If omitted, the main domain.",
|
|
"x-description-pt": "Um domínio desta hospedagem. Sem ele, o domínio principal."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List forwarders.",
|
|
"x-description-pt": "Listar reencaminhadores.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailForwardersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"address": "info@example.com",
|
|
"forward_to": "ana@example.com"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.forwarders.create",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Create a forwarder",
|
|
"x-summary-pt": "Criar um reencaminhador",
|
|
"description": "Needs `email:write`. Only to email addresses, never to programs. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Só para endereços de e-mail, nunca para programas. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a forwarder.",
|
|
"x-description-pt": "Criar um reencaminhador.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailForwardersCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"forward_to": "ana@example.com",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo.",
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"description": "The address it forwards to.",
|
|
"x-description-pt": "O endereço para onde reencaminha.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"address",
|
|
"forward_to"
|
|
]
|
|
},
|
|
"example": {
|
|
"address": "info@example.com",
|
|
"forward_to": "ana@example.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/forwarders/{address}/{forward_to}": {
|
|
"delete": {
|
|
"operationId": "email.forwarders.delete",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Delete a forwarder",
|
|
"x-summary-pt": "Apagar um reencaminhador",
|
|
"description": "Needs `email:write`. Give the two addresses in the path. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Indique os dois endereços no caminho. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"name": "forward_to",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The address it forwards to.",
|
|
"x-description-pt": "O endereço para onde reencaminha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a forwarder.",
|
|
"x-description-pt": "Apagar um reencaminhador.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailForwardersDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"forward_to": "ana@example.com",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/autoresponders": {
|
|
"get": {
|
|
"operationId": "email.autoresponders.list",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "List autoresponders",
|
|
"x-summary-pt": "Listar respostas automáticas",
|
|
"description": "Needs `email:read`. The autoresponders of one domain. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. As respostas automáticas de um domínio. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "A domain of this hosting account. If omitted, the main domain.",
|
|
"x-description-pt": "Um domínio desta hospedagem. Sem ele, o domínio principal."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List autoresponders.",
|
|
"x-description-pt": "Listar respostas automáticas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutorespondersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"address": "info@example.com",
|
|
"subject": "Out of office"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/autoresponders/{address}": {
|
|
"get": {
|
|
"operationId": "email.autoresponders.get",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "See an autoresponder",
|
|
"x-summary-pt": "Ver uma resposta automática",
|
|
"description": "Needs `email:read`. With the text and the dates. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. Com o texto e as datas. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an autoresponder.",
|
|
"x-description-pt": "Ver uma resposta automática.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutorespondersGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"from": "Info",
|
|
"subject": "Out of office",
|
|
"body": "Volto na segunda.",
|
|
"html": false,
|
|
"interval_hours": 8,
|
|
"start_at": null,
|
|
"stop_at": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "email.autoresponders.put",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Save an autoresponder",
|
|
"x-summary-pt": "Gravar uma resposta automática",
|
|
"description": "Needs `email:write`. Creates or replaces the autoresponder of this address. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `email:write`. Cria ou substitui a resposta automática deste endereço. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Save an autoresponder.",
|
|
"x-description-pt": "Gravar uma resposta automática.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutorespondersPutResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"subject": "Out of office",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"description": "The name of the sender, up to 100 characters.",
|
|
"x-description-pt": "O nome do remetente, até 100 caracteres.",
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"description": "Up to 200 characters.",
|
|
"x-description-pt": "Até 200 caracteres.",
|
|
"type": "string"
|
|
},
|
|
"body": {
|
|
"description": "Up to 20000 characters.",
|
|
"x-description-pt": "Até 20000 caracteres.",
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"description": "If the text is HTML.",
|
|
"x-description-pt": "Se o texto é HTML.",
|
|
"type": "boolean"
|
|
},
|
|
"interval_hours": {
|
|
"description": "Hours between answers to the same sender, from 0 to 720. If omitted, 8.",
|
|
"x-description-pt": "Horas entre respostas ao mesmo remetente, de 0 a 720. Sem ele, 8.",
|
|
"type": "integer"
|
|
},
|
|
"start_at": {
|
|
"description": "Start, in ISO 8601.",
|
|
"x-description-pt": "Início, em ISO 8601.",
|
|
"type": "string"
|
|
},
|
|
"stop_at": {
|
|
"description": "End, in ISO 8601.",
|
|
"x-description-pt": "Fim, em ISO 8601.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"from",
|
|
"subject",
|
|
"body"
|
|
]
|
|
},
|
|
"example": {
|
|
"from": "Info",
|
|
"subject": "Out of office",
|
|
"body": "Volto na segunda."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "email.autoresponders.delete",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Delete an autoresponder",
|
|
"x-summary-pt": "Apagar uma resposta automática",
|
|
"description": "Needs `email:write`. The mailbox stays. With a `sandbox_` key it only checks the request and changes nothing.",
|
|
"x-description-pt": "Precisa de `email:write`. A caixa fica. Com uma chave `sandbox_`, só confere o pedido e não altera nada.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "address",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The full email address.",
|
|
"x-description-pt": "O endereço de e-mail completo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete an autoresponder.",
|
|
"x-description-pt": "Apagar uma resposta automática.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutorespondersDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"address": "info@example.com",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/default-address": {
|
|
"get": {
|
|
"operationId": "email.default_address.get",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "See the default address",
|
|
"x-summary-pt": "Ver a conta geral",
|
|
"description": "Needs `email:read`. What happens to mail for addresses that do not exist. `action` is `fail`, `forward`, `discard`, `main_account` or `other`. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. O que acontece ao correio para endereços que não existem. `action` é `fail`, `forward`, `discard`, `main_account` ou `other`. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "A domain of this hosting account. If omitted, the main domain.",
|
|
"x-description-pt": "Um domínio desta hospedagem. Sem ele, o domínio principal."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the default address.",
|
|
"x-description-pt": "Ver a conta geral.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDefaultAddressGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"action": "fail",
|
|
"forward_to": null,
|
|
"message": "No such person at this address."
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "email.default_address.put",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "Change the default address",
|
|
"x-summary-pt": "Alterar a conta geral",
|
|
"description": "Needs `email:write`. Accepted actions: `fail`, `forward`, `discard` and `main_account`. With a `sandbox_` key it only checks the request and changes nothing. On the domain of the account email, or of the email of a user of the account, it answers `409` with the code `account_email_domain`: make the change in the account dashboard.",
|
|
"x-description-pt": "Precisa de `email:write`. Acções aceites: `fail`, `forward`, `discard` e `main_account`. Com uma chave `sandbox_`, só confere o pedido e não altera nada. No domínio do e-mail da conta, ou do e-mail de um utilizador dela, responde `409` com o código `account_email_domain`: faça a alteração no painel da conta.",
|
|
"x-permission": "email:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change the default address.",
|
|
"x-description-pt": "Alterar a conta geral.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDefaultAddressPutResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"action": "fail",
|
|
"forward_to": null,
|
|
"message": "No such person at this address.",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"description": "A domain of this hosting account.",
|
|
"x-description-pt": "Um domínio desta hospedagem.",
|
|
"type": "string"
|
|
},
|
|
"action": {
|
|
"description": "`fail`, `forward`, `discard` or `main_account`.",
|
|
"x-description-pt": "`fail`, `forward`, `discard` ou `main_account`.",
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"description": "Needed with `forward`.",
|
|
"x-description-pt": "Necessário com `forward`.",
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"description": "The message with `fail`, up to 200 characters.",
|
|
"x-description-pt": "A mensagem com `fail`, até 200 caracteres.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"domain",
|
|
"action"
|
|
]
|
|
},
|
|
"example": {
|
|
"domain": "example.co.mz",
|
|
"action": "fail",
|
|
"message": "No such person at this address."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/email/authentication": {
|
|
"get": {
|
|
"operationId": "email.authentication.get",
|
|
"tags": [
|
|
"email"
|
|
],
|
|
"summary": "See SPF, DKIM and DMARC",
|
|
"x-summary-pt": "Ver SPF, DKIM e DMARC",
|
|
"description": "Needs `email:read`. The state of the three records of a domain, as published in DNS. If the service is not active, or is not a supported hosting account, it answers `409` with the reason in `details.reason`.",
|
|
"x-description-pt": "Precisa de `email:read`. O estado dos três registos de um domínio, como estão publicados no DNS. Se o serviço não estiver activo, ou não for uma hospedagem suportada, responde `409` com a razão em `details.reason`.",
|
|
"x-permission": "email:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the hosting service.",
|
|
"x-description-pt": "O `id` do serviço de hospedagem."
|
|
},
|
|
{
|
|
"name": "domain",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "A domain of this hosting account. If omitted, the main domain.",
|
|
"x-description-pt": "Um domínio desta hospedagem. Sem ele, o domínio principal."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See SPF, DKIM and DMARC.",
|
|
"x-description-pt": "Ver SPF, DKIM e DMARC.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAuthenticationGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"domain": "example.co.mz",
|
|
"spf": {
|
|
"state": "pass"
|
|
},
|
|
"dkim": {
|
|
"state": "valid"
|
|
},
|
|
"dmarc": {
|
|
"state": "missing"
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/stats": {
|
|
"get": {
|
|
"operationId": "sms.stats.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "See sending statistics",
|
|
"x-summary-pt": "Ver as estatísticas de envio",
|
|
"description": "Needs `sms:read`. Totals and one line per day with messages. Without dates, the last 30 days; at most 366 days. Failed, cancelled and simulated messages do not count in `credits_spent`. Scheduled messages that were not charged yet do not count either.",
|
|
"x-description-pt": "Precisa de `sms:read`. Totais e uma linha por cada dia com mensagens. Sem datas, os últimos 30 dias; no máximo 366 dias. As mensagens falhadas, canceladas e simuladas não contam em `credits_spent`. Também não contam as mensagens agendadas que ainda não foram cobradas.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date"
|
|
},
|
|
"description": "First day, `YYYY-MM-DD`.",
|
|
"x-description-pt": "Primeiro dia, `AAAA-MM-DD`."
|
|
},
|
|
{
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "date"
|
|
},
|
|
"description": "Last day, `YYYY-MM-DD`.",
|
|
"x-description-pt": "Último dia, `AAAA-MM-DD`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See sending statistics.",
|
|
"x-description-pt": "Ver as estatísticas de envio.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsStatsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"from": "2026-10-07",
|
|
"to": "2026-11-05",
|
|
"messages": 12,
|
|
"parts": 14,
|
|
"credits_spent": 13.0,
|
|
"by_status": {
|
|
"scheduled": 0,
|
|
"queued": 0,
|
|
"sending": 0,
|
|
"sent": 11,
|
|
"simulated": 0,
|
|
"failed": 1,
|
|
"cancelled": 0
|
|
},
|
|
"by_day": [
|
|
{
|
|
"date": "2026-11-05",
|
|
"messages": 12,
|
|
"sent": 11,
|
|
"failed": 1,
|
|
"credits": 13.0
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/templates": {
|
|
"get": {
|
|
"operationId": "sms.templates.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List templates",
|
|
"x-summary-pt": "Listar os modelos",
|
|
"description": "Needs `sms:read`. The templates of this account, by name.",
|
|
"x-description-pt": "Precisa de `sms:read`. Os modelos desta conta, por nome.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "category",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"general",
|
|
"notice",
|
|
"promotion",
|
|
"billing",
|
|
"confirmation"
|
|
]
|
|
},
|
|
"description": "Only this category.",
|
|
"x-description-pt": "Só esta categoria."
|
|
},
|
|
{
|
|
"name": "language",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
]
|
|
},
|
|
"description": "Only this language.",
|
|
"x-description-pt": "Só esta língua."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List templates.",
|
|
"x-description-pt": "Listar os modelos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsTemplatesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 41,
|
|
"name": "Invoice reminder",
|
|
"text": "Hi {$client_first_name}, your invoice is due today.",
|
|
"category": "notice",
|
|
"language": "pt",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "sms.templates.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Create a template",
|
|
"x-summary-pt": "Criar um modelo",
|
|
"description": "Needs `sms:write`. The name must be unique in the account. The text accepts `{$client_name}`, `{$client_first_name}`, `{$client_last_name}`, `{$client_company_name}`, `{$remetente}` and `{$data}`. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. O nome não se pode repetir na conta. O texto aceita `{$client_name}`, `{$client_first_name}`, `{$client_last_name}`, `{$client_company_name}`, `{$remetente}` e `{$data}`. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a template.",
|
|
"x-description-pt": "Criar um modelo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsTemplatesCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "Invoice reminder",
|
|
"text": "Hi {$client_first_name}, your invoice is due today.",
|
|
"category": "notice",
|
|
"language": "pt",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00",
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"text"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 100
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 1600
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"general",
|
|
"notice",
|
|
"promotion",
|
|
"billing",
|
|
"confirmation"
|
|
],
|
|
"default": "general"
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
],
|
|
"default": "pt"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "Invoice reminder",
|
|
"text": "Hi {$client_first_name}, your invoice is due today.",
|
|
"category": "notice",
|
|
"language": "pt"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/templates/{id}": {
|
|
"get": {
|
|
"operationId": "sms.templates.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "See a template",
|
|
"x-summary-pt": "Ver um modelo",
|
|
"description": "Needs `sms:read`. A template of this account.",
|
|
"x-description-pt": "Precisa de `sms:read`. Um modelo desta conta.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the template.",
|
|
"x-description-pt": "O `id` do modelo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a template.",
|
|
"x-description-pt": "Ver um modelo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsTemplatesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "Invoice reminder",
|
|
"text": "Hi {$client_first_name}, your invoice is due today.",
|
|
"category": "notice",
|
|
"language": "pt",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "sms.templates.update",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Change a template",
|
|
"x-summary-pt": "Alterar um modelo",
|
|
"description": "Needs `sms:write`. Send only the fields to change. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. Envie só os campos a alterar. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the template.",
|
|
"x-description-pt": "O `id` do modelo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a template.",
|
|
"x-description-pt": "Alterar um modelo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsTemplatesUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "Invoice reminder",
|
|
"text": "Hi {$client_first_name}, your invoice is due today.",
|
|
"category": "notice",
|
|
"language": "pt",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00",
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 100
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 1600
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"enum": [
|
|
"general",
|
|
"notice",
|
|
"promotion",
|
|
"billing",
|
|
"confirmation"
|
|
]
|
|
},
|
|
"language": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"text": "Hi {$client_first_name}, your invoice is due tomorrow."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "sms.templates.delete",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Delete a template",
|
|
"x-summary-pt": "Apagar um modelo",
|
|
"description": "Needs `sms:write`. Standard templates that are deleted do not come back. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. Os modelos padrão que forem apagados não voltam. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the template.",
|
|
"x-description-pt": "O `id` do modelo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a template.",
|
|
"x-description-pt": "Apagar um modelo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsTemplatesDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"deleted": false,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/senders/{sender}": {
|
|
"get": {
|
|
"operationId": "sms.senders.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "See a sender request",
|
|
"x-summary-pt": "Ver um pedido de remetente",
|
|
"description": "Needs `sms:read`. By `id` or by name. `note` is the note from our team. The free sender always answers as `approved`.",
|
|
"x-description-pt": "Precisa de `sms:read`. Pelo `id` ou pelo nome. `note` é a nota da nossa equipa. O remetente grátis responde sempre `approved`.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "sender",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the request or the name of the sender.",
|
|
"x-description-pt": "O `id` do pedido ou o nome do remetente."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a sender request.",
|
|
"x-description-pt": "Ver um pedido de remetente.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsSendersGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"sender": "AMINHAMARCA",
|
|
"status": "pending",
|
|
"free": false,
|
|
"entity": "My Company Ltd",
|
|
"country": "Mozambique",
|
|
"purpose": "Order updates for our customers.",
|
|
"sample": "Your order is ready.",
|
|
"note": null,
|
|
"documents": 0,
|
|
"documents_url": "https://my.example.com/sms-center.php?view=senders&language=portuguese¤cy=5",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"updated_at": "2026-11-05T09:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/opt-outs": {
|
|
"get": {
|
|
"operationId": "sms.opt_outs.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List numbers that do not receive",
|
|
"x-summary-pt": "Listar os números que não recebem",
|
|
"description": "Needs `sms:read`. The numbers this account blocked, masked. Use `number` to check one.",
|
|
"x-description-pt": "Precisa de `sms:read`. Os números que esta conta bloqueou, tapados. Use `number` para confirmar um.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "number",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Only this number, with or without the country code.",
|
|
"x-description-pt": "Só este número, com ou sem indicativo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List numbers that do not receive.",
|
|
"x-description-pt": "Listar os números que não recebem.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOptOutsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"number": "25884****567",
|
|
"created_at": "2026-11-05T09:30:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "sms.opt_outs.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Stop sending to a number",
|
|
"x-summary-pt": "Deixar de enviar a um número",
|
|
"description": "Needs `sms:write`. From now on, sending to this number answers `422` with `number_opted_out`. To take a number off the list, ask support. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. A partir daqui, enviar para este número responde `422` com `number_opted_out`. Para retirar um número da lista, fale com o suporte. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Stop sending to a number.",
|
|
"x-description-pt": "Deixar de enviar a um número.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOptOutsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"number": "25884****567",
|
|
"created_at": "2026-11-05T09:30:00+02:00",
|
|
"already_listed": false,
|
|
"simulated": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"number"
|
|
],
|
|
"properties": {
|
|
"number": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"number": "+258841234567"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/extras/catalog": {
|
|
"get": {
|
|
"operationId": "extras.catalog.list",
|
|
"tags": [
|
|
"extras"
|
|
],
|
|
"summary": "List extras for sale",
|
|
"x-summary-pt": "Listar os extras à venda",
|
|
"description": "Needs `extras:read`. Prices in the currency of the account. `purchasable` says if it can be bought through the API; if not, use `portal_url`. SiteLock has no 3 or 6 month periods. Extra IP and disk of a server are bought in the account dashboard.",
|
|
"x-description-pt": "Precisa de `extras:read`. Preços na moeda da conta. `purchasable` diz se se pode comprar pela API; se não, use `portal_url`. O SiteLock não tem períodos de 3 nem de 6 meses. O IP e o disco extra de um servidor compram-se no painel da conta.",
|
|
"x-permission": "extras:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "kind",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ssl",
|
|
"sitelock",
|
|
"website_builder",
|
|
"backup",
|
|
"email_filter",
|
|
"email",
|
|
"seo",
|
|
"monitoring",
|
|
"vpn",
|
|
"social",
|
|
"radio",
|
|
"radio_addon",
|
|
"vps_ip",
|
|
"vps_disk",
|
|
"other"
|
|
]
|
|
},
|
|
"description": "Only this kind.",
|
|
"x-description-pt": "Só este tipo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List extras for sale.",
|
|
"x-description-pt": "Listar os extras à venda.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExtrasCatalogListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 96,
|
|
"kind": "sitelock",
|
|
"name": "Fix",
|
|
"description": "Finds and removes malware from the site.",
|
|
"currency": "MZN",
|
|
"billing_cycles": [
|
|
{
|
|
"billing_cycle": "annually",
|
|
"months": 12,
|
|
"price": 5999.4,
|
|
"setup_fee": 0.0
|
|
}
|
|
],
|
|
"purchasable": true,
|
|
"requires_site": true,
|
|
"portal_url": "https://my.example.com/onestep/billingcycle?pid=96&language=portuguese¤cy=5"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/extras": {
|
|
"get": {
|
|
"operationId": "extras.list",
|
|
"tags": [
|
|
"extras"
|
|
],
|
|
"summary": "List the extras of the account",
|
|
"x-summary-pt": "Listar os extras da conta",
|
|
"description": "Needs `extras:read`. The extras of this account. The `id` starts with `s` for a service, `a` for an add-on and `v` for an extra IP or disk of a server, which also has `quantity` and `invoice_id`. Certificates have `certificate`. Access data never comes here.",
|
|
"x-description-pt": "Precisa de `extras:read`. Os extras desta conta. O `id` começa por `s` num serviço, por `a` num adicional e por `v` num IP ou disco extra de um servidor, que traz também `quantity` e `invoice_id`. Os certificados trazem `certificate`. Os dados de acesso nunca vêm aqui.",
|
|
"x-permission": "extras:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "kind",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ssl",
|
|
"sitelock",
|
|
"website_builder",
|
|
"backup",
|
|
"email_filter",
|
|
"email",
|
|
"seo",
|
|
"monitoring",
|
|
"vpn",
|
|
"social",
|
|
"radio",
|
|
"radio_addon",
|
|
"vps_ip",
|
|
"vps_disk",
|
|
"other"
|
|
]
|
|
},
|
|
"description": "Only this kind.",
|
|
"x-description-pt": "Só este tipo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the extras of the account.",
|
|
"x-description-pt": "Listar os extras da conta.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExtrasListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "s812",
|
|
"kind": "ssl",
|
|
"name": "RapidSSL",
|
|
"status": "active",
|
|
"site": null,
|
|
"parent_service_id": null,
|
|
"billing_cycle": "annually",
|
|
"amount": 1077.0,
|
|
"currency": "MZN",
|
|
"next_due_date": "2027-11-05",
|
|
"registered_at": "2026-11-05",
|
|
"manage_url": "https://my.example.com/clientarea.php?action=productdetails&id=812&language=portuguese¤cy=5",
|
|
"certificate": {
|
|
"status": "awaiting_configuration",
|
|
"expires_at": null
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/extras/{id}": {
|
|
"get": {
|
|
"operationId": "extras.get",
|
|
"tags": [
|
|
"extras"
|
|
],
|
|
"summary": "See an extra",
|
|
"x-summary-pt": "Ver um extra",
|
|
"description": "Needs `extras:read`. One extra of this account, with the `id` from the list.",
|
|
"x-description-pt": "Precisa de `extras:read`. Um extra desta conta, com o `id` da lista.",
|
|
"x-permission": "extras:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` from the list, such as `s812`.",
|
|
"x-description-pt": "O `id` da lista, como `s812`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an extra.",
|
|
"x-description-pt": "Ver um extra.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExtrasGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "s812",
|
|
"kind": "ssl",
|
|
"name": "RapidSSL",
|
|
"status": "active",
|
|
"site": null,
|
|
"parent_service_id": null,
|
|
"billing_cycle": "annually",
|
|
"amount": 1077.0,
|
|
"currency": "MZN",
|
|
"next_due_date": "2027-11-05",
|
|
"registered_at": "2026-11-05",
|
|
"manage_url": "https://my.example.com/clientarea.php?action=productdetails&id=812&language=portuguese¤cy=5",
|
|
"certificate": {
|
|
"status": "awaiting_configuration",
|
|
"expires_at": null
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/extras/purchase": {
|
|
"post": {
|
|
"operationId": "extras.purchase",
|
|
"tags": [
|
|
"extras"
|
|
],
|
|
"summary": "Buy an extra",
|
|
"x-summary-pt": "Comprar um extra",
|
|
"description": "Needs `billing:purchase`. Also needs `extras:write` and the `Idempotency-Key` header. Paid with credit only, within the spending limit of the key. Only for products with `purchasable`. SiteLock needs `site`; a certificate does not take it and is configured in the account dashboard after the purchase. Answers `202`: the action ends with the payment, and delivery is followed in `GET /v1/extras/{id}`. Limited to 5 per minute. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `extras:write` e do cabeçalho `Idempotency-Key`. Paga-se só com saldo, dentro do limite de gastos da chave. Só para produtos com `purchasable` a `true`. O SiteLock precisa de `site`; um certificado não o leva e configura-se no painel da conta depois da compra. Responde `202`: a acção acaba com o pagamento, e a entrega acompanha-se em `GET /v1/extras/{id}`. Limite de 5 por minuto. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy an extra.",
|
|
"x-description-pt": "Comprar um extra.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ExtrasPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "simulated",
|
|
"simulated": true,
|
|
"product_id": 96,
|
|
"name": "Fix",
|
|
"billing_cycle": "annually",
|
|
"site": "example.com",
|
|
"amount": 5999.4,
|
|
"currency": "MZN",
|
|
"credit_sufficient": true,
|
|
"within_spending_limit": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"product_id",
|
|
"billing_cycle"
|
|
],
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "The `id` from the catalog.",
|
|
"x-description-pt": "O `id` do catálogo."
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string",
|
|
"enum": [
|
|
"monthly",
|
|
"annually",
|
|
"biennially",
|
|
"triennially"
|
|
]
|
|
},
|
|
"site": {
|
|
"type": "string",
|
|
"description": "The domain of the site. Only for SiteLock.",
|
|
"x-description-pt": "O domínio do site. Só para o SiteLock."
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"product_id": 96,
|
|
"billing_cycle": "annually",
|
|
"site": "example.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller": {
|
|
"get": {
|
|
"operationId": "reseller.get",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See the reseller programs",
|
|
"x-summary-pt": "Ver os programas de revenda",
|
|
"description": "Needs `reseller:read`. Which reseller programs this account has: domains, SMS and hosting, and the Agency of the Reseller Program.",
|
|
"x-description-pt": "Precisa de `reseller:read`. Os programas de revenda que esta conta tem: domínios, SMS e hospedagem, e o Agency do Programa de Revenda.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the reseller programs.",
|
|
"x-description-pt": "Ver os programas de revenda.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"is_reseller": true,
|
|
"programs": {
|
|
"domains": {
|
|
"active": false
|
|
},
|
|
"sms": {
|
|
"status": "active",
|
|
"balance": 50.0,
|
|
"daily_limit": 200
|
|
},
|
|
"hosting": {
|
|
"active": true,
|
|
"accounts": 1
|
|
},
|
|
"reseller_program": {
|
|
"active": true,
|
|
"name": "Agency Plus",
|
|
"discount_percent": 15.0,
|
|
"custom_discount": false,
|
|
"fixed": false
|
|
}
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/services": {
|
|
"get": {
|
|
"operationId": "reseller.services.list",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "List reseller accounts",
|
|
"x-summary-pt": "Listar as contas de revenda",
|
|
"description": "Needs `reseller:read`. The reseller hosting accounts of this account. Access data never comes here.",
|
|
"x-description-pt": "Precisa de `reseller:read`. As contas de revenda de hospedagem desta conta. Os dados de acesso nunca vêm aqui.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List reseller accounts.",
|
|
"x-description-pt": "Listar as contas de revenda.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerServicesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 930,
|
|
"name": "Reseller I",
|
|
"domain": "example.com",
|
|
"status": "active",
|
|
"billing_cycle": "annually",
|
|
"amount": 12384.0,
|
|
"currency": "MZN",
|
|
"next_due_date": "2027-11-05",
|
|
"registered_at": "2026-11-05",
|
|
"manage_url": "https://my.example.com/clientarea.php?action=productdetails&id=930&language=portuguese¤cy=5"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/services/{id}": {
|
|
"get": {
|
|
"operationId": "reseller.services.get",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See a reseller account",
|
|
"x-summary-pt": "Ver uma conta de revenda",
|
|
"description": "Needs `reseller:read`. One reseller hosting account of this account.",
|
|
"x-description-pt": "Precisa de `reseller:read`. Uma conta de revenda de hospedagem desta conta.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the account.",
|
|
"x-description-pt": "O `id` da conta."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a reseller account.",
|
|
"x-description-pt": "Ver uma conta de revenda.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerServicesGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 930,
|
|
"name": "Reseller I",
|
|
"domain": "example.com",
|
|
"status": "active",
|
|
"billing_cycle": "annually",
|
|
"amount": 12384.0,
|
|
"currency": "MZN",
|
|
"next_due_date": "2027-11-05",
|
|
"registered_at": "2026-11-05",
|
|
"manage_url": "https://my.example.com/clientarea.php?action=productdetails&id=930&language=portuguese¤cy=5"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/messages/{id}/cancel": {
|
|
"post": {
|
|
"operationId": "sms.messages.cancel",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Cancel a scheduled SMS",
|
|
"x-summary-pt": "Cancelar um SMS agendado",
|
|
"description": "Needs `sms:write`. Only messages of this account that are still `scheduled` can be cancelled. If the credits were already charged they go back to the balance, and `credits_returned` says how many; a scheduled message is usually only charged when it goes out, so there is often nothing to return. A message that already went out, is going out, or was already cancelled returns `409` with `details.reason` set to `not_cancellable`. With a Sandbox key, or while the API is in preparation, it checks everything and changes nothing. Send `Idempotency-Key` so a retry gives the same answer.",
|
|
"x-description-pt": "Precisa de `sms:write`. Só se cancelam mensagens desta conta que ainda estejam `scheduled`. Se os créditos já tiverem sido cobrados, voltam ao saldo, e `credits_returned` diz quantos; normalmente uma mensagem agendada só se cobra quando sai, e por isso muitas vezes não há nada a devolver. Uma mensagem que já saiu, que está a sair ou que já foi cancelada responde `409`, com `details.reason` a `not_cancellable`. Com uma chave de Sandbox, ou enquanto a API está em preparação, confere tudo e não muda nada. Envie `Idempotency-Key` para uma repetição dar a mesma resposta.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when sending.",
|
|
"x-description-pt": "O `id` devolvido ao enviar."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Cancel a scheduled SMS.",
|
|
"x-description-pt": "Cancelar um SMS agendado.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsMessagesCancelResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "412",
|
|
"status": "cancelled",
|
|
"simulated": false,
|
|
"to": "25884****567",
|
|
"sender": "NETMSG",
|
|
"parts": 1,
|
|
"encoding": "GSM",
|
|
"credits": 1.0,
|
|
"charged": false,
|
|
"mode": "production",
|
|
"error": null,
|
|
"scheduled_for": "2026-11-20T09:30:00+02:00",
|
|
"created_at": "2026-11-10T12:00:00+02:00",
|
|
"sent_at": null,
|
|
"credits_returned": 0.0
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
},
|
|
"X-API-Simulated": {
|
|
"$ref": "#/components/headers/X-API-Simulated"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/SmsResellerRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/contacts": {
|
|
"get": {
|
|
"operationId": "sms.contacts.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List contacts",
|
|
"x-summary-pt": "Listar os contactos",
|
|
"description": "Needs `sms:read`. The SMS contacts of this account, by name, with their groups.",
|
|
"x-description-pt": "Precisa de `sms:read`. Os contactos de SMS desta conta, por nome, com os grupos.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "group",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Only the contacts in this group (its id).",
|
|
"x-description-pt": "Só os contactos deste grupo (o número dele)."
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Name, company, email or part of the number.",
|
|
"x-description-pt": "Nome, empresa, e-mail ou parte do número."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List contacts.",
|
|
"x-description-pt": "Listar os contactos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsContactsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 512,
|
|
"name": "Ana Silva",
|
|
"company": "Example Ltd",
|
|
"phone": "+258841234567",
|
|
"email": "ana@example.com",
|
|
"notes": "Prefers mornings",
|
|
"groups": [
|
|
{
|
|
"id": 9,
|
|
"name": "Customers"
|
|
}
|
|
],
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"updated_at": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "sms.contacts.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Create a contact",
|
|
"x-summary-pt": "Criar um contacto",
|
|
"description": "Needs `sms:write`. The phone number must be unique in the account. Up to 20,000 contacts. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. O número não se pode repetir na conta. Até 20 000 contactos. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a contact.",
|
|
"x-description-pt": "Criar um contacto.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsContactsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 512,
|
|
"name": "Ana Silva",
|
|
"company": "Example Ltd",
|
|
"phone": "+258841234567",
|
|
"email": "ana@example.com",
|
|
"notes": "Prefers mornings",
|
|
"groups": [
|
|
{
|
|
"id": 9,
|
|
"name": "Customers"
|
|
}
|
|
],
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"updated_at": null,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"phone"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"description": "The contact name. Name or company is required.",
|
|
"x-description-pt": "O nome do contacto. É preciso o nome ou a empresa."
|
|
},
|
|
"company": {
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"description": "With or without the country code; unique in the account.",
|
|
"x-description-pt": "Com ou sem indicativo; único na conta."
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"maxLength": 150,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"notes": {
|
|
"type": "string",
|
|
"maxLength": 190,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Optional. Group ids from GET /v1/sms/groups; replaces the current groups.",
|
|
"x-description-pt": "Opcional. Números dos grupos de GET /v1/sms/groups; substitui os grupos actuais."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "Ana Silva",
|
|
"company": "Example Ltd",
|
|
"phone": "+258841234567",
|
|
"email": "ana@example.com",
|
|
"groups": [
|
|
9
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/contacts/{id}": {
|
|
"get": {
|
|
"operationId": "sms.contacts.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Get a contact",
|
|
"x-summary-pt": "Ver um contacto",
|
|
"description": "Needs `sms:read`.",
|
|
"x-description-pt": "Precisa de `sms:read`.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the contact.",
|
|
"x-description-pt": "O `id` do contacto."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get a contact.",
|
|
"x-description-pt": "Ver um contacto.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsContactsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 512,
|
|
"name": "Ana Silva",
|
|
"company": "Example Ltd",
|
|
"phone": "+258841234567",
|
|
"email": "ana@example.com",
|
|
"notes": "Prefers mornings",
|
|
"groups": [
|
|
{
|
|
"id": 9,
|
|
"name": "Customers"
|
|
}
|
|
],
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"updated_at": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "sms.contacts.update",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Update a contact",
|
|
"x-summary-pt": "Alterar um contacto",
|
|
"description": "Needs `sms:write`. Send only the fields to change; `groups` replaces the current groups. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. Envie só os campos a mudar; `groups` substitui os grupos actuais. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the contact.",
|
|
"x-description-pt": "O `id` do contacto."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Update a contact.",
|
|
"x-description-pt": "Alterar um contacto.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsContactsUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 512,
|
|
"name": "Ana Silva",
|
|
"company": "Example Ltd",
|
|
"phone": "+258841234567",
|
|
"email": "ana@example.com",
|
|
"notes": "Call after 10am",
|
|
"groups": [
|
|
{
|
|
"id": 9,
|
|
"name": "Customers"
|
|
}
|
|
],
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"updated_at": null,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"description": "The contact name. Name or company is required.",
|
|
"x-description-pt": "O nome do contacto. É preciso o nome ou a empresa."
|
|
},
|
|
"company": {
|
|
"type": "string",
|
|
"maxLength": 100,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"description": "With or without the country code; unique in the account.",
|
|
"x-description-pt": "Com ou sem indicativo; único na conta."
|
|
},
|
|
"email": {
|
|
"type": "string",
|
|
"maxLength": 150,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"notes": {
|
|
"type": "string",
|
|
"maxLength": 190,
|
|
"description": "Optional.",
|
|
"x-description-pt": "Opcional."
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Optional. Group ids from GET /v1/sms/groups; replaces the current groups.",
|
|
"x-description-pt": "Opcional. Números dos grupos de GET /v1/sms/groups; substitui os grupos actuais."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"notes": "Call after 10am",
|
|
"groups": [
|
|
9,
|
|
12
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "sms.contacts.delete",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Delete a contact",
|
|
"x-summary-pt": "Apagar um contacto",
|
|
"description": "Needs `sms:write`. Messages already sent stay in the history. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. As mensagens já enviadas continuam no histórico. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the contact.",
|
|
"x-description-pt": "O `id` do contacto."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a contact.",
|
|
"x-description-pt": "Apagar um contacto.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsContactsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 512,
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/groups": {
|
|
"get": {
|
|
"operationId": "sms.groups.list",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "List contact groups",
|
|
"x-summary-pt": "Listar os grupos de contactos",
|
|
"description": "Needs `sms:read`. The groups of this account, by name, with how many contacts each one has.",
|
|
"x-description-pt": "Precisa de `sms:read`. Os grupos desta conta, por nome, com quantos contactos tem cada um.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List contact groups.",
|
|
"x-description-pt": "Listar os grupos de contactos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsGroupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 9,
|
|
"name": "Customers",
|
|
"contacts": 128,
|
|
"created_at": "2026-11-11T09:30:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "sms.groups.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Create a contact group",
|
|
"x-summary-pt": "Criar um grupo de contactos",
|
|
"description": "Needs `sms:write`. The name must be unique in the account. Up to 100 groups. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. O nome não se pode repetir na conta. Até 100 grupos. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a contact group.",
|
|
"x-description-pt": "Criar um grupo de contactos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsGroupsCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 9,
|
|
"name": "Customers",
|
|
"contacts": 0,
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 60,
|
|
"description": "Unique in the account.",
|
|
"x-description-pt": "Único na conta."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "Customers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/groups/{id}": {
|
|
"get": {
|
|
"operationId": "sms.groups.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Get a contact group",
|
|
"x-summary-pt": "Ver um grupo de contactos",
|
|
"description": "Needs `sms:read`.",
|
|
"x-description-pt": "Precisa de `sms:read`.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the group.",
|
|
"x-description-pt": "O `id` do grupo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get a contact group.",
|
|
"x-description-pt": "Ver um grupo de contactos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsGroupsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 9,
|
|
"name": "Customers",
|
|
"contacts": 128,
|
|
"created_at": "2026-11-11T09:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "sms.groups.update",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Rename a contact group",
|
|
"x-summary-pt": "Mudar o nome de um grupo",
|
|
"description": "Needs `sms:write`. Limited to 20 changes per minute.",
|
|
"x-description-pt": "Precisa de `sms:write`. Limite de 20 alterações por minuto.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the group.",
|
|
"x-description-pt": "O `id` do grupo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Rename a contact group.",
|
|
"x-description-pt": "Mudar o nome de um grupo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsGroupsUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 9,
|
|
"name": "VIP customers",
|
|
"contacts": 128,
|
|
"created_at": "2026-11-11T09:30:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"maxLength": 60,
|
|
"description": "Unique in the account.",
|
|
"x-description-pt": "Único na conta."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "VIP customers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "sms.groups.delete",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Delete a contact group",
|
|
"x-summary-pt": "Apagar um grupo de contactos",
|
|
"description": "Needs `sms:write`. The contacts are not deleted: they just leave the group. Limited to 20 changes per minute. A group that triggers an E-mail Center automation (a welcome series) is refused with `409 group_triggers_automation`, which names the automation in `details` (`automation_id`, `automation_name`): delete the automation first, on the Automation tab of E-mail Center. Turning it off is not enough, because it would be left pointing at a group that no longer exists.",
|
|
"x-description-pt": "Precisa de `sms:write`. Os contactos não são apagados: só saem do grupo. Limite de 20 alterações por minuto. Um grupo que dispara uma automação do E-mail Center (uma série de boas-vindas) é recusado com `409 group_triggers_automation`, que diz qual é a automação em `details` (`automation_id`, `automation_name`): apague primeiro a automação, no separador Automação do E-mail Center. Desligá-la não basta, porque ficaria a apontar para um grupo que já não existe.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the group.",
|
|
"x-description-pt": "O `id` do grupo."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a contact group.",
|
|
"x-description-pt": "Apagar um grupo de contactos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsGroupsDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 9,
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp": {
|
|
"post": {
|
|
"operationId": "sms.otp.create",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Send a verification code",
|
|
"x-summary-pt": "Enviar um código de verificação",
|
|
"description": "Needs `sms:write`. We generate the code, send it by SMS straight away and keep only its hash. Verify it with POST /v1/sms/otp/{id}/verify. A new code for the same number cancels the previous one. No limits by default; you can set a maximum per number per hour in PUT /v1/sms/otp-settings. The SMS costs credits like any other; with a sandbox key nothing is sent or charged and the response includes `code`, so you can test the verification.",
|
|
"x-description-pt": "Precisa de `sms:write`. Geramos o código, enviamo-lo por SMS na hora e guardamos só o hash. Confira-o com POST /v1/sms/otp/{id}/verify. Um código novo para o mesmo número anula o anterior. Sem limites por omissão; pode definir um máximo por número e por hora em PUT /v1/sms/otp-settings. O SMS gasta créditos como os outros; com uma chave sandbox nada se envia nem se cobra e a resposta traz o `code`, para testar a conferência.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Send a verification code.",
|
|
"x-description-pt": "Enviar um código de verificação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "otp_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
|
|
"status": "pending",
|
|
"to": "+25884***4567",
|
|
"sender": "MYBRAND",
|
|
"attempts": 0,
|
|
"attempts_left": 5,
|
|
"max_attempts": 5,
|
|
"message_id": "18342",
|
|
"mode": "production",
|
|
"expires_at": "2026-11-12T10:35:00+02:00",
|
|
"verified_at": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"parts": 1,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"number"
|
|
],
|
|
"properties": {
|
|
"number": {
|
|
"type": "string",
|
|
"description": "Mobile number in Mozambique or Angola, with or without the country code.",
|
|
"x-description-pt": "Número de telemóvel de Moçambique ou Angola, com ou sem indicativo."
|
|
},
|
|
"sender": {
|
|
"type": "string",
|
|
"description": "Optional. An approved sender ID for the country of the number; without it, the free sender.",
|
|
"x-description-pt": "Opcional. Um Sender ID aprovado para o país do número; sem ele, o remetente grátis."
|
|
},
|
|
"length": {
|
|
"type": "integer",
|
|
"minimum": 4,
|
|
"maximum": 8,
|
|
"default": 6,
|
|
"description": "Digits in the code.",
|
|
"x-description-pt": "Algarismos do código."
|
|
},
|
|
"expires_in": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 60,
|
|
"default": 5,
|
|
"description": "Minutes the code stays valid.",
|
|
"x-description-pt": "Minutos em que o código vale."
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 10,
|
|
"default": 5,
|
|
"description": "Wrong attempts allowed before the code fails.",
|
|
"x-description-pt": "Tentativas erradas antes de o código falhar."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"maxLength": 300,
|
|
"description": "Optional. Your own text, with `{code}` once and, if you like, `{minutes}`. The default text fits in one SMS.",
|
|
"x-description-pt": "Opcional. O seu texto, com `{code}` uma vez e, se quiser, `{minutes}`. O texto de omissão cabe num só SMS."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"number": "+258841234567",
|
|
"sender": "MYBRAND",
|
|
"length": 6,
|
|
"expires_in": 5
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp/{id}": {
|
|
"get": {
|
|
"operationId": "sms.otp.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Get a verification code",
|
|
"x-summary-pt": "Ver um código de verificação",
|
|
"description": "Needs `sms:read`. The status, never the code.",
|
|
"x-description-pt": "Precisa de `sms:read`. O estado, nunca o código.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the code was sent (otp_...).",
|
|
"x-description-pt": "O `id` devolvido quando o código foi enviado (otp_...)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get a verification code.",
|
|
"x-description-pt": "Ver um código de verificação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "otp_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
|
|
"status": "pending",
|
|
"to": "+25884***4567",
|
|
"sender": "MYBRAND",
|
|
"attempts": 0,
|
|
"attempts_left": 5,
|
|
"max_attempts": 5,
|
|
"message_id": "18342",
|
|
"mode": "production",
|
|
"expires_at": "2026-11-12T10:35:00+02:00",
|
|
"verified_at": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp/{id}/verify": {
|
|
"post": {
|
|
"operationId": "sms.otp.verify",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Verify a code",
|
|
"x-summary-pt": "Conferir um código",
|
|
"description": "Needs `sms:write`. Compares the code the user typed in constant time. `valid` says if it matched; each wrong code uses one attempt and, with none left, the status becomes `failed`. Spaces are ignored. A verified, expired or failed code always answers `valid: false`.",
|
|
"x-description-pt": "Precisa de `sms:write`. Compara em tempo constante o código que o utilizador escreveu. `valid` diz se bateu; cada código errado gasta uma tentativa e, sem tentativas, o estado passa a `failed`. Os espaços não contam. Um código já conferido, expirado ou falhado responde sempre `valid: false`.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the code was sent (otp_...).",
|
|
"x-description-pt": "O `id` devolvido quando o código foi enviado (otp_...)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verify a code.",
|
|
"x-description-pt": "Conferir um código.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpVerifyResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "otp_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
|
|
"status": "verified",
|
|
"to": "+25884***4567",
|
|
"sender": "MYBRAND",
|
|
"attempts": 1,
|
|
"attempts_left": 4,
|
|
"max_attempts": 5,
|
|
"message_id": "18342",
|
|
"mode": "production",
|
|
"expires_at": "2026-11-12T10:35:00+02:00",
|
|
"verified_at": "2026-11-12T10:31:10+02:00",
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"valid": true
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"code"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "The code the user typed.",
|
|
"x-description-pt": "O código que o utilizador escreveu."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"code": "482913"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp/{id}/cancel": {
|
|
"post": {
|
|
"operationId": "sms.otp.cancel",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Cancel a verification code",
|
|
"x-summary-pt": "Cancelar um código de verificação",
|
|
"description": "Needs `sms:write`. A pending code stops being valid. The SMS already sent is not refunded.",
|
|
"x-description-pt": "Precisa de `sms:write`. Um código pendente deixa de valer. O SMS já enviado não é devolvido.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the code was sent (otp_...).",
|
|
"x-description-pt": "O `id` devolvido quando o código foi enviado (otp_...)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Cancel a verification code.",
|
|
"x-description-pt": "Cancelar um código de verificação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpCancelResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "otp_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
|
|
"status": "cancelled",
|
|
"to": "+25884***4567",
|
|
"sender": "MYBRAND",
|
|
"attempts": 0,
|
|
"attempts_left": 5,
|
|
"max_attempts": 5,
|
|
"message_id": "18342",
|
|
"mode": "production",
|
|
"expires_at": "2026-11-12T10:35:00+02:00",
|
|
"verified_at": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/messages/batch": {
|
|
"post": {
|
|
"operationId": "sms.messages.batch",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Send messages in a batch",
|
|
"x-summary-pt": "Enviar mensagens em lote",
|
|
"description": "Needs `sms:write`. No limit on the number of messages (only the request size, 1 MB, counts), each with its own number and, if you like, its own text; `sender`, `text` and `send_at` apply to all. Each message follows the same rules as POST /v1/sms/messages and `results` says what happened to each one (`error` uses the same reasons). Messages join the queue (sent every minute); up to 20 go out straight away. Without enough credits or at the daily limit, the rest are rejected. With a sandbox key nothing is sent or charged.",
|
|
"x-description-pt": "Precisa de `sms:write`. Sem limite de mensagens (só conta o tamanho do pedido, 1 MB), cada uma com o seu número e, se quiser, o seu texto; `sender`, `text` e `send_at` valem para todas. Cada mensagem segue as regras de POST /v1/sms/messages e `results` diz o que aconteceu a cada uma (`error` usa as mesmas razões). As mensagens entram na fila (sai a cada minuto); até 20 saem logo. Sem créditos ou no limite do dia, as restantes são recusadas. Com uma chave sandbox nada se envia nem se cobra.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Send messages in a batch.",
|
|
"x-description-pt": "Enviar mensagens em lote.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsBatchResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"total": 3,
|
|
"accepted": 2,
|
|
"rejected": 1,
|
|
"credits": 2.0,
|
|
"scheduled_for": null,
|
|
"simulated": false,
|
|
"results": [
|
|
{
|
|
"index": 0,
|
|
"id": "18401",
|
|
"status": "queued",
|
|
"to": "25884****567",
|
|
"parts": 1
|
|
},
|
|
{
|
|
"index": 1,
|
|
"id": "18402",
|
|
"status": "queued",
|
|
"to": "25886****543",
|
|
"parts": 1
|
|
},
|
|
{
|
|
"index": 2,
|
|
"id": null,
|
|
"status": "rejected",
|
|
"error": "invalid_number"
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"messages"
|
|
],
|
|
"properties": {
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Text for every message without its own.",
|
|
"x-description-pt": "Texto das mensagens que não tragam o seu."
|
|
},
|
|
"send_at": {
|
|
"type": "string",
|
|
"description": "Optional, ISO 8601 with time zone.",
|
|
"x-description-pt": "Opcional, ISO 8601 com fuso."
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"number"
|
|
],
|
|
"properties": {
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"sender": "MYBRAND",
|
|
"text": "Your order is ready for pickup.",
|
|
"messages": [
|
|
{
|
|
"number": "+258841234567"
|
|
},
|
|
{
|
|
"number": "+258869876543",
|
|
"text": "Your order is ready in Maputo."
|
|
},
|
|
{
|
|
"number": "12"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp/{id}/resend": {
|
|
"post": {
|
|
"operationId": "sms.otp.resend",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Resend a verification code",
|
|
"x-summary-pt": "Reenviar um código de verificação",
|
|
"description": "Needs `sms:write`. Sends a NEW code on the same request (`id` stays the same) and restarts the validity; wrong attempts already used stay used. No limit on resends by default; a wait between resends and an hourly limit per number apply only if you set them in PUT /v1/sms/otp-settings. Only for `pending` or `expired` codes. With a sandbox key the response includes `code`.",
|
|
"x-description-pt": "Precisa de `sms:write`. Envia um código NOVO no mesmo pedido (o `id` mantém-se) e a validade volta a contar; as tentativas erradas já gastas continuam gastas. Sem limite de reenvios por omissão; a espera entre reenvios e o limite por número e por hora só valem se os definir em PUT /v1/sms/otp-settings. Só para códigos `pending` ou `expired`. Com uma chave sandbox a resposta traz o `code`.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the code was sent (otp_...).",
|
|
"x-description-pt": "O `id` devolvido quando o código foi enviado (otp_...)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Resend a verification code.",
|
|
"x-description-pt": "Reenviar um código de verificação.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpResendResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "otp_3f9a1c2b7d4e5f60718293a4b5c6d7e8",
|
|
"status": "pending",
|
|
"to": "25884****567",
|
|
"sender": "MYBRAND",
|
|
"attempts": 1,
|
|
"attempts_left": 4,
|
|
"max_attempts": 5,
|
|
"message_id": "18410",
|
|
"mode": "production",
|
|
"resends": 1,
|
|
"expires_at": "2026-11-12T10:41:00+02:00",
|
|
"verified_at": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/webhook": {
|
|
"get": {
|
|
"operationId": "sms.webhook.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Get the delivery webhook",
|
|
"x-summary-pt": "Ver o webhook de entregas",
|
|
"description": "Needs `sms:read`. The address, the events and the last delivery; never the secret. We POST a JSON body `{\"event\": \"sms.sent\" | \"sms.failed\", \"created_at\", \"data\": {...}}` (`data` has the same fields as GET /v1/sms/messages/{id}) to your HTTPS address on port 443, only for messages created after the webhook was saved. Check the `X-Webhook-Signature: t=<unix time>,v1=<hex>` header: v1 is HMAC-SHA256 of `t + \".\" + raw body` with your secret; reject old timestamps. Answer with any 2xx within 5 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h. Internal or private addresses are refused.",
|
|
"x-description-pt": "Precisa de `sms:read`. O endereço, os eventos e a última entrega; nunca o segredo. Fazemos POST de um JSON `{\"event\": \"sms.sent\" | \"sms.failed\", \"created_at\", \"data\": {...}}` (`data` com os campos de GET /v1/sms/messages/{id}) para o seu endereço HTTPS na porta 443, só para mensagens criadas depois de o webhook ser gravado. Confira o cabeçalho `X-Webhook-Signature: t=<hora unix>,v1=<hex>`: v1 é o HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; recuse horas antigas. Responda com qualquer 2xx em 5 segundos; senão tentamos de novo após 1 min, 5 min, 30 min, 2 h e 6 h. Endereços internos ou privados são recusados.",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the delivery webhook.",
|
|
"x-description-pt": "Ver o webhook de entregas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsWebhookGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.com/webhooks/sms",
|
|
"events": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
],
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"updated_at": "2026-11-12T10:30:00+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "sms.webhook.set",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Save the delivery webhook",
|
|
"x-summary-pt": "Gravar o webhook de entregas",
|
|
"description": "Needs `sms:write`. Creates or changes the address. The `secret` is shown only when the webhook is created or with `rotate_secret: true`: keep it. We POST a JSON body `{\"event\": \"sms.sent\" | \"sms.failed\", \"created_at\", \"data\": {...}}` (`data` has the same fields as GET /v1/sms/messages/{id}) to your HTTPS address on port 443, only for messages created after the webhook was saved. Check the `X-Webhook-Signature: t=<unix time>,v1=<hex>` header: v1 is HMAC-SHA256 of `t + \".\" + raw body` with your secret; reject old timestamps. Answer with any 2xx within 5 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h. Internal or private addresses are refused. Events chosen in PUT /v1/webhooks are kept.",
|
|
"x-description-pt": "Precisa de `sms:write`. Cria ou muda o endereço. O `secret` só aparece quando o webhook nasce ou com `rotate_secret: true`: guarde-o. Fazemos POST de um JSON `{\"event\": \"sms.sent\" | \"sms.failed\", \"created_at\", \"data\": {...}}` (`data` com os campos de GET /v1/sms/messages/{id}) para o seu endereço HTTPS na porta 443, só para mensagens criadas depois de o webhook ser gravado. Confira o cabeçalho `X-Webhook-Signature: t=<hora unix>,v1=<hex>`: v1 é o HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; recuse horas antigas. Responda com qualquer 2xx em 5 segundos; senão tentamos de novo após 1 min, 5 min, 30 min, 2 h e 6 h. Endereços internos ou privados são recusados. Os eventos escolhidos em PUT /v1/webhooks ficam.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Save the delivery webhook.",
|
|
"x-description-pt": "Gravar o webhook de entregas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsWebhookSetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.com/webhooks/sms",
|
|
"events": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
],
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"updated_at": "2026-11-12T10:30:00+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null,
|
|
"secret": "whsec_8c1f0e2d4b6a7c9e1f3a5b7d9e0c2a4b6d8f0a1c3e5b7d9f",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "HTTPS address, port 443.",
|
|
"x-description-pt": "Endereço HTTPS, porta 443."
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
]
|
|
},
|
|
"description": "Default: both.",
|
|
"x-description-pt": "Por omissão: os dois."
|
|
},
|
|
"rotate_secret": {
|
|
"type": "boolean",
|
|
"description": "Create a new secret.",
|
|
"x-description-pt": "Criar um segredo novo."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"url": "https://example.com/webhooks/sms",
|
|
"events": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "sms.webhook.delete",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Delete the delivery webhook",
|
|
"x-summary-pt": "Apagar o webhook de entregas",
|
|
"description": "Needs `sms:write`. Pending deliveries are cancelled.",
|
|
"x-description-pt": "Precisa de `sms:write`. As entregas por fazer são canceladas.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete the delivery webhook.",
|
|
"x-description-pt": "Apagar o webhook de entregas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsWebhookDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/webhook/test": {
|
|
"post": {
|
|
"operationId": "sms.webhook.test",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Test the delivery webhook",
|
|
"x-summary-pt": "Testar o webhook de entregas",
|
|
"description": "Needs `sms:write`. Sends a signed `webhook.test` event to the saved address now and returns what your server answered.",
|
|
"x-description-pt": "Precisa de `sms:write`. Envia já um evento `webhook.test` assinado para o endereço gravado e devolve o que o seu servidor respondeu.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Test the delivery webhook.",
|
|
"x-description-pt": "Testar o webhook de entregas.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsWebhookTestResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"delivered": true,
|
|
"status_code": 200,
|
|
"error": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/otp-settings": {
|
|
"get": {
|
|
"operationId": "sms.otp.settings.get",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Get the verification code rules",
|
|
"x-summary-pt": "Ver as regras dos códigos",
|
|
"description": "Needs `sms:read`. By default there are no limits (0).",
|
|
"x-description-pt": "Precisa de `sms:read`. Por omissão não há limites (0).",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the verification code rules.",
|
|
"x-description-pt": "Ver as regras dos códigos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpSettingsResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"resend_wait_seconds": 0,
|
|
"max_codes_per_number_per_hour": 0
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "sms.otp.settings.set",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Set the verification code rules",
|
|
"x-summary-pt": "Definir as regras dos códigos",
|
|
"description": "Needs `sms:write`. Send only what you want to change; 0 removes the limit. The same rules can be changed in the account dashboard, on the API keys page.",
|
|
"x-description-pt": "Precisa de `sms:write`. Envie só o que quer mudar; 0 tira o limite. As mesmas regras mudam-se no painel da conta, na página das chaves da API.",
|
|
"x-permission": "sms:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Set the verification code rules.",
|
|
"x-description-pt": "Definir as regras dos códigos.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsOtpSettingsSetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"resend_wait_seconds": 30,
|
|
"max_codes_per_number_per_hour": 5,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"resend_wait_seconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 3600,
|
|
"description": "Seconds between resends of the same code. 0 = no limit (default).",
|
|
"x-description-pt": "Segundos entre reenvios do mesmo código. 0 = sem limite (omissão)."
|
|
},
|
|
"max_codes_per_number_per_hour": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1000,
|
|
"description": "Codes (new and resent) per number per hour. 0 = no limit (default).",
|
|
"x-description-pt": "Códigos (novos e reenviados) por número e por hora. 0 = sem limite (omissão)."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"resend_wait_seconds": 30,
|
|
"max_codes_per_number_per_hour": 5
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/messages": {
|
|
"post": {
|
|
"operationId": "email.messages.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Send an email",
|
|
"x-summary-pt": "Enviar um e-mail",
|
|
"description": "Needs `email_center:write`. Each recipient (to, cc and bcc, up to 50) is one email and one credit. Addresses on the suppression list are removed and listed in `suppressed`; if none is left, the API answers 422 `all_recipients_suppressed`. Without `send_at` the email goes out straight away and the answer has the real status. With a sandbox key, or while E-mail Center is in test mode, nothing is sent or charged: the email is `simulated` and the simulated events are recorded (`bounce@example.com` simulates a bounce, `complaint@example.com` a complaint). Send `Idempotency-Key` so a retry never sends twice.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Cada destinatário (to, cc e bcc, até 50) é um e-mail e um crédito. Os endereços da lista de bloqueados saem e vêm em `suppressed`; se não sobrar nenhum, a API responde 422 `all_recipients_suppressed`. Sem `send_at` o e-mail sai logo e a resposta traz o estado real. Com uma chave sandbox, ou com o E-mail Center em modo de teste, nada se envia nem se cobra: o e-mail fica `simulated` e os eventos da simulação ficam registados (`bounce@example.com` simula uma devolução, `complaint@example.com` uma queixa). Envie `Idempotency-Key` para uma repetição nunca enviar duas vezes.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Send an email.",
|
|
"x-description-pt": "Enviar um e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMessageCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "5120",
|
|
"status": "sent",
|
|
"simulated": false,
|
|
"from": "notifications@example.com",
|
|
"to": [
|
|
"ana@example.org"
|
|
],
|
|
"cc": [],
|
|
"bcc": [],
|
|
"reply_to": [
|
|
"support@example.com"
|
|
],
|
|
"subject": "Your order 1234 is ready",
|
|
"recipients": 1,
|
|
"credits": 1.0,
|
|
"charged": true,
|
|
"source": "api",
|
|
"template_id": 7,
|
|
"attachments": [],
|
|
"error": null,
|
|
"scheduled_for": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"sent_at": "2026-11-12T10:30:01+02:00",
|
|
"from_name": "Example Ltd",
|
|
"suppressed": []
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"from",
|
|
"to"
|
|
],
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Sender at a verified domain (or a subdomain of it): `notifications@example.com` or `Example Ltd <notifications@example.com>`.",
|
|
"x-description-pt": "Remetente num domínio verificado (ou subdomínio dele): `notifications@example.com` ou `Empresa <notifications@example.com>`."
|
|
},
|
|
"from_name": {
|
|
"type": "string",
|
|
"description": "Optional display name.",
|
|
"x-description-pt": "Nome a mostrar, opcional."
|
|
},
|
|
"to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "One address, a comma-separated list or an array.",
|
|
"x-description-pt": "Um endereço, uma lista separada por vírgulas ou um array."
|
|
},
|
|
"cc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"bcc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "Up to 5 addresses.",
|
|
"x-description-pt": "Até 5 endereços."
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Up to 998 characters. May use {{variables}}.",
|
|
"x-description-pt": "Até 998 caracteres. Pode usar {{variáveis}}."
|
|
},
|
|
"html": {
|
|
"type": "string",
|
|
"description": "HTML body. Values of {{variables}} are HTML-escaped.",
|
|
"x-description-pt": "Corpo em HTML. Os valores das {{variáveis}} entram escapados."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Plain text body.",
|
|
"x-description-pt": "Corpo em texto simples."
|
|
},
|
|
"template_id": {
|
|
"type": "integer",
|
|
"description": "A template of this account; empty subject, html and text come from it.",
|
|
"x-description-pt": "Um modelo desta conta; o assunto, o html e o text vazios vêm dele."
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Values for {{name}} placeholders, as an object.",
|
|
"x-description-pt": "Os valores das marcas {{nome}}, num objecto."
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "Base64.",
|
|
"x-description-pt": "Base64."
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Base64 files; 5 MB in total by default, executables refused.",
|
|
"x-description-pt": "Ficheiros em base64; 5 MB no total por omissão, executáveis recusados."
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"maxProperties": 20,
|
|
"description": "Optional headers of your own, as an object of names and values: your X- headers (such as `X-Order-Id` or `X-Campaign`) and List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority and Sensitivity. Up to 20, one-line values up to 998 characters. X- headers that are ours, of sending providers (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) or that describe a path or an origin (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) are refused with 422 `invalid_headers`, which lists the names in `details.invalid`.",
|
|
"x-description-pt": "Cabeçalhos seus, opcionais, num objecto de nomes e valores: os seus X- (como `X-Order-Id` ou `X-Campaign`) e List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority e Sensitivity. Até 20, valores numa linha até 998 caracteres. Os X- nossos, dos fornecedores de envio (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) ou que descrevem um caminho ou uma origem (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) são recusados com 422 `invalid_headers`, que traz os nomes em `details.invalid`."
|
|
},
|
|
"send_at": {
|
|
"type": "string",
|
|
"description": "Optional, ISO 8601 with time zone, up to 30 days ahead by default.",
|
|
"x-description-pt": "Opcional, ISO 8601 com fuso, até 30 dias por omissão."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"from": "Example Ltd <notifications@example.com>",
|
|
"to": [
|
|
"ana@example.org"
|
|
],
|
|
"reply_to": "support@example.com",
|
|
"template_id": 7,
|
|
"variables": {
|
|
"name": "Ana",
|
|
"order": "1234"
|
|
},
|
|
"headers": {
|
|
"X-Order-Id": "1234",
|
|
"X-Campaign": "order-ready"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"operationId": "email.messages.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List emails",
|
|
"x-summary-pt": "Listar os e-mails",
|
|
"description": "Needs `email_center:read`. Newest first, without the content (see GET /v1/email/messages/{id}).",
|
|
"x-description-pt": "Precisa de `email_center:read`. Os mais recentes primeiro, sem o conteúdo (veja GET /v1/email/messages/{id}).",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "One of: queued, scheduled, sending, sent, delivered, bounced, complained, failed, simulated, cancelled.",
|
|
"x-description-pt": "Um de: queued, scheduled, sending, sent, delivered, bounced, complained, failed, simulated, cancelled."
|
|
},
|
|
{
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "From this day, YYYY-MM-DD.",
|
|
"x-description-pt": "Desde este dia, AAAA-MM-DD."
|
|
},
|
|
{
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Up to this day, YYYY-MM-DD.",
|
|
"x-description-pt": "Até este dia, AAAA-MM-DD."
|
|
},
|
|
{
|
|
"name": "recipient",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Only emails to this address (to, cc or bcc).",
|
|
"x-description-pt": "Só os e-mails para este endereço (to, cc ou bcc)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List emails.",
|
|
"x-description-pt": "Listar os e-mails.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMessagesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": "5120",
|
|
"status": "delivered",
|
|
"simulated": false,
|
|
"from": "notifications@example.com",
|
|
"to": [
|
|
"ana@example.org"
|
|
],
|
|
"cc": [],
|
|
"bcc": [],
|
|
"reply_to": [
|
|
"support@example.com"
|
|
],
|
|
"subject": "Your order 1234 is ready",
|
|
"recipients": 1,
|
|
"credits": 1.0,
|
|
"charged": true,
|
|
"source": "api",
|
|
"template_id": 7,
|
|
"attachments": [],
|
|
"error": null,
|
|
"scheduled_for": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"sent_at": "2026-11-12T10:30:01+02:00",
|
|
"from_name": "Example Ltd"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/messages/batch": {
|
|
"post": {
|
|
"operationId": "email.messages.batch",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Send emails in a batch",
|
|
"x-summary-pt": "Enviar e-mails em lote",
|
|
"description": "Needs `email_center:write`. No limit on the number of messages, only on the request size (8 MB). Fields outside `messages` (from, subject, html, text, template_id, reply_to, send_at) apply to all; each message can change them and has its own `to` and `variables`. Each one follows the rules of POST /v1/email/messages and `results` says what happened to it (`error` uses the same reasons). Up to 20 go out straight away; the rest join the queue (every minute). Without credits or at the daily limit, the rest are rejected.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Sem limite de mensagens, só do tamanho do pedido (8 MB). Os campos fora de `messages` (from, subject, html, text, template_id, reply_to, send_at) valem para todas; cada mensagem pode mudá-los e tem o seu `to` e as suas `variables`. Cada uma segue as regras de POST /v1/email/messages e `results` diz o que lhe aconteceu (`error` usa as mesmas razões). Até 20 saem logo; as outras entram na fila (a cada minuto). Sem créditos ou no limite do dia, as restantes são recusadas.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Send emails in a batch.",
|
|
"x-description-pt": "Enviar e-mails em lote.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailBatchResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"total": 3,
|
|
"accepted": 2,
|
|
"rejected": 1,
|
|
"credits": 2.0,
|
|
"simulated": false,
|
|
"results": [
|
|
{
|
|
"index": 0,
|
|
"id": "5121",
|
|
"status": "sent",
|
|
"recipients": 1,
|
|
"suppressed": []
|
|
},
|
|
{
|
|
"index": 1,
|
|
"id": "5122",
|
|
"status": "sent",
|
|
"recipients": 1,
|
|
"suppressed": []
|
|
},
|
|
{
|
|
"index": 2,
|
|
"id": null,
|
|
"status": "rejected",
|
|
"error": "invalid_recipient",
|
|
"field": "to"
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"messages"
|
|
],
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Sender at a verified domain (or a subdomain of it): `notifications@example.com` or `Example Ltd <notifications@example.com>`.",
|
|
"x-description-pt": "Remetente num domínio verificado (ou subdomínio dele): `notifications@example.com` ou `Empresa <notifications@example.com>`."
|
|
},
|
|
"from_name": {
|
|
"type": "string",
|
|
"description": "Optional display name.",
|
|
"x-description-pt": "Nome a mostrar, opcional."
|
|
},
|
|
"to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "One address, a comma-separated list or an array.",
|
|
"x-description-pt": "Um endereço, uma lista separada por vírgulas ou um array."
|
|
},
|
|
"cc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"bcc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "Up to 5 addresses.",
|
|
"x-description-pt": "Até 5 endereços."
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Up to 998 characters. May use {{variables}}.",
|
|
"x-description-pt": "Até 998 caracteres. Pode usar {{variáveis}}."
|
|
},
|
|
"html": {
|
|
"type": "string",
|
|
"description": "HTML body. Values of {{variables}} are HTML-escaped.",
|
|
"x-description-pt": "Corpo em HTML. Os valores das {{variáveis}} entram escapados."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Plain text body.",
|
|
"x-description-pt": "Corpo em texto simples."
|
|
},
|
|
"template_id": {
|
|
"type": "integer",
|
|
"description": "A template of this account; empty subject, html and text come from it.",
|
|
"x-description-pt": "Um modelo desta conta; o assunto, o html e o text vazios vêm dele."
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Values for {{name}} placeholders, as an object.",
|
|
"x-description-pt": "Os valores das marcas {{nome}}, num objecto."
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "Base64.",
|
|
"x-description-pt": "Base64."
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Base64 files; 5 MB in total by default, executables refused.",
|
|
"x-description-pt": "Ficheiros em base64; 5 MB no total por omissão, executáveis recusados."
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"maxProperties": 20,
|
|
"description": "Optional headers of your own, as an object of names and values: your X- headers (such as `X-Order-Id` or `X-Campaign`) and List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority and Sensitivity. Up to 20, one-line values up to 998 characters. X- headers that are ours, of sending providers (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) or that describe a path or an origin (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) are refused with 422 `invalid_headers`, which lists the names in `details.invalid`.",
|
|
"x-description-pt": "Cabeçalhos seus, opcionais, num objecto de nomes e valores: os seus X- (como `X-Order-Id` ou `X-Campaign`) e List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority e Sensitivity. Até 20, valores numa linha até 998 caracteres. Os X- nossos, dos fornecedores de envio (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) ou que descrevem um caminho ou uma origem (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) são recusados com 422 `invalid_headers`, que traz os nomes em `details.invalid`."
|
|
},
|
|
"send_at": {
|
|
"type": "string",
|
|
"description": "Optional, ISO 8601 with time zone, up to 30 days ahead by default.",
|
|
"x-description-pt": "Opcional, ISO 8601 com fuso, até 30 dias por omissão."
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"to"
|
|
],
|
|
"properties": {
|
|
"from": {
|
|
"type": "string",
|
|
"description": "Sender at a verified domain (or a subdomain of it): `notifications@example.com` or `Example Ltd <notifications@example.com>`.",
|
|
"x-description-pt": "Remetente num domínio verificado (ou subdomínio dele): `notifications@example.com` ou `Empresa <notifications@example.com>`."
|
|
},
|
|
"from_name": {
|
|
"type": "string",
|
|
"description": "Optional display name.",
|
|
"x-description-pt": "Nome a mostrar, opcional."
|
|
},
|
|
"to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "One address, a comma-separated list or an array.",
|
|
"x-description-pt": "Um endereço, uma lista separada por vírgulas ou um array."
|
|
},
|
|
"cc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"bcc": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"description": "Up to 5 addresses.",
|
|
"x-description-pt": "Até 5 endereços."
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "Up to 998 characters. May use {{variables}}.",
|
|
"x-description-pt": "Até 998 caracteres. Pode usar {{variáveis}}."
|
|
},
|
|
"html": {
|
|
"type": "string",
|
|
"description": "HTML body. Values of {{variables}} are HTML-escaped.",
|
|
"x-description-pt": "Corpo em HTML. Os valores das {{variáveis}} entram escapados."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "Plain text body.",
|
|
"x-description-pt": "Corpo em texto simples."
|
|
},
|
|
"template_id": {
|
|
"type": "integer",
|
|
"description": "A template of this account; empty subject, html and text come from it.",
|
|
"x-description-pt": "Um modelo desta conta; o assunto, o html e o text vazios vêm dele."
|
|
},
|
|
"variables": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "Values for {{name}} placeholders, as an object.",
|
|
"x-description-pt": "Os valores das marcas {{nome}}, num objecto."
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"filename",
|
|
"content"
|
|
],
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "Base64.",
|
|
"x-description-pt": "Base64."
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"description": "Base64 files; 5 MB in total by default, executables refused.",
|
|
"x-description-pt": "Ficheiros em base64; 5 MB no total por omissão, executáveis recusados."
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"maxProperties": 20,
|
|
"description": "Optional headers of your own, as an object of names and values: your X- headers (such as `X-Order-Id` or `X-Campaign`) and List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority and Sensitivity. Up to 20, one-line values up to 998 characters. X- headers that are ours, of sending providers (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) or that describe a path or an origin (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) are refused with 422 `invalid_headers`, which lists the names in `details.invalid`.",
|
|
"x-description-pt": "Cabeçalhos seus, opcionais, num objecto de nomes e valores: os seus X- (como `X-Order-Id` ou `X-Campaign`) e List-Unsubscribe, List-Unsubscribe-Post, List-Id, In-Reply-To, References, Precedence, Auto-Submitted, Feedback-ID, Keywords, Comments, Organization, Importance, Priority e Sensitivity. Até 20, valores numa linha até 998 caracteres. Os X- nossos, dos fornecedores de envio (X-SES-*, X-Mailgun-*, X-SMTPAPI, X-MC-*, X-PM-*, X-Sib-*...) ou que descrevem um caminho ou uma origem (X-Originating-IP, X-Forwarded-For, X-Sender, X-Envelope-*, X-Spam-*, X-Authenticated-*) são recusados com 422 `invalid_headers`, que traz os nomes em `details.invalid`."
|
|
},
|
|
"send_at": {
|
|
"type": "string",
|
|
"description": "Optional, ISO 8601 with time zone, up to 30 days ahead by default.",
|
|
"x-description-pt": "Opcional, ISO 8601 com fuso, até 30 dias por omissão."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"from": "Example Ltd <notifications@example.com>",
|
|
"subject": "Hello {{name}}",
|
|
"text": "Hi {{name}}, your invoice is ready.",
|
|
"messages": [
|
|
{
|
|
"to": "ana@example.org",
|
|
"variables": {
|
|
"name": "Ana"
|
|
}
|
|
},
|
|
{
|
|
"to": "rui@example.org",
|
|
"variables": {
|
|
"name": "Rui"
|
|
}
|
|
},
|
|
{
|
|
"to": "not-an-email"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/messages/{id}": {
|
|
"get": {
|
|
"operationId": "email.messages.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See an email",
|
|
"x-summary-pt": "Ver um e-mail",
|
|
"description": "Needs `email_center:read`. With the events of each recipient and the content (kept for 30 days by default; then `html` and `text` are null).",
|
|
"x-description-pt": "Precisa de `email_center:read`. Com os eventos de cada destinatário e o conteúdo (guardado 30 dias por omissão; depois `html` e `text` vêm a null).",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the email was sent.",
|
|
"x-description-pt": "O `id` devolvido no envio."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an email.",
|
|
"x-description-pt": "Ver um e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMessageGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "5120",
|
|
"status": "delivered",
|
|
"simulated": false,
|
|
"from": "notifications@example.com",
|
|
"to": [
|
|
"ana@example.org"
|
|
],
|
|
"cc": [],
|
|
"bcc": [],
|
|
"reply_to": [
|
|
"support@example.com"
|
|
],
|
|
"subject": "Your order 1234 is ready",
|
|
"recipients": 1,
|
|
"credits": 1.0,
|
|
"charged": true,
|
|
"source": "api",
|
|
"template_id": 7,
|
|
"attachments": [],
|
|
"error": null,
|
|
"scheduled_for": null,
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"sent_at": "2026-11-12T10:30:01+02:00",
|
|
"from_name": "Example Ltd",
|
|
"html": "<p>Hello Ana, your order 1234 is ready.</p>",
|
|
"text": "Hello Ana, your order 1234 is ready.",
|
|
"events": [
|
|
{
|
|
"type": "sent",
|
|
"recipient": null,
|
|
"detail": null,
|
|
"simulated": false,
|
|
"created_at": "2026-11-12T10:30:01+02:00"
|
|
},
|
|
{
|
|
"type": "delivered",
|
|
"recipient": "ana@example.org",
|
|
"detail": null,
|
|
"simulated": false,
|
|
"created_at": "2026-11-12T10:30:03+02:00"
|
|
}
|
|
],
|
|
"headers": {
|
|
"X-Order-Id": "1234",
|
|
"X-Campaign": "order-ready"
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/messages/{id}/cancel": {
|
|
"post": {
|
|
"operationId": "email.messages.cancel",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Cancel a scheduled email",
|
|
"x-summary-pt": "Cancelar um e-mail agendado",
|
|
"description": "Needs `email_center:write`. Only `scheduled` emails that have not gone out yet; credits already taken go back (`credits_returned`). Otherwise 409 `not_cancellable`.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Só e-mails `scheduled` que ainda não saíram; os créditos já descontados voltam (`credits_returned`). Senão 409 `not_cancellable`.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` returned when the email was sent.",
|
|
"x-description-pt": "O `id` devolvido no envio."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Cancel a scheduled email.",
|
|
"x-description-pt": "Cancelar um e-mail agendado.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMessageCancelResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "5120",
|
|
"status": "cancelled",
|
|
"simulated": false,
|
|
"from": "notifications@example.com",
|
|
"to": [
|
|
"ana@example.org"
|
|
],
|
|
"cc": [],
|
|
"bcc": [],
|
|
"reply_to": [
|
|
"support@example.com"
|
|
],
|
|
"subject": "Your order 1234 is ready",
|
|
"recipients": 1,
|
|
"credits": 1.0,
|
|
"charged": true,
|
|
"source": "api",
|
|
"template_id": 7,
|
|
"attachments": [],
|
|
"error": null,
|
|
"scheduled_for": "2026-11-20T09:30:00+02:00",
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"sent_at": null,
|
|
"from_name": "Example Ltd",
|
|
"credits_returned": 0.0
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/balance": {
|
|
"get": {
|
|
"operationId": "email.balance.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See the email balance",
|
|
"x-summary-pt": "Ver o saldo de e-mail",
|
|
"description": "Needs `email_center:read`. The balance of emails bought, plus the two monthly limits of the account, the different recipients and the total emails, each with what is used, what is left and the day they start again. `test_mode` is true while E-mail Center does not send for real.",
|
|
"x-description-pt": "Precisa de `email_center:read`. O saldo de e-mails comprados, mais os dois limites do mês da conta, os destinatários diferentes e o total de e-mails, cada um com o que está gasto, o que falta e o dia em que recomeçam. `test_mode` é true enquanto o E-mail Center não envia a sério.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the email balance.",
|
|
"x-description-pt": "Ver o saldo de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailBalanceResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"balance": 9850.0,
|
|
"unit": "emails",
|
|
"scheduled_credits": 0.0,
|
|
"daily_limit": 500,
|
|
"sent_today": 42,
|
|
"mode": "production",
|
|
"test_mode": false,
|
|
"monthly_limits": {
|
|
"active": true,
|
|
"month": "2026-11",
|
|
"resets_at": "2026-12-01",
|
|
"emails": {
|
|
"plan": 5000,
|
|
"used": 1240,
|
|
"remaining": 13610,
|
|
"plan_remaining": 3760,
|
|
"offer_remaining": 0,
|
|
"used_pct": 8
|
|
},
|
|
"recipients": {
|
|
"plan": 1000,
|
|
"used": 820,
|
|
"remaining": 10030,
|
|
"plan_remaining": 180,
|
|
"offer_remaining": 0,
|
|
"used_pct": 8
|
|
},
|
|
"extra_credits": 9850
|
|
},
|
|
"starter_offer": {
|
|
"given": true,
|
|
"emails_remaining": 0,
|
|
"recipients_remaining": 0
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/stats": {
|
|
"get": {
|
|
"operationId": "email.stats.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See email statistics",
|
|
"x-summary-pt": "Ver as estatísticas de e-mail",
|
|
"description": "Needs `email_center:read`. By status and by day. Delivered, bounced and complained count recipients; the rates are over the recipients. Default: the last 30 days; at most 366.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Por estado e por dia. Entregues, devolvidos e queixas contam destinatários; as taxas são sobre os destinatários. Por omissão, os últimos 30 dias; no máximo 366.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "from",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
{
|
|
"name": "to",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See email statistics.",
|
|
"x-description-pt": "Ver as estatísticas de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailStatsResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"from": "2026-10-14",
|
|
"to": "2026-11-12",
|
|
"messages": 320,
|
|
"recipients": 340,
|
|
"credits_spent": 338.0,
|
|
"by_status": {
|
|
"delivered": 300,
|
|
"bounced": 4,
|
|
"complained": 0,
|
|
"sent": 14,
|
|
"failed": 2
|
|
},
|
|
"events": {
|
|
"delivered": 330,
|
|
"bounced": 4,
|
|
"complained": 0
|
|
},
|
|
"delivery_rate": 97.06,
|
|
"bounce_rate": 1.18,
|
|
"complaint_rate": 0.0,
|
|
"by_day": [
|
|
{
|
|
"date": "2026-11-12",
|
|
"messages": 12,
|
|
"recipients": 12,
|
|
"delivered": 12,
|
|
"bounced": 0,
|
|
"complained": 0,
|
|
"credits": 12.0
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/domains": {
|
|
"get": {
|
|
"operationId": "email.domains.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List sender domains",
|
|
"x-summary-pt": "Listar os domínios remetentes",
|
|
"description": "Needs `email_center:read`. In alphabetical order.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Por ordem alfabética.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List sender domains.",
|
|
"x-description-pt": "Listar os domínios remetentes.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"status": "verified",
|
|
"mail_from": null,
|
|
"verified_at": "2026-11-12T10:00:00+02:00",
|
|
"last_checked_at": "2026-11-12T10:00:00+02:00",
|
|
"created_at": "2026-11-12T09:40:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.domains.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Add a sender domain",
|
|
"x-summary-pt": "Juntar um domínio remetente",
|
|
"description": "Needs `email_center:write`. Add the records of `dns_records` to the DNS of the domain: one DKIM TXT record with our key (required), SPF and DMARC (recommended) and, with MAIL FROM, one CNAME. Then call verify; DNS can take a few hours. Only verified domains can send, from any address of the domain or of a subdomain. Free mailbox domains (gmail.com and others) are refused. With a sandbox key nothing is saved.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Ponha no DNS do domínio os registos de `dns_records`: um TXT de DKIM com a nossa chave (obrigatório), SPF e DMARC (recomendados) e, com MAIL FROM, um CNAME. Depois chame verify; o DNS pode levar algumas horas. Só os domínios verificados enviam, de qualquer endereço do domínio ou de um subdomínio. Os domínios de caixas grátis (gmail.com e outros) são recusados. Com uma chave sandbox nada se guarda.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Add a sender domain.",
|
|
"x-description-pt": "Juntar um domínio remetente.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"status": "pending",
|
|
"mail_from": null,
|
|
"verified_at": null,
|
|
"last_checked_at": null,
|
|
"created_at": "2026-11-12T09:40:00+02:00",
|
|
"dns_records": [
|
|
{
|
|
"type": "TXT",
|
|
"name": "em3f9a1c7b2d._domainkey.example.com",
|
|
"value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...IDAQAB",
|
|
"priority": null,
|
|
"purpose": "dkim",
|
|
"required": true,
|
|
"found": null
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "example.com",
|
|
"value": "v=spf1 include:_spf.example-brand.com ~all",
|
|
"priority": null,
|
|
"purpose": "spf",
|
|
"required": false,
|
|
"found": null
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "_dmarc.example.com",
|
|
"value": "v=DMARC1; p=none; adkim=r; aspf=r",
|
|
"priority": null,
|
|
"purpose": "dmarc",
|
|
"required": false,
|
|
"found": null
|
|
}
|
|
],
|
|
"test_mode_accepted": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"domain"
|
|
],
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"domain": "example.com"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/domains/{domain}": {
|
|
"get": {
|
|
"operationId": "email.domains.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See a sender domain",
|
|
"x-summary-pt": "Ver um domínio remetente",
|
|
"description": "Needs `email_center:read`. With the DNS records to add and whether each one was found at the last check.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Com os registos DNS a pôr e se cada um foi encontrado na última verificação.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name (example.com) or its `id`.",
|
|
"x-description-pt": "O nome do domínio (example.com) ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a sender domain.",
|
|
"x-description-pt": "Ver um domínio remetente.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"status": "verified",
|
|
"mail_from": null,
|
|
"verified_at": "2026-11-12T10:00:00+02:00",
|
|
"last_checked_at": "2026-11-12T10:00:00+02:00",
|
|
"created_at": "2026-11-12T09:40:00+02:00",
|
|
"dns_records": [
|
|
{
|
|
"type": "TXT",
|
|
"name": "em3f9a1c7b2d._domainkey.example.com",
|
|
"value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...IDAQAB",
|
|
"priority": null,
|
|
"purpose": "dkim",
|
|
"required": true,
|
|
"found": null
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "example.com",
|
|
"value": "v=spf1 include:_spf.example-brand.com ~all",
|
|
"priority": null,
|
|
"purpose": "spf",
|
|
"required": false,
|
|
"found": true
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "_dmarc.example.com",
|
|
"value": "v=DMARC1; p=none; adkim=r; aspf=r",
|
|
"priority": null,
|
|
"purpose": "dmarc",
|
|
"required": false,
|
|
"found": false
|
|
}
|
|
],
|
|
"test_mode_accepted": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "email.domains.delete",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Delete a sender domain",
|
|
"x-summary-pt": "Apagar um domínio remetente",
|
|
"description": "Needs `email_center:write`. The domain can no longer send. Emails already sent stay in the log.",
|
|
"x-description-pt": "Precisa de `email_center:write`. O domínio deixa de poder enviar. Os e-mails já enviados ficam no registo.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name (example.com) or its `id`.",
|
|
"x-description-pt": "O nome do domínio (example.com) ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a sender domain.",
|
|
"x-description-pt": "Apagar um domínio remetente.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/domains/{domain}/verify": {
|
|
"post": {
|
|
"operationId": "email.domains.verify",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Verify a sender domain",
|
|
"x-summary-pt": "Verificar um domínio remetente",
|
|
"description": "Needs `email_center:write`. Checks the DKIM records now and returns the new status. With a sandbox key the result is not saved.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Confere já os registos DKIM e devolve o estado novo. Com uma chave sandbox o resultado não se guarda.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name (example.com) or its `id`.",
|
|
"x-description-pt": "O nome do domínio (example.com) ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Verify a sender domain.",
|
|
"x-description-pt": "Verificar um domínio remetente.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainVerifyResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"status": "verified",
|
|
"mail_from": null,
|
|
"verified_at": "2026-11-12T10:00:00+02:00",
|
|
"last_checked_at": "2026-11-12T10:00:00+02:00",
|
|
"created_at": "2026-11-12T09:40:00+02:00",
|
|
"dns_records": [
|
|
{
|
|
"type": "TXT",
|
|
"name": "em3f9a1c7b2d._domainkey.example.com",
|
|
"value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...IDAQAB",
|
|
"priority": null,
|
|
"purpose": "dkim",
|
|
"required": true,
|
|
"found": true
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "example.com",
|
|
"value": "v=spf1 include:_spf.example-brand.com ~all",
|
|
"priority": null,
|
|
"purpose": "spf",
|
|
"required": false,
|
|
"found": true
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "_dmarc.example.com",
|
|
"value": "v=DMARC1; p=none; adkim=r; aspf=r",
|
|
"priority": null,
|
|
"purpose": "dmarc",
|
|
"required": false,
|
|
"found": false
|
|
}
|
|
],
|
|
"test_mode_accepted": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/domains/{domain}/mail-from": {
|
|
"put": {
|
|
"operationId": "email.domains.mail_from",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Set the MAIL FROM subdomain",
|
|
"x-summary-pt": "Definir o subdomínio do MAIL FROM",
|
|
"description": "Needs `email_center:write`. Optional: a subdomain of yours for the return path (for example `bounce`), so SPF aligns with your domain for DMARC. An empty value goes back to ours. Add the MX and TXT records that appear in `dns_records`.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Opcional: um subdomínio seu para o endereço de retorno (por exemplo `bounce`), para o SPF alinhar com o seu domínio no DMARC. Vazio volta ao nosso. Ponha o MX e o TXT que aparecem em `dns_records`.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "domain",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The domain name (example.com) or its `id`.",
|
|
"x-description-pt": "O nome do domínio (example.com) ou o seu `id`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Set the MAIL FROM subdomain.",
|
|
"x-description-pt": "Definir o subdomínio do MAIL FROM.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailDomainMailFromResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"domain": "example.com",
|
|
"status": "verified",
|
|
"mail_from": "bounce.example.com",
|
|
"verified_at": "2026-11-12T10:00:00+02:00",
|
|
"last_checked_at": "2026-11-12T10:00:00+02:00",
|
|
"created_at": "2026-11-12T09:40:00+02:00",
|
|
"dns_records": [
|
|
{
|
|
"type": "TXT",
|
|
"name": "em3f9a1c7b2d._domainkey.example.com",
|
|
"value": "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...IDAQAB",
|
|
"priority": null,
|
|
"purpose": "dkim",
|
|
"required": true,
|
|
"found": null
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "example.com",
|
|
"value": "v=spf1 include:_spf.example-brand.com ~all",
|
|
"priority": null,
|
|
"purpose": "spf",
|
|
"required": false,
|
|
"found": true
|
|
},
|
|
{
|
|
"type": "TXT",
|
|
"name": "_dmarc.example.com",
|
|
"value": "v=DMARC1; p=none; adkim=r; aspf=r",
|
|
"priority": null,
|
|
"purpose": "dmarc",
|
|
"required": false,
|
|
"found": false
|
|
},
|
|
{
|
|
"type": "CNAME",
|
|
"name": "bounce.example.com",
|
|
"value": "return.mailer.example-brand.com",
|
|
"priority": null,
|
|
"purpose": "mail_from",
|
|
"required": false,
|
|
"found": null
|
|
}
|
|
],
|
|
"test_mode_accepted": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"subdomain"
|
|
],
|
|
"properties": {
|
|
"subdomain": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"subdomain": "bounce"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/templates": {
|
|
"get": {
|
|
"operationId": "email.templates.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List email templates",
|
|
"x-summary-pt": "Listar os modelos de e-mail",
|
|
"description": "Needs `email_center:read`. By name.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Por nome.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List email templates.",
|
|
"x-description-pt": "Listar os modelos de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailTemplatesListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 7,
|
|
"name": "Order ready",
|
|
"subject": "Your order {{order}} is ready",
|
|
"html": "<p>Hello {{name}}, your order {{order}} is ready.</p>",
|
|
"text": "Hello {{name}}, your order {{order}} is ready.",
|
|
"variables": [
|
|
"order",
|
|
"name"
|
|
],
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"updated_at": "2026-11-12T09:00:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.templates.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Create an email template",
|
|
"x-summary-pt": "Criar um modelo de e-mail",
|
|
"description": "Needs `email_center:write`. Subject and html or text, with {{name}} placeholders filled from `variables` when sending.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Assunto e html ou text, com marcas {{nome}} preenchidas pelas `variables` do envio.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create an email template.",
|
|
"x-description-pt": "Criar um modelo de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailTemplateCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"name": "Order ready",
|
|
"subject": "Your order {{order}} is ready",
|
|
"html": "<p>Hello {{name}}, your order {{order}} is ready.</p>",
|
|
"text": "Hello {{name}}, your order {{order}} is ready.",
|
|
"variables": [
|
|
"order",
|
|
"name"
|
|
],
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"updated_at": "2026-11-12T09:00:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name",
|
|
"subject"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Up to 100 characters, unique in the account.",
|
|
"x-description-pt": "Até 100 caracteres, único na conta."
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "Order ready",
|
|
"subject": "Your order {{order}} is ready",
|
|
"html": "<p>Hello {{name}}, your order {{order}} is ready.</p>",
|
|
"text": "Hello {{name}}, your order {{order}} is ready."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/templates/{id}": {
|
|
"get": {
|
|
"operationId": "email.templates.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See an email template",
|
|
"x-summary-pt": "Ver um modelo de e-mail",
|
|
"description": "Needs `email_center:read`. With the variables it uses.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Com as variáveis que usa.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The template `id` (the same as `template_id` when sending).",
|
|
"x-description-pt": "O `id` do modelo (o mesmo `template_id` do envio)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an email template.",
|
|
"x-description-pt": "Ver um modelo de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailTemplateGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"name": "Order ready",
|
|
"subject": "Your order {{order}} is ready",
|
|
"html": "<p>Hello {{name}}, your order {{order}} is ready.</p>",
|
|
"text": "Hello {{name}}, your order {{order}} is ready.",
|
|
"variables": [
|
|
"order",
|
|
"name"
|
|
],
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"updated_at": "2026-11-12T09:00:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "email.templates.update",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Change an email template",
|
|
"x-summary-pt": "Alterar um modelo de e-mail",
|
|
"description": "Needs `email_center:write`. Only the fields sent change.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Só mudam os campos enviados.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The template `id` (the same as `template_id` when sending).",
|
|
"x-description-pt": "O `id` do modelo (o mesmo `template_id` do envio)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change an email template.",
|
|
"x-description-pt": "Alterar um modelo de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailTemplateUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"name": "Order ready",
|
|
"subject": "Your order {{order}} is ready",
|
|
"html": "<p>Hello {{name}}, your order {{order}} is ready.</p>",
|
|
"text": "Hello {{name}}, your order {{order}} is ready.",
|
|
"variables": [
|
|
"order",
|
|
"name"
|
|
],
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"updated_at": "2026-11-12T09:00:00+02:00"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "Up to 100 characters, unique in the account.",
|
|
"x-description-pt": "Até 100 caracteres, único na conta."
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"subject": "Order {{order}}: ready for pickup"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "email.templates.delete",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Delete an email template",
|
|
"x-summary-pt": "Apagar um modelo de e-mail",
|
|
"description": "Needs `email_center:write`. Emails already sent are not affected.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Os e-mails já enviados não mudam.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The template `id` (the same as `template_id` when sending).",
|
|
"x-description-pt": "O `id` do modelo (o mesmo `template_id` do envio)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete an email template.",
|
|
"x-description-pt": "Apagar um modelo de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailTemplateDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 7,
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/suppressions": {
|
|
"get": {
|
|
"operationId": "email.suppressions.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List suppressed addresses",
|
|
"x-summary-pt": "Listar os endereços bloqueados",
|
|
"description": "Needs `email_center:read`. Addresses that never receive emails from this account: permanent bounces and complaints enter on their own; you can add others.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Endereços que nunca recebem e-mails desta conta: as devoluções permanentes e as queixas entram sozinhas; pode juntar outros.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "reason",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "bounce, complaint or manual.",
|
|
"x-description-pt": "bounce, complaint ou manual."
|
|
},
|
|
{
|
|
"name": "email",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "One address.",
|
|
"x-description-pt": "Um endereço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List suppressed addresses.",
|
|
"x-description-pt": "Listar os endereços bloqueados.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailSuppressionsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"email": "ana@example.org",
|
|
"reason": "manual",
|
|
"note": "Asked to stop",
|
|
"created_at": "2026-11-12T10:00:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.suppressions.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Suppress an address",
|
|
"x-summary-pt": "Bloquear um endereço",
|
|
"description": "Needs `email_center:write`. Emails to it are removed before sending and never charged.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Os envios para ele saem antes de enviar e nunca se cobram.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Suppress an address.",
|
|
"x-description-pt": "Bloquear um endereço.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailSuppressionCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"email": "ana@example.org",
|
|
"reason": "manual",
|
|
"note": "Asked to stop",
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"already_listed": false,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"note": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"email": "ana@example.org",
|
|
"note": "Asked to stop"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/suppressions/{email}": {
|
|
"delete": {
|
|
"operationId": "email.suppressions.delete",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Remove a suppressed address",
|
|
"x-summary-pt": "Desbloquear um endereço",
|
|
"description": "Needs `email_center:write`. The address goes in the path, URL-encoded (`ana%40example.org`).",
|
|
"x-description-pt": "Precisa de `email_center:write`. O endereço vai no caminho, codificado (`ana%40example.org`).",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "email",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The address, URL-encoded.",
|
|
"x-description-pt": "O endereço, codificado."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Remove a suppressed address.",
|
|
"x-description-pt": "Desbloquear um endereço.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailSuppressionDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"email": "ana@example.org",
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/webhook": {
|
|
"get": {
|
|
"operationId": "email.webhook.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Get the email webhook",
|
|
"x-summary-pt": "Ver o webhook de e-mail",
|
|
"description": "Needs `email_center:read`. The address, the events and the last delivery; never the secret. We POST `{\"event\": \"email.delivered\", \"created_at\", \"data\": {\"id\", \"event_id\", \"recipient\", \"detail\", \"from\", \"subject\", \"simulated\"}}` to your HTTPS address on port 443, one call per event and recipient, only for events after the webhook was saved. Check `X-Webhook-Signature: t=<unix time>,v1=<hex>`: v1 is HMAC-SHA256 of `t + \".\" + raw body` with your secret. Answer 2xx within 5 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h. This webhook is separate from the SMS one.",
|
|
"x-description-pt": "Precisa de `email_center:read`. O endereço, os eventos e a última entrega; nunca o segredo. Fazemos POST de `{\"event\": \"email.delivered\", \"created_at\", \"data\": {\"id\", \"event_id\", \"recipient\", \"detail\", \"from\", \"subject\", \"simulated\"}}` para o seu endereço HTTPS na porta 443, uma chamada por evento e destinatário, só para eventos depois de o webhook ser gravado. Confira `X-Webhook-Signature: t=<hora unix>,v1=<hex>`: v1 é o HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo. Responda 2xx em 5 segundos; senão tentamos de novo após 1 min, 5 min, 30 min, 2 h e 6 h. Este webhook é separado do do SMS.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the email webhook.",
|
|
"x-description-pt": "Ver o webhook de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailWebhookGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.com/webhooks/email",
|
|
"events": [
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained"
|
|
],
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"updated_at": "2026-11-12T10:30:00+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "email.webhook.set",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Save the email webhook",
|
|
"x-summary-pt": "Gravar o webhook de e-mail",
|
|
"description": "Needs `email_center:write`. The `secret` is shown only when the webhook is created or with `rotate_secret: true`. We POST `{\"event\": \"email.delivered\", \"created_at\", \"data\": {\"id\", \"event_id\", \"recipient\", \"detail\", \"from\", \"subject\", \"simulated\"}}` to your HTTPS address on port 443, one call per event and recipient, only for events after the webhook was saved. Check `X-Webhook-Signature: t=<unix time>,v1=<hex>`: v1 is HMAC-SHA256 of `t + \".\" + raw body` with your secret. Answer 2xx within 5 seconds; otherwise we retry after 1 min, 5 min, 30 min, 2 h and 6 h. This webhook is separate from the SMS one.",
|
|
"x-description-pt": "Precisa de `email_center:write`. O `secret` só aparece quando o webhook nasce ou com `rotate_secret: true`. Fazemos POST de `{\"event\": \"email.delivered\", \"created_at\", \"data\": {\"id\", \"event_id\", \"recipient\", \"detail\", \"from\", \"subject\", \"simulated\"}}` para o seu endereço HTTPS na porta 443, uma chamada por evento e destinatário, só para eventos depois de o webhook ser gravado. Confira `X-Webhook-Signature: t=<hora unix>,v1=<hex>`: v1 é o HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo. Responda 2xx em 5 segundos; senão tentamos de novo após 1 min, 5 min, 30 min, 2 h e 6 h. Este webhook é separado do do SMS.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Save the email webhook.",
|
|
"x-description-pt": "Gravar o webhook de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailWebhookSetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.com/webhooks/email",
|
|
"events": [
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained"
|
|
],
|
|
"created_at": "2026-11-12T10:30:00+02:00",
|
|
"updated_at": "2026-11-12T10:30:00+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null,
|
|
"secret": "whsec_8c1f0e2d4b6a7c9e1f3a5b7d9e0c2a4b6d8f0a1c3e5b7d9f",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"url"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"email.sent",
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained",
|
|
"email.failed"
|
|
]
|
|
}
|
|
},
|
|
"rotate_secret": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"url": "https://example.com/webhooks/email",
|
|
"events": [
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "email.webhook.delete",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Delete the email webhook",
|
|
"x-summary-pt": "Apagar o webhook de e-mail",
|
|
"description": "Needs `email_center:write`. Pending deliveries are cancelled.",
|
|
"x-description-pt": "Precisa de `email_center:write`. As entregas por fazer são canceladas.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete the email webhook.",
|
|
"x-description-pt": "Apagar o webhook de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailWebhookDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/webhook/test": {
|
|
"post": {
|
|
"operationId": "email.webhook.test",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Test the email webhook",
|
|
"x-summary-pt": "Testar o webhook de e-mail",
|
|
"description": "Needs `email_center:write`. Sends a signed `webhook.test` event to the saved address now and returns what your server answered.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Envia já um evento `webhook.test` assinado para o endereço gravado e devolve o que o seu servidor respondeu.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Test the email webhook.",
|
|
"x-description-pt": "Testar o webhook de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailWebhookTestResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"delivered": true,
|
|
"status_code": 200,
|
|
"error": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns": {
|
|
"get": {
|
|
"operationId": "email.campaigns.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List campaigns",
|
|
"x-summary-pt": "Listar as campanhas",
|
|
"description": "Needs `email_center:read`. Newest first, without the blocks.",
|
|
"x-description-pt": "Precisa de `email_center:read`. As mais recentes primeiro, sem os blocos.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "draft, scheduled, sending, sent, cancelled or automation.",
|
|
"x-description-pt": "draft, scheduled, sending, sent, cancelled ou automation."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List campaigns.",
|
|
"x-description-pt": "Listar as campanhas.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "draft",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 0,
|
|
"credits": 0.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": null,
|
|
"target": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.campaigns.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Create a campaign",
|
|
"x-summary-pt": "Criar uma campanha",
|
|
"description": "Needs `email_center:write`. Creates a draft. Send `blocks`, or `template` for a ready template. Variables: {{first_name}}, {{name}}, {{company}}, {{email}}. With a sandbox key nothing is saved.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Cria um rascunho. Envie `blocks`, ou `template` para um modelo pronto. Variáveis: {{first_name}}, {{name}}, {{company}}, {{email}}. Com uma chave sandbox nada se guarda.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a campaign.",
|
|
"x-description-pt": "Criar uma campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "draft",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 0,
|
|
"credits": 0.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": [
|
|
{
|
|
"type": "header",
|
|
"title": "New arrivals for you",
|
|
"logo": "",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "Hi {{first_name}},\n\nNew products have arrived, with **special prices** until the end of the month."
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "See what is new",
|
|
"url": "https://example.com",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "divider"
|
|
},
|
|
{
|
|
"type": "footer",
|
|
"text": "You are receiving this email because you subscribed to our news."
|
|
}
|
|
],
|
|
"target": {
|
|
"groups": [
|
|
3
|
|
],
|
|
"opened": null,
|
|
"clicked": null,
|
|
"joined_from": null,
|
|
"joined_to": null
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string",
|
|
"description": "Text shown after the subject in the inbox.",
|
|
"x-description-pt": "Texto que aparece a seguir ao assunto na caixa de entrada."
|
|
},
|
|
"from": {
|
|
"type": "string",
|
|
"description": "An address at a verified domain.",
|
|
"x-description-pt": "Um endereço de um domínio verificado."
|
|
},
|
|
"from_name": {
|
|
"type": "string"
|
|
},
|
|
"reply_to": {
|
|
"type": "string"
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"description": "Instead of blocks: a ready template by sector (restauracao, comercio, servicos, educacao, saude, eventos, imobiliario, tecnologia).",
|
|
"x-description-pt": "Em vez de blocks: um modelo pronto por sector (restauracao, comercio, servicos, educacao, saude, eventos, imobiliario, tecnologia)."
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "November news",
|
|
"template": "comercio",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"target": {
|
|
"groups": [
|
|
3
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/generate": {
|
|
"post": {
|
|
"operationId": "email.campaigns.generate",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Generate a campaign with AI",
|
|
"x-summary-pt": "Gerar uma campanha com IA",
|
|
"description": "Needs `email_center:write`. Describe what you want to send; the answer has a subject, a preheader and blocks, which you can then send to POST /v1/email/campaigns. Nothing is saved. 503 `ai_unavailable` if AI is off; counts towards the daily AI limit.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Descreva o que quer enviar; a resposta traz o assunto, a pré-visualização e os blocos, que depois pode mandar para POST /v1/email/campaigns. Nada se guarda. 503 `ai_unavailable` se a IA estiver desligada; conta para o limite diário da IA.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Generate a campaign with AI.",
|
|
"x-description-pt": "Gerar uma campanha com IA.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignGenerateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"subject": "Our November offers",
|
|
"preheader": "20% off until Friday",
|
|
"blocks": [
|
|
{
|
|
"type": "header",
|
|
"title": "New arrivals for you",
|
|
"logo": "",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "Hi {{first_name}},\n\nNew products have arrived, with **special prices** until the end of the month."
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "See what is new",
|
|
"url": "https://example.com",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "divider"
|
|
},
|
|
{
|
|
"type": "footer",
|
|
"text": "You are receiving this email because you subscribed to our news."
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"description"
|
|
],
|
|
"properties": {
|
|
"description": {
|
|
"type": "string",
|
|
"description": "10 to 1500 characters.",
|
|
"x-description-pt": "10 a 1500 caracteres."
|
|
},
|
|
"sector": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"description": "20% off all plans until Friday, for existing customers.",
|
|
"sector": "tecnologia"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}": {
|
|
"get": {
|
|
"operationId": "email.campaigns.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See a campaign",
|
|
"x-summary-pt": "Ver uma campanha",
|
|
"description": "Needs `email_center:read`. With the blocks and the audience.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Com os blocos e o público.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See a campaign.",
|
|
"x-description-pt": "Ver uma campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "draft",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 0,
|
|
"credits": 0.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": [
|
|
{
|
|
"type": "header",
|
|
"title": "New arrivals for you",
|
|
"logo": "",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "Hi {{first_name}},\n\nNew products have arrived, with **special prices** until the end of the month."
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "See what is new",
|
|
"url": "https://example.com",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "divider"
|
|
},
|
|
{
|
|
"type": "footer",
|
|
"text": "You are receiving this email because you subscribed to our news."
|
|
}
|
|
],
|
|
"target": {
|
|
"groups": [
|
|
3
|
|
],
|
|
"opened": null,
|
|
"clicked": null,
|
|
"joined_from": null,
|
|
"joined_to": null
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"patch": {
|
|
"operationId": "email.campaigns.update",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Change a campaign",
|
|
"x-summary-pt": "Alterar uma campanha",
|
|
"description": "Needs `email_center:write`. Only drafts and automation emails; only the fields sent change.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Só rascunhos e e-mails de automação; só mudam os campos enviados.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a campaign.",
|
|
"x-description-pt": "Alterar uma campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignUpdateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "draft",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 0,
|
|
"credits": 0.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": [
|
|
{
|
|
"type": "header",
|
|
"title": "New arrivals for you",
|
|
"logo": "",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "text",
|
|
"text": "Hi {{first_name}},\n\nNew products have arrived, with **special prices** until the end of the month."
|
|
},
|
|
{
|
|
"type": "button",
|
|
"text": "See what is new",
|
|
"url": "https://example.com",
|
|
"color": "#af2835"
|
|
},
|
|
{
|
|
"type": "divider"
|
|
},
|
|
{
|
|
"type": "footer",
|
|
"text": "You are receiving this email because you subscribed to our news."
|
|
}
|
|
],
|
|
"target": {
|
|
"groups": [
|
|
3
|
|
],
|
|
"opened": null,
|
|
"clicked": null,
|
|
"joined_from": null,
|
|
"joined_to": null
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string",
|
|
"description": "Text shown after the subject in the inbox.",
|
|
"x-description-pt": "Texto que aparece a seguir ao assunto na caixa de entrada."
|
|
},
|
|
"from": {
|
|
"type": "string",
|
|
"description": "An address at a verified domain.",
|
|
"x-description-pt": "Um endereço de um domínio verificado."
|
|
},
|
|
"from_name": {
|
|
"type": "string"
|
|
},
|
|
"reply_to": {
|
|
"type": "string"
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"template": {
|
|
"type": "string",
|
|
"description": "Instead of blocks: a ready template by sector (restauracao, comercio, servicos, educacao, saude, eventos, imobiliario, tecnologia).",
|
|
"x-description-pt": "Em vez de blocks: um modelo pronto por sector (restauracao, comercio, servicos, educacao, saude, eventos, imobiliario, tecnologia)."
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"subject": "Last days of our offers"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "email.campaigns.delete",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Delete a campaign",
|
|
"x-summary-pt": "Apagar uma campanha",
|
|
"description": "Needs `email_center:write`. Only drafts, and automation emails that no longer belong to any automation. An email that is a step of an automation is refused with `409 campaign_belongs_to_automation`, which names the automation and the step in `details`: delete the automation, or take the email out of the series, on the Automation tab of E-mail Center. Turning the automation off is not enough, because the step would be left pointing at an email that no longer exists.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Só rascunhos, e e-mails de automação que já não pertencem a nenhuma automação. O e-mail que é um passo de uma automação é recusado com `409 campaign_belongs_to_automation`, que diz em `details` qual é a automação e qual é o passo: apague a automação, ou tire o e-mail da série, no separador Automação do E-mail Center. Desligar a automação não basta, porque o passo ficaria a apontar para um e-mail que já não existe.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete a campaign.",
|
|
"x-description-pt": "Apagar uma campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/spam-check": {
|
|
"get": {
|
|
"operationId": "email.campaigns.spam_check",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Check a campaign for spam",
|
|
"x-summary-pt": "Verificar a campanha contra spam",
|
|
"description": "Needs `email_center:read`. Simple rules (subject in capitals, spam words, little text, only images, shortened links, sender not verified). From `blocks_sending_at` points the campaign cannot be sent.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Regras simples (assunto em maiúsculas, palavras de spam, pouco texto, só imagens, ligações encurtadas, remetente não verificado). A partir de `blocks_sending_at` pontos a campanha não se envia.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Check a campaign for spam.",
|
|
"x-description-pt": "Verificar a campanha contra spam.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignSpamResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"score": 1,
|
|
"max": 10,
|
|
"blocks_sending_at": 8,
|
|
"warnings": [
|
|
{
|
|
"code": "preheader_missing"
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/send": {
|
|
"post": {
|
|
"operationId": "email.campaigns.send",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Send a campaign now",
|
|
"x-summary-pt": "Enviar a campanha já",
|
|
"description": "Needs `email_center:write`. Only subscribed contacts with an email address, not on the suppression list, receive it; each one is one credit (taken now and returned for those that do not go out). Every email carries an unsubscribe link and the `List-Unsubscribe` header, plus a tracking pixel and signed redirect links for the statistics. A campaign whose spam check score reaches the limit is refused (422 `spam_score_too_high`). With a sandbox key, or while E-mail Center is in test mode, nothing is sent or charged and the numbers are simulated (`simulated: true`).",
|
|
"x-description-pt": "Precisa de `email_center:write`. Só recebem os contactos subscritos com e-mail e fora da lista de bloqueados; cada um é um crédito (sai já e volta para os que não saírem). Cada e-mail leva a ligação de cancelar a subscrição e o cabeçalho `List-Unsubscribe`, mais um pixel e ligações com redireccionamento assinado para as estatísticas. Uma campanha que chegue ao limite do verificador de spam é recusada (422 `spam_score_too_high`). Com uma chave sandbox, ou com o E-mail Center em modo de teste, nada se envia nem se cobra e os números são simulados (`simulated: true`).",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Send a campaign now.",
|
|
"x-description-pt": "Enviar a campanha já.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignSendResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "sending",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 1200,
|
|
"credits": 1200.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": null,
|
|
"target": null,
|
|
"stats": {
|
|
"recipients": 1200,
|
|
"sent": 0,
|
|
"delivered": 0,
|
|
"bounced": 12,
|
|
"opened": 0,
|
|
"clicked": 0,
|
|
"unsubscribed": 4,
|
|
"open_rate": 43.77,
|
|
"click_rate": 11.03,
|
|
"unsubscribe_rate": 0.34,
|
|
"bounce_rate": 1.0,
|
|
"by_status": {
|
|
"enviado": 1200
|
|
},
|
|
"top_links": [
|
|
{
|
|
"url": "https://example.com",
|
|
"clicks": 131
|
|
}
|
|
],
|
|
"simulated": false
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/schedule": {
|
|
"post": {
|
|
"operationId": "email.campaigns.schedule",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Schedule a campaign",
|
|
"x-summary-pt": "Agendar a campanha",
|
|
"description": "Needs `email_center:write`. `send_at` in ISO 8601 with the time zone, up to 30 days ahead. Only subscribed contacts with an email address, not on the suppression list, receive it; each one is one credit (taken now and returned for those that do not go out). Every email carries an unsubscribe link and the `List-Unsubscribe` header, plus a tracking pixel and signed redirect links for the statistics. A campaign whose spam check score reaches the limit is refused (422 `spam_score_too_high`). With a sandbox key, or while E-mail Center is in test mode, nothing is sent or charged and the numbers are simulated (`simulated: true`).",
|
|
"x-description-pt": "Precisa de `email_center:write`. `send_at` em ISO 8601 com o fuso, até 30 dias. Só recebem os contactos subscritos com e-mail e fora da lista de bloqueados; cada um é um crédito (sai já e volta para os que não saírem). Cada e-mail leva a ligação de cancelar a subscrição e o cabeçalho `List-Unsubscribe`, mais um pixel e ligações com redireccionamento assinado para as estatísticas. Uma campanha que chegue ao limite do verificador de spam é recusada (422 `spam_score_too_high`). Com uma chave sandbox, ou com o E-mail Center em modo de teste, nada se envia nem se cobra e os números são simulados (`simulated: true`).",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Schedule a campaign.",
|
|
"x-description-pt": "Agendar a campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignSendResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "scheduled",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 1200,
|
|
"credits": 1200.0,
|
|
"simulated": false,
|
|
"scheduled_for": "2026-11-20T09:00:00+02:00",
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": null,
|
|
"target": null,
|
|
"stats": {
|
|
"recipients": 1200,
|
|
"sent": 0,
|
|
"delivered": 0,
|
|
"bounced": 12,
|
|
"opened": 0,
|
|
"clicked": 0,
|
|
"unsubscribed": 4,
|
|
"open_rate": 43.77,
|
|
"click_rate": 11.03,
|
|
"unsubscribe_rate": 0.34,
|
|
"bounce_rate": 1.0,
|
|
"by_status": {
|
|
"enviado": 1200
|
|
},
|
|
"top_links": [
|
|
{
|
|
"url": "https://example.com",
|
|
"clicks": 131
|
|
}
|
|
],
|
|
"simulated": false
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"send_at"
|
|
],
|
|
"properties": {
|
|
"send_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"send_at": "2026-11-20T09:00:00+02:00"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/cancel": {
|
|
"post": {
|
|
"operationId": "email.campaigns.cancel",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Cancel a campaign",
|
|
"x-summary-pt": "Cancelar a campanha",
|
|
"description": "Needs `email_center:write`. Scheduled or still sending: what has not gone out does not go, and its credits come back (`credits_returned`).",
|
|
"x-description-pt": "Precisa de `email_center:write`. Agendada ou ainda a enviar: o que não saiu já não sai, e os créditos voltam (`credits_returned`).",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Cancel a campaign.",
|
|
"x-description-pt": "Cancelar a campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignCancelResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 41,
|
|
"name": "November news",
|
|
"type": "campaign",
|
|
"status": "cancelled",
|
|
"subject": "New arrivals for you",
|
|
"preheader": "Special prices until the end of the month",
|
|
"from": "news@example.com",
|
|
"from_name": "Example Ltd",
|
|
"reply_to": null,
|
|
"recipients": 0,
|
|
"credits": 0.0,
|
|
"simulated": false,
|
|
"scheduled_for": null,
|
|
"sent_at": null,
|
|
"created_at": "2026-11-12T10:00:00+02:00",
|
|
"updated_at": "2026-11-12T10:05:00+02:00",
|
|
"blocks": null,
|
|
"target": null,
|
|
"credits_returned": 1200.0
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/stats": {
|
|
"get": {
|
|
"operationId": "email.campaigns.stats",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See campaign statistics",
|
|
"x-summary-pt": "Ver as estatísticas da campanha",
|
|
"description": "Needs `email_center:read`. Delivered, opens (pixel), clicks (signed links), unsubscribes and bounces; rates over delivered emails. `simulated` marks example numbers from test mode.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Entregues, aberturas (pixel), cliques (ligações assinadas), cancelamentos e devoluções; taxas sobre os entregues. `simulated` marca os números de exemplo do modo de teste.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See campaign statistics.",
|
|
"x-description-pt": "Ver as estatísticas da campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignStatsResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"recipients": 1200,
|
|
"sent": 1200,
|
|
"delivered": 1188,
|
|
"bounced": 12,
|
|
"opened": 520,
|
|
"clicked": 131,
|
|
"unsubscribed": 4,
|
|
"open_rate": 43.77,
|
|
"click_rate": 11.03,
|
|
"unsubscribe_rate": 0.34,
|
|
"bounce_rate": 1.0,
|
|
"by_status": {
|
|
"enviado": 1200
|
|
},
|
|
"top_links": [
|
|
{
|
|
"url": "https://example.com",
|
|
"clicks": 131
|
|
}
|
|
],
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/recipients": {
|
|
"get": {
|
|
"operationId": "email.campaigns.recipients",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List campaign recipients",
|
|
"x-summary-pt": "Listar os destinatários da campanha",
|
|
"description": "Needs `email_center:read`. What each contact did: opened, clicked, unsubscribed or bounced.",
|
|
"x-description-pt": "Precisa de `email_center:read`. O que cada contacto fez: abriu, clicou, cancelou ou devolveu.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List campaign recipients.",
|
|
"x-description-pt": "Listar os destinatários da campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCampaignRecipientsResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"email": "ana@example.org",
|
|
"status": "sent",
|
|
"simulated": false,
|
|
"sent_at": "2026-11-12T10:30:00+02:00",
|
|
"opened_at": "2026-11-12T11:02:00+02:00",
|
|
"opens": 2,
|
|
"clicked_at": null,
|
|
"clicks": 0,
|
|
"unsubscribed_at": null,
|
|
"bounced_at": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/campaigns/{id}/test": {
|
|
"post": {
|
|
"operationId": "email.campaigns.test",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Send a test of a campaign",
|
|
"x-summary-pt": "Enviar um teste da campanha",
|
|
"description": "Needs `email_center:write`. One email to one address, with example variables and «[Test]» in the subject; it costs one credit, like any email.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Um e-mail para um endereço, com variáveis de exemplo e «[Teste]» no assunto; custa um crédito, como qualquer e-mail.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The campaign `id`.",
|
|
"x-description-pt": "O `id` da campanha."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Send a test of a campaign.",
|
|
"x-description-pt": "Enviar um teste da campanha.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailMessageGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "5130",
|
|
"status": "sent"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"to"
|
|
],
|
|
"properties": {
|
|
"to": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"to": "ana@example.org"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/contacts": {
|
|
"get": {
|
|
"operationId": "email.contacts.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List email contacts",
|
|
"x-summary-pt": "Listar os contactos de e-mail",
|
|
"description": "Needs `email_center:read`. The SMS contacts that have an email address and the email-only contacts, without repeated addresses, with the subscription status.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Os contactos do SMS com e-mail e os contactos só de e-mail, sem endereços repetidos, com o estado da subscrição.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "group",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Group id.",
|
|
"x-description-pt": "Id do grupo."
|
|
},
|
|
{
|
|
"name": "subscription",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "subscribed, unsubscribed or suppressed.",
|
|
"x-description-pt": "subscribed, unsubscribed ou suppressed."
|
|
},
|
|
{
|
|
"name": "opened",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
{
|
|
"name": "clicked",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
{
|
|
"name": "joined_from",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
{
|
|
"name": "joined_to",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Search.",
|
|
"x-description-pt": "Procura."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List email contacts.",
|
|
"x-description-pt": "Listar os contactos de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailContactsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"email": "ana@example.org",
|
|
"name": "Ana",
|
|
"company": "Example Ltd",
|
|
"source": "email_contact",
|
|
"subscription": "subscribed",
|
|
"created_at": "2026-11-12T09:00:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "email.contacts.create",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Add an email contact",
|
|
"x-summary-pt": "Juntar um contacto de e-mail",
|
|
"description": "Needs `email_center:write`. If the address already belongs to an SMS contact, that contact is used and joins the groups. You confirm that the person agreed to receive your emails.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Se o endereço já for de um contacto do SMS, usa-se esse contacto e junta-se aos grupos. Confirma que a pessoa aceitou receber os seus e-mails.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Add an email contact.",
|
|
"x-description-pt": "Juntar um contacto de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailContactCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"email": "ana@example.org",
|
|
"name": "Ana",
|
|
"company": "Example Ltd",
|
|
"source": "email_contact",
|
|
"subscription": "subscribed",
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"created": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"email"
|
|
],
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"subscription": {
|
|
"type": "string",
|
|
"description": "subscribed (default) or unsubscribed.",
|
|
"x-description-pt": "subscribed (por omissão) ou unsubscribed."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"email": "ana@example.org",
|
|
"name": "Ana",
|
|
"groups": [
|
|
3
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/contacts/{email}": {
|
|
"get": {
|
|
"operationId": "email.contacts.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "See an email contact",
|
|
"x-summary-pt": "Ver um contacto de e-mail",
|
|
"description": "Needs `email_center:read`. With the latest campaigns it received and what it did.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Com as últimas campanhas que recebeu e o que fez.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "email",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The address, URL-encoded.",
|
|
"x-description-pt": "O endereço, codificado."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See an email contact.",
|
|
"x-description-pt": "Ver um contacto de e-mail.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailContactGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"email": "ana@example.org",
|
|
"name": "Ana",
|
|
"company": "Example Ltd",
|
|
"source": "email_contact",
|
|
"subscription": "subscribed",
|
|
"created_at": "2026-11-12T09:00:00+02:00",
|
|
"campaigns": [
|
|
{
|
|
"campaign_id": 41,
|
|
"sent_at": "2026-11-12T10:30:00+02:00",
|
|
"opened": true,
|
|
"clicked": false,
|
|
"unsubscribed": false,
|
|
"simulated": false
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/contacts/{email}/subscription": {
|
|
"put": {
|
|
"operationId": "email.contacts.subscription",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Change a subscription",
|
|
"x-summary-pt": "Mudar a subscrição",
|
|
"description": "Needs `email_center:write`. `subscribed` or `unsubscribed`. Contacts who unsubscribed through the link should only be subscribed again with their consent.",
|
|
"x-description-pt": "Precisa de `email_center:write`. `subscribed` ou `unsubscribed`. Quem cancelou pela ligação só deve voltar a ser subscrito com o seu consentimento.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "email",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The address, URL-encoded.",
|
|
"x-description-pt": "O endereço, codificado."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Change a subscription.",
|
|
"x-description-pt": "Mudar a subscrição.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailContactSubscriptionResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"email": "ana@example.org",
|
|
"subscription": "unsubscribed",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"status"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"status": "unsubscribed"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/groups": {
|
|
"get": {
|
|
"operationId": "email.groups.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List contact groups",
|
|
"x-summary-pt": "Listar os grupos de contactos",
|
|
"description": "Needs `email_center:read`. The same groups as the SMS contacts, with how many have an email address.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Os mesmos grupos dos contactos do SMS, com quantos têm e-mail.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List contact groups.",
|
|
"x-description-pt": "Listar os grupos de contactos.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailGroupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 3,
|
|
"name": "Customers",
|
|
"contacts": 1200
|
|
}
|
|
],
|
|
"meta": {
|
|
"total": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/forms": {
|
|
"get": {
|
|
"operationId": "email.forms.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List subscription forms",
|
|
"x-summary-pt": "Listar os formulários de subscrição",
|
|
"description": "Needs `email_center:read`. The subscription forms of the account, newest first, with the code to embed, the direct link and the sign-up counts. Read only: forms are created and changed in the account dashboard, on the Forms tab of E-mail Center.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Os formulários de subscrição da conta, os mais recentes primeiro, com o código para incorporar, a ligação directa e a contagem das inscrições. Só leitura: os formulários criam-se e alteram-se no painel da conta, no separador Formulários do E-mail Center.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List subscription forms.",
|
|
"x-description-pt": "Listar os formulários de subscrição.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailFormsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 7,
|
|
"name": "Newsletter",
|
|
"enabled": true,
|
|
"fields": {
|
|
"email": "required",
|
|
"phone": "off",
|
|
"name": "optional"
|
|
},
|
|
"group_id": 3,
|
|
"sites": [
|
|
"example.com"
|
|
],
|
|
"page_url": "https://my.example.com/email-form.php?f=3f9a1c2b7d4e5f6071829364",
|
|
"embed_code": "<div data-form=\"3f9a1c2b7d4e5f6071829364\"></div>\n<script src=\"https://my.example.com/email-form.php?js=3f9a1c2b7d4e5f6071829364\" async></script>",
|
|
"signups": {
|
|
"pending": 4,
|
|
"confirmed": 131,
|
|
"expired": 12,
|
|
"confirmation_rate": 89.1
|
|
},
|
|
"created_at": "2026-11-13T09:00:00+02:00",
|
|
"updated_at": "2026-11-13T09:20:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/forms/{id}/signups": {
|
|
"get": {
|
|
"operationId": "email.forms.signups",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List the sign-ups of a form",
|
|
"x-summary-pt": "Listar as inscrições de um formulário",
|
|
"description": "Needs `email_center:read`. Newest first. Forms use double opt-in: a sign-up only joins the contact list after the person confirms, through the link sent by email or by SMS. Until then it is `pending` and comes masked, without the name. Confirmed sign-ups bring the proof of consent: `confirmed_at`, `confirmation_ip` and `consent_text`. A sign-up that is not confirmed until `expires_at` becomes `expired` and its data is erased.",
|
|
"x-description-pt": "Precisa de `email_center:read`. As mais recentes primeiro. Os formulários usam dupla confirmação: a inscrição só entra na lista de contactos depois de a pessoa confirmar, pela ligação enviada por e-mail ou por SMS. Até lá fica `pending` e vem mascarada, sem o nome. As inscrições confirmadas trazem a prova do consentimento: `confirmed_at`, `confirmation_ip` e `consent_text`. A inscrição que não for confirmada até `expires_at` passa a `expired` e os dados dela são apagados.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The form `id`.",
|
|
"x-description-pt": "O `id` do formulário."
|
|
},
|
|
{
|
|
"name": "status",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "pending, confirmed or expired.",
|
|
"x-description-pt": "pending, confirmed ou expired."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the sign-ups of a form.",
|
|
"x-description-pt": "Listar as inscrições de um formulário.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailFormSignupsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 131,
|
|
"status": "pending",
|
|
"email": "r***@example.org",
|
|
"phone": null,
|
|
"name": null,
|
|
"confirmation_channel": "email",
|
|
"created_at": "2026-11-13T10:02:00+02:00",
|
|
"expires_at": "2026-11-20T10:02:00+02:00",
|
|
"confirmed_at": null,
|
|
"confirmation_ip": null,
|
|
"consent_text": null,
|
|
"simulated": false
|
|
},
|
|
{
|
|
"id": 129,
|
|
"status": "confirmed",
|
|
"email": null,
|
|
"phone": "+258841234567",
|
|
"name": null,
|
|
"confirmation_channel": "sms",
|
|
"created_at": "2026-11-13T09:40:00+02:00",
|
|
"expires_at": null,
|
|
"confirmed_at": "2026-11-13T09:41:00+02:00",
|
|
"confirmation_ip": "192.0.2.10",
|
|
"consent_text": "I agree to receive news and offers from Example Ltd.",
|
|
"simulated": false
|
|
},
|
|
{
|
|
"id": 128,
|
|
"status": "confirmed",
|
|
"email": "ana@example.org",
|
|
"phone": null,
|
|
"name": "Ana",
|
|
"confirmation_channel": "email",
|
|
"created_at": "2026-11-13T09:12:00+02:00",
|
|
"expires_at": null,
|
|
"confirmed_at": "2026-11-13T09:14:00+02:00",
|
|
"confirmation_ip": "192.0.2.10",
|
|
"consent_text": "I agree to receive news and offers from Example Ltd.",
|
|
"simulated": false
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 3,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/automations": {
|
|
"get": {
|
|
"operationId": "email.automations.list",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List automations",
|
|
"x-summary-pt": "Listar as automações",
|
|
"description": "Needs `email_center:read`. The automations of the account, newest first, each with its goal, its trigger, whether it is on and what it has sent. Automations are created and deleted in the account dashboard, on the Automations tab of E-mail Center, where you also write the emails of each one; the API reads them and turns them on and off. Each automation email counts as a campaign email: it uses one credit, goes through the same providers, and does not leave a domain that is not verified. Whoever unsubscribed or is on the suppression list never receives it.",
|
|
"x-description-pt": "Precisa de `email_center:read`. As automações da conta, as mais recentes primeiro, cada uma com o objectivo, o gatilho, se está ligada e o que já mandou. As automações criam-se e apagam-se no painel da conta, no separador Automações do E-mail Center, onde também se escrevem os e-mails de cada uma; a API lê-as e liga-as e desliga-as. Cada e-mail de automação conta como um e-mail de campanha: gasta um crédito, passa pelos mesmos fornecedores e não sai de um domínio por verificar. Quem cancelou a subscrição ou está bloqueado nunca recebe.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List automations.",
|
|
"x-description-pt": "Listar as automações.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutomationsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 12,
|
|
"name": "Welcome series",
|
|
"goal": "welcome_series",
|
|
"enabled": true,
|
|
"sending_paused": false,
|
|
"trigger": {
|
|
"type": "group",
|
|
"group_id": 3
|
|
},
|
|
"steps": 3,
|
|
"stats": {
|
|
"sent": 418,
|
|
"opened": 231,
|
|
"clicked": 67,
|
|
"sent_last_hour": 9
|
|
},
|
|
"hourly_cap": 500,
|
|
"alert": null,
|
|
"last_run_at": "2026-11-14T09:05:00+02:00",
|
|
"created_at": "2026-11-14T08:10:00+02:00",
|
|
"updated_at": "2026-11-14T08:40:00+02:00"
|
|
},
|
|
{
|
|
"id": 11,
|
|
"name": "Win back the quiet ones",
|
|
"goal": "win_back",
|
|
"enabled": false,
|
|
"sending_paused": false,
|
|
"trigger": {
|
|
"type": "segment",
|
|
"segment": "inactive",
|
|
"inactive_days": 60
|
|
},
|
|
"steps": 1,
|
|
"stats": {
|
|
"sent": 0,
|
|
"opened": 0,
|
|
"clicked": 0,
|
|
"sent_last_hour": 0
|
|
},
|
|
"hourly_cap": 500,
|
|
"alert": null,
|
|
"last_run_at": null,
|
|
"created_at": "2026-11-14T08:12:00+02:00",
|
|
"updated_at": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 2,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/automations/{id}": {
|
|
"get": {
|
|
"operationId": "email.automations.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Get an automation",
|
|
"x-summary-pt": "Ver uma automação",
|
|
"description": "Needs `email_center:read`. The same as the list, plus the emails of the series, in the order they go out, and the three caps that always apply.",
|
|
"x-description-pt": "Precisa de `email_center:read`. O mesmo da lista, mais os e-mails da série, na ordem em que saem, e os três tectos que valem sempre.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The automation `id`.",
|
|
"x-description-pt": "O `id` da automação."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get an automation.",
|
|
"x-description-pt": "Ver uma automação.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutomationResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"name": "Welcome series",
|
|
"goal": "welcome_series",
|
|
"enabled": true,
|
|
"sending_paused": false,
|
|
"trigger": {
|
|
"type": "group",
|
|
"group_id": 3
|
|
},
|
|
"steps": 3,
|
|
"stats": {
|
|
"sent": 418,
|
|
"opened": 231,
|
|
"clicked": 67,
|
|
"sent_last_hour": 9
|
|
},
|
|
"hourly_cap": 500,
|
|
"alert": null,
|
|
"last_run_at": "2026-11-14T09:05:00+02:00",
|
|
"created_at": "2026-11-14T08:10:00+02:00",
|
|
"updated_at": "2026-11-14T08:40:00+02:00",
|
|
"limits": {
|
|
"hourly_per_automation": 500,
|
|
"hourly_per_account": 1000,
|
|
"daily_per_contact": 2
|
|
},
|
|
"emails": [
|
|
{
|
|
"order": 1,
|
|
"campaign_id": 44,
|
|
"subject": "Welcome! You are on our list",
|
|
"from": "news@example.com",
|
|
"wait_hours": null,
|
|
"sent": 180
|
|
},
|
|
{
|
|
"order": 2,
|
|
"campaign_id": 45,
|
|
"subject": "What we can do for you",
|
|
"from": "news@example.com",
|
|
"wait_hours": 48,
|
|
"sent": 146
|
|
},
|
|
{
|
|
"order": 3,
|
|
"campaign_id": 46,
|
|
"subject": "Something only for the list",
|
|
"from": "news@example.com",
|
|
"wait_hours": 168,
|
|
"sent": 92
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/automations/{id}/activity": {
|
|
"get": {
|
|
"operationId": "email.automations.activity",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List what an automation has done",
|
|
"x-summary-pt": "Listar o que uma automação já fez",
|
|
"description": "Needs `email_center:read`. Every email this automation sent, newest first, with who received it, which email of the series it was and what the person did with it. Nobody gets the same email of the same automation twice. An email that was not sent comes with the reason in `status`: `suppressed` is someone who unsubscribed or is blocked.",
|
|
"x-description-pt": "Precisa de `email_center:read`. Todos os e-mails que esta automação mandou, os mais recentes primeiro, com quem os recebeu, qual o e-mail da série e o que a pessoa lhe fez. Ninguém recebe duas vezes o mesmo e-mail da mesma automação. O e-mail que não foi enviado traz o motivo no `status`: `suppressed` é quem cancelou a subscrição ou está bloqueado.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The automation `id`.",
|
|
"x-description-pt": "O `id` da automação."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List what an automation has done.",
|
|
"x-description-pt": "Listar o que uma automação já fez.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutomationActivityListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"email": "ana@example.org",
|
|
"step": 2,
|
|
"campaign_id": 45,
|
|
"status": "sent",
|
|
"simulated": false,
|
|
"sent_at": "2026-11-14T09:05:00+02:00",
|
|
"opened_at": "2026-11-14T09:31:00+02:00",
|
|
"opens": 2,
|
|
"clicked_at": null,
|
|
"clicks": 0,
|
|
"unsubscribed_at": null,
|
|
"bounced_at": null
|
|
},
|
|
{
|
|
"email": "rui@example.org",
|
|
"step": 1,
|
|
"campaign_id": 44,
|
|
"status": "sent",
|
|
"simulated": false,
|
|
"sent_at": "2026-11-14T08:45:00+02:00",
|
|
"opened_at": "2026-11-14T08:52:00+02:00",
|
|
"opens": 1,
|
|
"clicked_at": "2026-11-14T08:53:00+02:00",
|
|
"clicks": 1,
|
|
"unsubscribed_at": null,
|
|
"bounced_at": null
|
|
},
|
|
{
|
|
"email": "quiet@example.org",
|
|
"step": 1,
|
|
"campaign_id": 44,
|
|
"status": "suppressed",
|
|
"simulated": false,
|
|
"sent_at": null,
|
|
"opened_at": null,
|
|
"opens": 0,
|
|
"clicked_at": null,
|
|
"clicks": 0,
|
|
"unsubscribed_at": null,
|
|
"bounced_at": null
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 3,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/automations/{id}/enable": {
|
|
"post": {
|
|
"operationId": "email.automations.enable",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Turn an automation on",
|
|
"x-summary-pt": "Ligar uma automação",
|
|
"description": "Needs `email_center:write`. Before turning it on we check what the account dashboard checks: every email of the series has a subject and content, and the sender is on a verified domain. If something is missing the answer is `422`, with the field. If every automation is held for a moment, the answer is `409 automations_stopped`: try again in a while. Turning on an automation that is already on changes nothing. Each automation email counts as a campaign email: it uses one credit, goes through the same providers, and does not leave a domain that is not verified. Whoever unsubscribed or is on the suppression list never receives it.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Antes de ligar confere-se o que o painel da conta confere: todos os e-mails da série têm assunto e conteúdo, e o remetente é de um domínio verificado. Se faltar alguma coisa a resposta é `422`, com o campo. Se as automações estiverem travadas por uns momentos, a resposta é `409 automations_stopped`: tente dentro de algum tempo. Ligar uma automação já ligada não muda nada. Cada e-mail de automação conta como um e-mail de campanha: gasta um crédito, passa pelos mesmos fornecedores e não sai de um domínio por verificar. Quem cancelou a subscrição ou está bloqueado nunca recebe.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The automation `id`.",
|
|
"x-description-pt": "O `id` da automação."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Turn an automation on.",
|
|
"x-description-pt": "Ligar uma automação.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutomationEnableResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"name": "Welcome series",
|
|
"goal": "welcome_series",
|
|
"enabled": true,
|
|
"sending_paused": false,
|
|
"trigger": {
|
|
"type": "group",
|
|
"group_id": 3
|
|
},
|
|
"steps": 3,
|
|
"stats": {
|
|
"sent": 418,
|
|
"opened": 231,
|
|
"clicked": 67,
|
|
"sent_last_hour": 9
|
|
},
|
|
"hourly_cap": 500,
|
|
"alert": null,
|
|
"last_run_at": "2026-11-14T09:05:00+02:00",
|
|
"created_at": "2026-11-14T08:10:00+02:00",
|
|
"updated_at": "2026-11-14T08:40:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/automations/{id}/disable": {
|
|
"post": {
|
|
"operationId": "email.automations.disable",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Turn an automation off",
|
|
"x-summary-pt": "Desligar uma automação",
|
|
"description": "Needs `email_center:write`. It stops sending right away, and nothing is deleted: the emails of the series, the content and the history stay as they are, and you can turn it on again later. Turning off is never refused, so you can always stop an automation of yours.",
|
|
"x-description-pt": "Precisa de `email_center:write`. Deixa de enviar logo, e nada se apaga: os e-mails da série, o conteúdo e o histórico ficam como estão, e pode voltar a ligá-la mais tarde. Desligar nunca é recusado, para poder sempre parar uma automação sua.",
|
|
"x-permission": "email_center:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The automation `id`.",
|
|
"x-description-pt": "O `id` da automação."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Turn an automation off.",
|
|
"x-description-pt": "Desligar uma automação.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailAutomationDisableResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 12,
|
|
"name": "Welcome series",
|
|
"goal": "welcome_series",
|
|
"enabled": false,
|
|
"sending_paused": false,
|
|
"trigger": {
|
|
"type": "group",
|
|
"group_id": 3
|
|
},
|
|
"steps": 3,
|
|
"stats": {
|
|
"sent": 418,
|
|
"opened": 231,
|
|
"clicked": 67,
|
|
"sent_last_hour": 9
|
|
},
|
|
"hourly_cap": 500,
|
|
"alert": null,
|
|
"last_run_at": "2026-11-14T09:05:00+02:00",
|
|
"created_at": "2026-11-14T08:10:00+02:00",
|
|
"updated_at": "2026-11-14T08:40:00+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/relay": {
|
|
"get": {
|
|
"operationId": "email.relay.get",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Get the SMTP Relay status",
|
|
"x-summary-pt": "Ver o estado do SMTP Relay",
|
|
"description": "Needs `email_center:read`. The SMTP Relay lets a program that already speaks SMTP send through us without changing its code: point it at `hostname` on one of the `ports`, with an SMTP credential of yours. The sender may be any address of a verified domain (see GET /v1/email/domains), and each recipient uses one credit, like any other email.",
|
|
"x-description-pt": "Precisa de `email_center:read`. O SMTP Relay deixa um programa que já fala SMTP enviar por nós sem mudar o código: aponte-o ao `hostname` numa das `ports`, com uma credencial SMTP sua. O remetente pode ser qualquer endereço de um domínio verificado (veja GET /v1/email/domains), e cada destinatário gasta um crédito, como qualquer outro e-mail.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get the SMTP Relay status.",
|
|
"x-description-pt": "Ver o estado do SMTP Relay.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailRelayResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"enabled": true,
|
|
"hostname": "smtp.mailer.example.com",
|
|
"ports": [
|
|
{
|
|
"port": 2525,
|
|
"encryption": "starttls"
|
|
},
|
|
{
|
|
"port": 2465,
|
|
"encryption": "tls"
|
|
}
|
|
],
|
|
"limits": {
|
|
"max_message_size_kb": 10240,
|
|
"max_recipients_per_message": 50,
|
|
"max_credentials": 5
|
|
},
|
|
"credentials": {
|
|
"active": 2,
|
|
"revoked": 1
|
|
},
|
|
"usage": {
|
|
"from": "2026-10-16",
|
|
"to": "2026-11-14",
|
|
"messages": 1240,
|
|
"recipients": 1301,
|
|
"credits_spent": 1301.0,
|
|
"last_message_at": "2026-11-14T09:12:00+02:00"
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/relay/credentials": {
|
|
"get": {
|
|
"operationId": "email.relay.credentials",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "List the SMTP credentials",
|
|
"x-summary-pt": "Listar as credenciais SMTP",
|
|
"description": "Needs `email_center:read`. The SMTP credentials of the account, newest first, with their state and when each one last sent something. Read only, and the password is never in the answer. Credentials are created and revoked in the account dashboard, on the SMTP tab of E-mail Center, because the password is shown only once, at the moment it is born.",
|
|
"x-description-pt": "Precisa de `email_center:read`. As credenciais SMTP da conta, as mais recentes primeiro, com o estado e quando cada uma enviou alguma coisa pela última vez. Só leitura, e a senha nunca vem na resposta. As credenciais criam-se e revogam-se no painel da conta, no separador SMTP do E-mail Center, porque a senha só se mostra uma vez, no momento em que nasce.",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the SMTP credentials.",
|
|
"x-description-pt": "Listar as credenciais SMTP.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailRelayCredentialsListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"id": 8,
|
|
"name": "Our site",
|
|
"username": "smtp_a1b2c3d4e5f60718",
|
|
"status": "active",
|
|
"created_at": "2026-11-13T18:00:00+02:00",
|
|
"last_used_at": "2026-11-14T09:12:00+02:00"
|
|
},
|
|
{
|
|
"id": 7,
|
|
"name": "Billing server",
|
|
"username": "smtp_90a1b2c3d4e5f607",
|
|
"status": "active",
|
|
"created_at": "2026-11-13T17:40:00+02:00",
|
|
"last_used_at": null
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "Old test",
|
|
"username": "smtp_1f2e3d4c5b6a7980",
|
|
"status": "revoked",
|
|
"created_at": "2026-11-13T09:00:00+02:00",
|
|
"last_used_at": "2026-11-13T09:20:00+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 3,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/EmailAccountRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/models": {
|
|
"get": {
|
|
"operationId": "ai.models.list",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "List the AI models",
|
|
"x-summary-pt": "Listar os modelos de IA",
|
|
"description": "Needs `ai:read`. Every model on sale, in the OpenAI format (`{\"object\": \"list\", \"data\": [...]}`), so `client.models.list()` of the OpenAI SDKs works. Each model comes with its type and its price in credits. Your own agents come first, with `type` `agent` and the id `agent/<id>`. Filter with `type` and `q`. The list is the same with a `sandbox_` key and a `prod_` key.",
|
|
"x-description-pt": "Precisa de `ai:read`. Todos os modelos à venda, no formato da OpenAI (`{\"object\": \"list\", \"data\": [...]}`), para o `client.models.list()` dos SDK da OpenAI funcionar. Cada modelo vem com o tipo e o preço em créditos. Os seus agentes vêm primeiro, com `type` `agent` e o id `agent/<id>`. Filtre com `type` e `q`. A lista é a mesma com uma chave `sandbox_` e com uma chave `prod_`.",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"video",
|
|
"audio",
|
|
"agent"
|
|
]
|
|
},
|
|
"description": "Only models of this type. `agent` lists only your agents.",
|
|
"x-description-pt": "Só os modelos deste tipo. `agent` lista só os seus agentes."
|
|
},
|
|
{
|
|
"name": "q",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Search in the id, the name and the description.",
|
|
"x-description-pt": "Procura no id, no nome e na descrição."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List the AI models.",
|
|
"x-description-pt": "Listar os modelos de IA.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiModelsList"
|
|
},
|
|
"example": {
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"id": "agent/7c1e9a42-b35d8f06-a2c4e719-5d0b3f8e",
|
|
"object": "model",
|
|
"owned_by": "user",
|
|
"type": "agent",
|
|
"category": "agent",
|
|
"name": "Support assistant",
|
|
"description": "Answers customer questions about our plans.",
|
|
"base_model": "deepseek-ai/deepseek-v4-flash",
|
|
"status": "active",
|
|
"tools": [
|
|
"web_fetch",
|
|
"current_datetime"
|
|
],
|
|
"pricing": {
|
|
"unit": "1M tokens",
|
|
"input": 56.0,
|
|
"output": 112.0,
|
|
"cached_input": 11.2
|
|
}
|
|
},
|
|
{
|
|
"id": "deepseek-ai/deepseek-v4-flash",
|
|
"object": "model",
|
|
"owned_by": "deepseek-ai",
|
|
"type": "text",
|
|
"category": "LLM",
|
|
"name": "DeepSeek V4 Flash",
|
|
"description": "Fast language model with strong reasoning and long context.",
|
|
"context_length": 1048576,
|
|
"max_output_tokens": 393216,
|
|
"pricing": {
|
|
"unit": "1M tokens",
|
|
"input": 56.0,
|
|
"output": 112.0,
|
|
"cached_input": 11.2
|
|
}
|
|
},
|
|
{
|
|
"id": "moonshotai/kimi-k2.6",
|
|
"object": "model",
|
|
"owned_by": "moonshotai",
|
|
"type": "text",
|
|
"category": "LLM",
|
|
"name": "Kimi K2.6",
|
|
"description": "Enhanced model for reasoning, coding, and productivity.",
|
|
"context_length": 262144,
|
|
"max_output_tokens": 262144,
|
|
"pricing": {
|
|
"unit": "1M tokens",
|
|
"input": 380.0,
|
|
"output": 1600.0,
|
|
"cached_input": 64.0
|
|
}
|
|
},
|
|
{
|
|
"id": "openai/gpt-image-2/text-to-image",
|
|
"object": "model",
|
|
"owned_by": "openai",
|
|
"type": "image",
|
|
"category": "text-to-image",
|
|
"name": "GPT Image 2 Text-to-Image",
|
|
"description": "Fast, cost-efficient text-to-image generator.",
|
|
"pricing": {
|
|
"unit": "image",
|
|
"credits": 2
|
|
}
|
|
},
|
|
{
|
|
"id": "bytedance/seedance-2.0-mini/text-to-video",
|
|
"object": "model",
|
|
"owned_by": "bytedance",
|
|
"type": "video",
|
|
"category": "text-to-video",
|
|
"name": "Seedance 2.0 Mini Text-to-Video",
|
|
"description": "Lightweight, economical video generation from text prompts with native audio.",
|
|
"pricing": {
|
|
"unit": "second",
|
|
"credits": 18
|
|
}
|
|
},
|
|
{
|
|
"id": "elevenlabs/v3/text-to-speech",
|
|
"object": "model",
|
|
"owned_by": "elevenlabs",
|
|
"type": "audio",
|
|
"category": "text-to-speech",
|
|
"name": "ElevenLabs v3 Text-to-Speech",
|
|
"description": "High-quality speech generation from text.",
|
|
"pricing": {
|
|
"unit": "generation",
|
|
"credits": 40
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/models/{id}": {
|
|
"get": {
|
|
"operationId": "ai.models.get",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Get an AI model",
|
|
"x-summary-pt": "Ver um modelo de IA",
|
|
"description": "Needs `ai:read`. One model, in the same format as the list. Image, video and voice models also bring `input`: the fields to send inside `input` in POST /v1/media/generations, with the accepted values and the defaults.",
|
|
"x-description-pt": "Precisa de `ai:read`. Um modelo, no mesmo formato da lista. Os modelos de imagem, vídeo e voz trazem também `input`: os campos a enviar dentro de `input` em POST /v1/media/generations, com os valores aceites e os valores por omissão.",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "deepseek-ai/deepseek-v4-flash",
|
|
"description": "The model id, slash included, such as `deepseek-ai/deepseek-v4-flash` or `openai/gpt-image-2/text-to-image`, or `agent/<id>` for one of your agents. Send it as it is.",
|
|
"x-description-pt": "O id do modelo, com a barra, como `deepseek-ai/deepseek-v4-flash` ou `openai/gpt-image-2/text-to-image`, ou `agent/<id>` para um dos seus agentes. Envie-o tal como está."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get an AI model.",
|
|
"x-description-pt": "Ver um modelo de IA.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiModelDetail"
|
|
},
|
|
"example": {
|
|
"id": "openai/gpt-image-2/text-to-image",
|
|
"object": "model",
|
|
"owned_by": "openai",
|
|
"type": "image",
|
|
"category": "text-to-image",
|
|
"name": "GPT Image 2 Text-to-Image",
|
|
"description": "Fast, cost-efficient text-to-image generator.",
|
|
"pricing": {
|
|
"unit": "image",
|
|
"credits": 2
|
|
},
|
|
"input": [
|
|
{
|
|
"name": "prompt",
|
|
"type": "string",
|
|
"required": true,
|
|
"options": null,
|
|
"default": null,
|
|
"min": null,
|
|
"max": null,
|
|
"description": "What the image should show."
|
|
},
|
|
{
|
|
"name": "size",
|
|
"type": "string",
|
|
"required": false,
|
|
"options": [
|
|
"1024x1024",
|
|
"1024x1536",
|
|
"1536x1024",
|
|
"2048x2048"
|
|
],
|
|
"default": "1024x1024",
|
|
"min": null,
|
|
"max": null,
|
|
"description": "The size of the image, in pixels."
|
|
},
|
|
{
|
|
"name": "quality",
|
|
"type": "string",
|
|
"required": false,
|
|
"options": [
|
|
"low",
|
|
"medium",
|
|
"high"
|
|
],
|
|
"default": "medium",
|
|
"min": null,
|
|
"max": null,
|
|
"description": "The quality of the image."
|
|
},
|
|
{
|
|
"name": "output_format",
|
|
"type": "string",
|
|
"required": false,
|
|
"options": [
|
|
"jpeg",
|
|
"png"
|
|
],
|
|
"default": "jpeg",
|
|
"min": null,
|
|
"max": null,
|
|
"description": "The file format."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/ModelNotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/chat/completions": {
|
|
"post": {
|
|
"operationId": "ai.chat.create",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Chat with a text model",
|
|
"x-summary-pt": "Conversar com um modelo de texto",
|
|
"description": "Needs `ai:write`. Compatible with the OpenAI chat API: point the OpenAI SDK at this API (`base_url`) and use your key. Before calling the model we reserve credits for the input (about one token per 3 characters) and for `max_tokens` of output; if the balance is not enough, the answer is `402` and nothing is charged. At the end we charge by the real `usage` and give back the difference. With `stream: true` the answer comes as `text/event-stream`. With a `sandbox_` key the model is not called and nothing is charged: the answer is always `Resposta de teste (sandbox).`, with `usage` at zero, also in streaming. With `\"model\": \"agent/<id>\"` the request goes to one of your agents: it adds its instructions and knowledge, uses its model, runs its tools (at most 5 rounds, each one charged as a chat request) and never goes above its `max_tokens` and `temperature`; with `stream: true` only the final answer is streamed.",
|
|
"x-description-pt": "Precisa de `ai:write`. Compatível com a API de chat da OpenAI: aponte o SDK da OpenAI para esta API (`base_url`) e use a sua chave. Antes de chamar o modelo reservamos créditos para a entrada (cerca de um token por cada 3 caracteres) e para `max_tokens` de saída; se o saldo não chegar, a resposta é `402` e nada é cobrado. No fim cobramos pelo `usage` real e devolvemos a diferença. Com `stream: true` a resposta vem em `text/event-stream`. Com uma chave `sandbox_` o modelo não é chamado e nada é cobrado: a resposta é sempre `Resposta de teste (sandbox).`, com o `usage` a zero, também em streaming. Com `\"model\": \"agent/<id>\"` o pedido vai para um dos seus agentes: junta as instruções e o conhecimento dele, usa o modelo dele, corre as ferramentas (no máximo 5 voltas, cada uma cobrada como um pedido de chat) e nunca passa o `max_tokens` e a `temperature` dele; com `stream: true` só a resposta final vem em streaming.",
|
|
"x-permission": "ai:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Chat with a text model.",
|
|
"x-description-pt": "Conversar com um modelo de texto.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiChatCompletion"
|
|
},
|
|
"example": {
|
|
"id": "chatcmpl-8f2c1a7e5b9d4c3a",
|
|
"object": "chat.completion",
|
|
"created": 1795420800,
|
|
"model": "deepseek-ai/deepseek-v4-flash",
|
|
"choices": [
|
|
{
|
|
"index": 0,
|
|
"message": {
|
|
"role": "assistant",
|
|
"content": "Welcome! We keep your website fast, safe and online, so you can focus on your business."
|
|
},
|
|
"finish_reason": "stop"
|
|
}
|
|
],
|
|
"usage": {
|
|
"prompt_tokens": 31,
|
|
"completion_tokens": 22,
|
|
"total_tokens": 53,
|
|
"prompt_tokens_details": {
|
|
"cached_tokens": 0
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"description": "With `stream: true`.",
|
|
"x-description-pt": "Com `stream: true`."
|
|
},
|
|
"example": "data: {\"id\":\"chatcmpl-8f2c1a7e5b9d4c3a\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Welcome!\"}}]}\n\ndata: {\"id\":\"chatcmpl-8f2c1a7e5b9d4c3a\",\"object\":\"chat.completion.chunk\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" We keep your website fast.\"},\"finish_reason\":\"stop\"}]}\n\ndata: {\"id\":\"chatcmpl-8f2c1a7e5b9d4c3a\",\"object\":\"chat.completion.chunk\",\"choices\":[],\"usage\":{\"prompt_tokens\":31,\"completion_tokens\":9,\"total_tokens\":40}}\n\ndata: [DONE]\n\n"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/AiInsufficientCredits"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/ModelNotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/AgentPaused"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/AiLimit"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiChatRequest"
|
|
},
|
|
"example": {
|
|
"model": "deepseek-ai/deepseek-v4-flash",
|
|
"messages": [
|
|
{
|
|
"role": "system",
|
|
"content": "You are a helpful assistant for a web hosting company."
|
|
},
|
|
{
|
|
"role": "user",
|
|
"content": "Write a two-sentence welcome message for our website."
|
|
}
|
|
],
|
|
"max_tokens": 200
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/media/generations": {
|
|
"post": {
|
|
"operationId": "ai.media.create",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Start an image, video or voice generation",
|
|
"x-summary-pt": "Pedir uma imagem, um vídeo ou uma voz",
|
|
"description": "Needs `ai:write`. Images, videos and voice take from a few seconds to a few minutes, so the answer is `202` right away, with the `id` of the generation and the credits reserved. Then call GET /v1/media/generations/{id} until `status` is `completed` or `failed`. If the balance is not enough for the reservation, the answer is `402` and nothing is charged. With a `sandbox_` key nothing is made and nothing is charged: the generation is `completed` at once, with an example link and `0` credits.",
|
|
"x-description-pt": "Precisa de `ai:write`. As imagens, os vídeos e a voz levam de alguns segundos a alguns minutos, por isso a resposta é logo `202`, com o `id` da geração e os créditos reservados. Depois chame GET /v1/media/generations/{id} até o `status` ser `completed` ou `failed`. Se o saldo não chegar para a reserva, a resposta é `402` e nada é cobrado. Com uma chave `sandbox_` nada é gerado e nada é cobrado: a geração fica logo `completed`, com uma ligação de exemplo e `0` créditos.",
|
|
"x-permission": "ai:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Start an image, video or voice generation.",
|
|
"x-description-pt": "Pedir uma imagem, um vídeo ou uma voz.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiMediaCreated"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "9b2f6c1e-4a7d-4f0e-9c1b-2d3e4f5a6b7c",
|
|
"status": "processing",
|
|
"model": "openai/gpt-image-2/text-to-image",
|
|
"credits_reserved": 2
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/AiInsufficientCredits"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/ModelNotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiMediaRequest"
|
|
},
|
|
"example": {
|
|
"model": "openai/gpt-image-2/text-to-image",
|
|
"input": {
|
|
"prompt": "A bright, modern office with plants and soft morning light",
|
|
"size": "1024x1024",
|
|
"quality": "medium"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/media/generations/{id}": {
|
|
"get": {
|
|
"operationId": "ai.media.get",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Check a generation",
|
|
"x-summary-pt": "Consultar uma geração",
|
|
"description": "Needs `ai:read`. The state of a generation. Each call also moves it forward, so call it every 5 to 10 seconds until `status` is `completed` (the links are in `outputs`) or `failed` (the reason is in `error` and the reservation comes back). Only the account that asked for it can see it.",
|
|
"x-description-pt": "Precisa de `ai:read`. O estado de uma geração. Cada consulta também a faz avançar, por isso chame-a de 5 em 5 ou de 10 em 10 segundos até o `status` ser `completed` (as ligações vêm em `outputs`) ou `failed` (o motivo vem em `error` e a reserva volta ao saldo). Só a conta que a pediu a pode ver.",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "9b2f6c1e-4a7d-4f0e-9c1b-2d3e4f5a6b7c",
|
|
"description": "The `id` returned by POST /v1/media/generations.",
|
|
"x-description-pt": "O `id` devolvido por POST /v1/media/generations."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Check a generation.",
|
|
"x-description-pt": "Consultar uma geração.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiMediaJob"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": "9b2f6c1e-4a7d-4f0e-9c1b-2d3e4f5a6b7c",
|
|
"status": "completed",
|
|
"model": "openai/gpt-image-2/text-to-image",
|
|
"outputs": [
|
|
"https://ai.example.com/media/9b2f6c1e/1.jpeg"
|
|
],
|
|
"credits_charged": 2,
|
|
"error": null
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/ai/balance": {
|
|
"get": {
|
|
"operationId": "ai.balance.get",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "See the AI credit balance",
|
|
"x-summary-pt": "Ver o saldo de créditos de IA",
|
|
"description": "Needs `ai:read`. The credits the account has for AI. Chat and generations take credits from this balance; a reservation that is not used comes back to it. It is the same balance with a `sandbox_` key and a `prod_` key. With a Coding Plan, `subscription` also shows the points left this week and this month and when they come back.",
|
|
"x-description-pt": "Precisa de `ai:read`. Os créditos que a conta tem para a IA. O chat e as gerações tiram créditos deste saldo; a reserva que não se gasta volta para ele. É o mesmo saldo com uma chave `sandbox_` e com uma chave `prod_`. Com um Coding Plan, `subscription` mostra também os pontos que restam na semana e no mês e quando voltam.",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the AI credit balance.",
|
|
"x-description-pt": "Ver o saldo de créditos de IA.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiBalance"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"credits": 1250.5,
|
|
"currency": "credits",
|
|
"subscription": {
|
|
"plan": "plus",
|
|
"plan_name": "Plus",
|
|
"status": "active",
|
|
"weekly_remaining": 61250000,
|
|
"monthly_remaining": 143750000,
|
|
"weekly_resets_at": "2026-11-23T00:00:00+00:00",
|
|
"monthly_resets_at": "2026-12-10T00:00:00+00:00",
|
|
"fallback_to_credits": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/messages": {
|
|
"post": {
|
|
"operationId": "ai.messages.create",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Send a message in the Anthropic format",
|
|
"x-summary-pt": "Enviar uma mensagem no formato da Anthropic",
|
|
"description": "Needs `ai:write`. Compatible with the Anthropic Messages API, for Claude Code and the Anthropic SDKs: set the base URL to this API without `/v1` (the tool adds `/v1/messages`). It works like POST /v1/chat/completions: the same models and agents, the same reservation and charge (or Coding Plan points), the same account rules and the same sandbox, where the answer is always `Resposta de teste (sandbox).` with `usage` at zero. Tool calls come as `tool_use` blocks and you answer with `tool_result` blocks. With `stream: true` the answer comes as Anthropic events. Errors in this operation use the Anthropic format. The body may have up to 8 MB. The key may come in `Authorization: Bearer` or in `x-api-key`.",
|
|
"x-description-pt": "Precisa de `ai:write`. Compatível com a API Messages da Anthropic, para o Claude Code e os SDK da Anthropic: indique como endereço base esta API sem `/v1` (a ferramenta junta `/v1/messages`). Funciona como POST /v1/chat/completions: os mesmos modelos e agentes, a mesma reserva e cobrança (ou os pontos do Coding Plan), as mesmas regras da conta e o mesmo sandbox, onde a resposta é sempre `Resposta de teste (sandbox).` com o `usage` a zero. As chamadas de ferramentas vêm em blocos `tool_use` e responda com blocos `tool_result`. Com `stream: true` a resposta vem em eventos da Anthropic. Os erros desta operação usam o formato da Anthropic. O corpo pode ter até 8 MB. A chave pode vir em `Authorization: Bearer` ou em `x-api-key`.",
|
|
"x-permission": "ai:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "anthropic-version",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "2023-06-01",
|
|
"description": "Sent by the Anthropic SDKs and Claude Code. It goes through as it is; you do not need to send it.",
|
|
"x-description-pt": "Enviado pelos SDK da Anthropic e pelo Claude Code. Passa tal como vem; não precisa de o enviar."
|
|
},
|
|
{
|
|
"name": "anthropic-beta",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Sent by Claude Code. It goes through as it is.",
|
|
"x-description-pt": "Enviado pelo Claude Code. Passa tal como vem."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"name": "x-api-key",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "sandbox_...",
|
|
"description": "The key can come in this header instead of `Authorization: Bearer` (Claude Code sends it here when you use `ANTHROPIC_API_KEY`). It works in every operation of the API.",
|
|
"x-description-pt": "A chave pode vir neste cabeçalho em vez de `Authorization: Bearer` (o Claude Code envia-a aqui quando usa `ANTHROPIC_API_KEY`). Funciona em todas as operações da API."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Send a message in the Anthropic format.",
|
|
"x-description-pt": "Enviar uma mensagem no formato da Anthropic.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiMessage"
|
|
},
|
|
"example": {
|
|
"id": "msg_4f8a1c2e9b7d3a6f5e0c1b2a",
|
|
"type": "message",
|
|
"role": "assistant",
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"content": [
|
|
{
|
|
"type": "text",
|
|
"text": "def is_palindrome(s: str) -> bool:\n t = \"\".join(c.lower() for c in s if c.isalnum())\n return t == t[::-1]"
|
|
}
|
|
],
|
|
"stop_reason": "end_turn",
|
|
"stop_sequence": null,
|
|
"usage": {
|
|
"input_tokens": 38,
|
|
"output_tokens": 41,
|
|
"cache_creation_input_tokens": 0,
|
|
"cache_read_input_tokens": 0
|
|
}
|
|
}
|
|
},
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"description": "With `stream: true`.",
|
|
"x-description-pt": "Com `stream: true`."
|
|
},
|
|
"example": "event: message_start\ndata: {\"type\":\"message_start\",\"message\":{\"id\":\"msg_4f8a1c2e9b7d3a6f5e0c1b2a\",\"type\":\"message\",\"role\":\"assistant\",\"model\":\"moonshotai/kimi-k2.7-code\",\"content\":[],\"stop_reason\":null,\"usage\":{\"input_tokens\":38,\"output_tokens\":0}}}\n\nevent: content_block_start\ndata: {\"type\":\"content_block_start\",\"index\":0,\"content_block\":{\"type\":\"text\",\"text\":\"\"}}\n\nevent: content_block_delta\ndata: {\"type\":\"content_block_delta\",\"index\":0,\"delta\":{\"type\":\"text_delta\",\"text\":\"def is_palindrome\"}}\n\nevent: content_block_stop\ndata: {\"type\":\"content_block_stop\",\"index\":0}\n\nevent: message_delta\ndata: {\"type\":\"message_delta\",\"delta\":{\"stop_reason\":\"end_turn\",\"stop_sequence\":null},\"usage\":{\"output_tokens\":41}}\n\nevent: message_stop\ndata: {\"type\":\"message_stop\"}\n\n"
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request is not valid (`invalid_request`), for example the body is not JSON, or `model`, `max_tokens` or `messages` are missing.",
|
|
"x-description-pt": "O pedido não é válido (`invalid_request`), por exemplo o corpo não é JSON, ou faltam `model`, `max_tokens` ou `messages`.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "invalid_request_error",
|
|
"message": "The request is not valid."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "The key is missing, wrong, revoked or expired (`unauthorized`).",
|
|
"x-description-pt": "A chave está em falta, errada, revogada ou fora da validade (`unauthorized`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "authentication_error",
|
|
"message": "Missing or invalid API key."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"402": {
|
|
"description": "Not enough AI credits for the reservation (`insufficient_credits`). Nothing was charged.",
|
|
"x-description-pt": "Os créditos de IA não chegam para a reserva (`insufficient_credits`). Nada foi cobrado.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "billing_error",
|
|
"message": "Not enough credits for this request. Nothing was charged."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The key does not have `ai:write` (`insufficient_scope`), or the All in One AI account is not active.",
|
|
"x-description-pt": "A chave não tem `ai:write` (`insufficient_scope`), ou a conta do All in One AI não está activa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "permission_error",
|
|
"message": "This key does not have the required permission."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The agent in `model` does not exist or belongs to another account (`model_not_found`). A model name that is not in the catalog, such as `claude-sonnet-...`, does not give this error: it uses our default coding model.",
|
|
"x-description-pt": "O agente de `model` não existe ou é de outra conta (`model_not_found`). Um nome de modelo que não está no catálogo, como `claude-sonnet-...`, não dá este erro: usa o nosso modelo de código por omissão.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "not_found_error",
|
|
"message": "This model does not exist."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too many requests per minute for this key (`rate_limited`), or the points of the Coding Plan ran out and the request cannot be paid with credits (`plan_limit_reached`). See `Retry-After`.",
|
|
"x-description-pt": "Demasiados pedidos por minuto com esta chave (`rate_limited`), ou os pontos do Coding Plan acabaram e o pedido não se pode pagar com créditos (`plan_limit_reached`). Veja `Retry-After`.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "rate_limit_error",
|
|
"message": "Too many requests. Please try again shortly."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error (`internal_error`). Give the `request_id` to support.",
|
|
"x-description-pt": "Erro interno (`internal_error`). Indique o `request_id` ao suporte.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "api_error",
|
|
"message": "An internal error occurred. Please give the correlation_id to support."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "The AI service did not respond as expected (`upstream_error`). Try again shortly.",
|
|
"x-description-pt": "O serviço de IA não respondeu como esperado (`upstream_error`). Tente de novo daqui a pouco.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "api_error",
|
|
"message": "The service did not respond as expected. Please try again later."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "The API is turned off (`disabled`).",
|
|
"x-description-pt": "A API está desligada (`disabled`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "overloaded_error",
|
|
"message": "The API is currently turned off."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiMessagesRequest"
|
|
},
|
|
"example": {
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"max_tokens": 1024,
|
|
"system": "You are a careful senior developer.",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": "Write a Python function that checks if a string is a palindrome."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/messages/count_tokens": {
|
|
"post": {
|
|
"operationId": "ai.messages.count_tokens",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Count the tokens of a message",
|
|
"x-summary-pt": "Contar os tokens de uma mensagem",
|
|
"description": "Needs `ai:write`. An estimate of the input tokens of a POST /v1/messages request, which Claude Code uses to manage the context. It does not call the model, costs nothing and does not spend points. Errors use the Anthropic format. The key may come in `Authorization: Bearer` or in `x-api-key`.",
|
|
"x-description-pt": "Precisa de `ai:write`. Uma estimativa dos tokens de entrada de um pedido a POST /v1/messages, que o Claude Code usa para gerir o contexto. Não chama o modelo, não custa nada e não gasta pontos. Os erros usam o formato da Anthropic. A chave pode vir em `Authorization: Bearer` ou em `x-api-key`.",
|
|
"x-permission": "ai:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "anthropic-version",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "2023-06-01",
|
|
"description": "Sent by the Anthropic SDKs and Claude Code. It goes through as it is; you do not need to send it.",
|
|
"x-description-pt": "Enviado pelos SDK da Anthropic e pelo Claude Code. Passa tal como vem; não precisa de o enviar."
|
|
},
|
|
{
|
|
"name": "anthropic-beta",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Sent by Claude Code. It goes through as it is.",
|
|
"x-description-pt": "Enviado pelo Claude Code. Passa tal como vem."
|
|
},
|
|
{
|
|
"name": "x-api-key",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "sandbox_...",
|
|
"description": "The key can come in this header instead of `Authorization: Bearer` (Claude Code sends it here when you use `ANTHROPIC_API_KEY`). It works in every operation of the API.",
|
|
"x-description-pt": "A chave pode vir neste cabeçalho em vez de `Authorization: Bearer` (o Claude Code envia-a aqui quando usa `ANTHROPIC_API_KEY`). Funciona em todas as operações da API."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Count the tokens of a message.",
|
|
"x-description-pt": "Contar os tokens de uma mensagem.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiTokenCount"
|
|
},
|
|
"example": {
|
|
"input_tokens": 38
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "The request is not valid (`invalid_request`), for example the body is not JSON, or `model`, `max_tokens` or `messages` are missing.",
|
|
"x-description-pt": "O pedido não é válido (`invalid_request`), por exemplo o corpo não é JSON, ou faltam `model`, `max_tokens` ou `messages`.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "invalid_request_error",
|
|
"message": "The request is not valid."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"description": "The key is missing, wrong, revoked or expired (`unauthorized`).",
|
|
"x-description-pt": "A chave está em falta, errada, revogada ou fora da validade (`unauthorized`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "authentication_error",
|
|
"message": "Missing or invalid API key."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "The key does not have `ai:write` (`insufficient_scope`), or the All in One AI account is not active.",
|
|
"x-description-pt": "A chave não tem `ai:write` (`insufficient_scope`), ou a conta do All in One AI não está activa.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "permission_error",
|
|
"message": "This key does not have the required permission."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"404": {
|
|
"description": "The agent in `model` does not exist or belongs to another account (`model_not_found`). A model name that is not in the catalog, such as `claude-sonnet-...`, does not give this error: it uses our default coding model.",
|
|
"x-description-pt": "O agente de `model` não existe ou é de outra conta (`model_not_found`). Um nome de modelo que não está no catálogo, como `claude-sonnet-...`, não dá este erro: usa o nosso modelo de código por omissão.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "not_found_error",
|
|
"message": "This model does not exist."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"429": {
|
|
"description": "Too many requests per minute for this key (`rate_limited`). See `Retry-After`.",
|
|
"x-description-pt": "Demasiados pedidos por minuto com esta chave (`rate_limited`). Veja `Retry-After`.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "rate_limit_error",
|
|
"message": "Too many requests. Please try again shortly."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"500": {
|
|
"description": "Internal error (`internal_error`). Give the `request_id` to support.",
|
|
"x-description-pt": "Erro interno (`internal_error`). Indique o `request_id` ao suporte.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "api_error",
|
|
"message": "An internal error occurred. Please give the correlation_id to support."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"502": {
|
|
"description": "The AI service did not respond as expected (`upstream_error`). Try again shortly.",
|
|
"x-description-pt": "O serviço de IA não respondeu como esperado (`upstream_error`). Tente de novo daqui a pouco.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "api_error",
|
|
"message": "The service did not respond as expected. Please try again later."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"503": {
|
|
"description": "The API is turned off (`disabled`).",
|
|
"x-description-pt": "A API está desligada (`disabled`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiAnthropicError"
|
|
},
|
|
"example": {
|
|
"type": "error",
|
|
"error": {
|
|
"type": "overloaded_error",
|
|
"message": "The API is currently turned off."
|
|
},
|
|
"request_id": "0f8fad5b-d9cb-469f-a165-70867728950e"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiCountTokensRequest"
|
|
},
|
|
"example": {
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"system": "You are a careful senior developer.",
|
|
"messages": [
|
|
{
|
|
"role": "user",
|
|
"content": "Write a Python function that checks if a string is a palindrome."
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/responses": {
|
|
"post": {
|
|
"operationId": "ai.responses.create",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Create a response in the OpenAI Responses format",
|
|
"x-summary-pt": "Criar uma resposta no formato OpenAI Responses",
|
|
"description": "Needs `ai:write`. Compatible with the OpenAI Responses API, for Codex CLI (`wire_api = \"responses\"`) and the OpenAI SDKs (`client.responses.create`), with the base URL ending in `/v1`. It works like POST /v1/chat/completions: the same models and agents, the same reservation and charge (or Coding Plan points), the same account rules and the same sandbox. Function calls come as `function_call` items and you answer with `function_call_output` items. The response is kept for 30 days, so you can go on with `previous_response_id`. Errors of the model and of the account come in the OpenAI format (`{\"error\": {\"message\", \"type\", \"param\", \"code\"}}`), with the same `code`. The body may have up to 8 MB. The key may come in `Authorization: Bearer` or in `x-api-key`.",
|
|
"x-description-pt": "Precisa de `ai:write`. Compatível com a API Responses da OpenAI, para o Codex CLI (`wire_api = \"responses\"`) e os SDK da OpenAI (`client.responses.create`), com o endereço base a acabar em `/v1`. Funciona como POST /v1/chat/completions: os mesmos modelos e agentes, a mesma reserva e cobrança (ou os pontos do Coding Plan), as mesmas regras da conta e o mesmo sandbox. As chamadas de funções vêm em itens `function_call` e responda com itens `function_call_output`. A resposta fica guardada 30 dias, para poder continuar com `previous_response_id`. Os erros do modelo e da conta vêm no formato da OpenAI (`{\"error\": {\"message\", \"type\", \"param\", \"code\"}}`), com o mesmo `code`. O corpo pode ter até 8 MB. A chave pode vir em `Authorization: Bearer` ou em `x-api-key`.",
|
|
"x-permission": "ai:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "x-api-key",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "sandbox_...",
|
|
"description": "The key can come in this header instead of `Authorization: Bearer` (Claude Code sends it here when you use `ANTHROPIC_API_KEY`). It works in every operation of the API.",
|
|
"x-description-pt": "A chave pode vir neste cabeçalho em vez de `Authorization: Bearer` (o Claude Code envia-a aqui quando usa `ANTHROPIC_API_KEY`). Funciona em todas as operações da API."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Create a response in the OpenAI Responses format.",
|
|
"x-description-pt": "Criar uma resposta no formato OpenAI Responses.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiResponse"
|
|
},
|
|
"example": {
|
|
"id": "resp_7d2c9e4b1a6f3c8e5b0d2a19",
|
|
"object": "response",
|
|
"created_at": 1795420800,
|
|
"status": "completed",
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"output": [
|
|
{
|
|
"id": "msg_3b8e1d6c4a9f2e7b0c5d1a83",
|
|
"type": "message",
|
|
"status": "completed",
|
|
"role": "assistant",
|
|
"content": [
|
|
{
|
|
"type": "output_text",
|
|
"text": "def is_palindrome(s: str) -> bool:\n t = \"\".join(c.lower() for c in s if c.isalnum())\n return t == t[::-1]",
|
|
"annotations": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"previous_response_id": null,
|
|
"usage": {
|
|
"input_tokens": 38,
|
|
"input_tokens_details": {
|
|
"cached_tokens": 0
|
|
},
|
|
"output_tokens": 41,
|
|
"output_tokens_details": {
|
|
"reasoning_tokens": 0
|
|
},
|
|
"total_tokens": 79
|
|
}
|
|
}
|
|
},
|
|
"text/event-stream": {
|
|
"schema": {
|
|
"type": "string",
|
|
"description": "With `stream: true`.",
|
|
"x-description-pt": "Com `stream: true`."
|
|
},
|
|
"example": "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_7d2c9e4b1a6f3c8e5b0d2a19\",\"object\":\"response\",\"status\":\"in_progress\",\"model\":\"moonshotai/kimi-k2.7-code\",\"output\":[]}}\n\nevent: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"output_index\":0,\"item\":{\"id\":\"msg_3b8e1d6c4a9f2e7b0c5d1a83\",\"type\":\"message\",\"status\":\"in_progress\",\"role\":\"assistant\",\"content\":[]}}\n\nevent: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"item_id\":\"msg_3b8e1d6c4a9f2e7b0c5d1a83\",\"output_index\":0,\"content_index\":0,\"delta\":\"def is_palindrome\"}\n\nevent: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"output_index\":0,\"item\":{\"id\":\"msg_3b8e1d6c4a9f2e7b0c5d1a83\",\"type\":\"message\",\"status\":\"completed\",\"role\":\"assistant\"}}\n\nevent: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_7d2c9e4b1a6f3c8e5b0d2a19\",\"object\":\"response\",\"status\":\"completed\",\"usage\":{\"input_tokens\":38,\"output_tokens\":41,\"total_tokens\":79}}}\n\n"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/AiInsufficientCredits"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/ModelNotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/AgentPaused"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/AiLimit"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiResponsesRequest"
|
|
},
|
|
"example": {
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"instructions": "You are a careful senior developer.",
|
|
"input": "Write a Python function that checks if a string is a palindrome.",
|
|
"max_output_tokens": 1024
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/responses/{id}": {
|
|
"get": {
|
|
"operationId": "ai.responses.get",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Get a saved response",
|
|
"x-summary-pt": "Ver uma resposta guardada",
|
|
"description": "Needs `ai:read`. A response made by POST /v1/responses in the last 30 days, the same as it was returned. Only the account that made it can see it; after 30 days the answer is `404`. The key may come in `Authorization: Bearer` or in `x-api-key`.",
|
|
"x-description-pt": "Precisa de `ai:read`. Uma resposta feita por POST /v1/responses nos últimos 30 dias, igual à que foi devolvida. Só a conta que a fez a pode ver; depois de 30 dias a resposta é `404`. A chave pode vir em `Authorization: Bearer` ou em `x-api-key`.",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "resp_7d2c9e4b1a6f3c8e5b0d2a19",
|
|
"description": "The `id` returned by POST /v1/responses.",
|
|
"x-description-pt": "O `id` devolvido por POST /v1/responses."
|
|
},
|
|
{
|
|
"name": "x-api-key",
|
|
"in": "header",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "sandbox_...",
|
|
"description": "The key can come in this header instead of `Authorization: Bearer` (Claude Code sends it here when you use `ANTHROPIC_API_KEY`). It works in every operation of the API.",
|
|
"x-description-pt": "A chave pode vir neste cabeçalho em vez de `Authorization: Bearer` (o Claude Code envia-a aqui quando usa `ANTHROPIC_API_KEY`). Funciona em todas as operações da API."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get a saved response.",
|
|
"x-description-pt": "Ver uma resposta guardada.",
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiResponse"
|
|
},
|
|
"example": {
|
|
"id": "resp_7d2c9e4b1a6f3c8e5b0d2a19",
|
|
"object": "response",
|
|
"created_at": 1795420800,
|
|
"status": "completed",
|
|
"model": "moonshotai/kimi-k2.7-code",
|
|
"output": [
|
|
{
|
|
"id": "msg_3b8e1d6c4a9f2e7b0c5d1a83",
|
|
"type": "message",
|
|
"status": "completed",
|
|
"role": "assistant",
|
|
"content": [
|
|
{
|
|
"type": "output_text",
|
|
"text": "def is_palindrome(s: str) -> bool:\n t = \"\".join(c.lower() for c in s if c.isalnum())\n return t == t[::-1]",
|
|
"annotations": []
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"previous_response_id": null,
|
|
"usage": {
|
|
"input_tokens": 38,
|
|
"input_tokens_details": {
|
|
"cached_tokens": 0
|
|
},
|
|
"output_tokens": 41,
|
|
"output_tokens_details": {
|
|
"reasoning_tokens": 0
|
|
},
|
|
"total_tokens": 79
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/catalog/products/{id}": {
|
|
"get": {
|
|
"operationId": "catalog.products.get",
|
|
"tags": [
|
|
"catalog"
|
|
],
|
|
"summary": "Get a product",
|
|
"x-summary-pt": "Ver um produto",
|
|
"description": "Needs `catalog:read`. The product with its billing cycles (only those with a price), the options the customer chooses and the price of each choice per cycle. With `currency`, prices come in that currency. `purchasable` says whether it can be bought through the API; if not, `not_purchasable_reason` says why and `portal_url` opens it in your account. Hidden products answer `404`. With a group discount (Reseller Program or another client group), prices come with the discount and the public ones in list_price (list_prices in the extensions); discount says the percentage.",
|
|
"x-description-pt": "Precisa de `catalog:read`. O produto com os ciclos (só os que têm preço), as opções que o cliente escolhe e o preço de cada escolha por ciclo. Com `currency`, os preços vêm nessa moeda. `purchasable` diz se se compra pela API; se não, `not_purchasable_reason` diz porquê e `portal_url` abre-o na sua conta. Um produto escondido responde `404`. Com desconto de grupo (Programa de Revenda ou outro grupo de clientes), os preços vêm com o desconto e os públicos em list_price (list_prices nas extensões); discount diz a percentagem.",
|
|
"x-permission": "catalog:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The product `id` from the catalog.",
|
|
"x-description-pt": "O `id` do produto no catálogo."
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Optional currency code, such as `USD`.",
|
|
"x-description-pt": "Código da moeda, opcional, como `USD`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Get a product.",
|
|
"x-description-pt": "Ver um produto.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/CatalogProductsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"id": 51,
|
|
"name": "VPS1",
|
|
"kind": "vps",
|
|
"description": "Cores 1vCPU, Memory (RAM) 2GB, Storage 40GB SSD NVMe",
|
|
"group": {
|
|
"id": 9,
|
|
"name": "VPS Server"
|
|
},
|
|
"currency": "MZN",
|
|
"billing_cycles": [
|
|
{
|
|
"billing_cycle": "monthly",
|
|
"months": 1,
|
|
"price": 720.0,
|
|
"setup_fee": 0.0
|
|
}
|
|
],
|
|
"config_options": [
|
|
{
|
|
"id": 51,
|
|
"name": "Operating System",
|
|
"default_choice_id": 236,
|
|
"choices": [
|
|
{
|
|
"id": 239,
|
|
"name": "Debian 12/11/10",
|
|
"prices": [
|
|
{
|
|
"billing_cycle": "monthly",
|
|
"price": 0.0,
|
|
"setup_fee": 0.0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"accepts_domain": false,
|
|
"purchasable": true,
|
|
"not_purchasable_reason": null,
|
|
"purchase_path": "/v1/services/purchase",
|
|
"portal_url": "https://my.example.co.mz/onestep/billingcycle?pid=51&language=portuguese-mz¤cy=5"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/purchase": {
|
|
"post": {
|
|
"operationId": "services.purchase",
|
|
"tags": [
|
|
"services"
|
|
],
|
|
"summary": "Buy a plan",
|
|
"x-summary-pt": "Comprar um plano",
|
|
"description": "Needs `billing:purchase`. Buys a plan of the catalog: hosting, reseller hosting, radio, VPS and servers. Also needs the write permission of the product area: `hosting:write` for hosting, reseller hosting and radio, `vps:write` for servers. Only for products with `purchasable`. Options not sent in `config_options` take the first choice, as in your account; Windows with a cPanel licence, or Plesk with WordPress, answer `422` with `incompatible_options`. Hosting takes `domain`, a domain of the account; without it, the account gets a temporary address that can be changed later. Payment opens the service as in your account: it is followed in GET /v1/services/{id}. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Compra um plano do catálogo: hospedagem, revenda, rádio, VPS e servidores. Precisa também da permissão de escrita da área do produto: `hosting:write` para hospedagem, revenda e rádio, `vps:write` para servidores. Só para produtos com `purchasable` a `true`. As opções que não vierem em `config_options` ficam com a primeira escolha, como na sua conta; Windows com licença cPanel, ou Plesk com WordPress, respondem `422` com `incompatible_options`. A hospedagem leva `domain`, um domínio da conta; sem ele, a conta recebe um endereço temporário, que se pode trocar depois. O pagamento abre o serviço como na sua conta: acompanha-se em GET /v1/services/{id}. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy a plan.",
|
|
"x-description-pt": "Comprar um plano.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"product_id": 38,
|
|
"name": "Pro Hosting",
|
|
"kind": "hosting",
|
|
"billing_cycle": "annually",
|
|
"domain": "mozbiz.co.mz",
|
|
"temporary_address": false,
|
|
"config_options": [
|
|
{
|
|
"option_id": 64,
|
|
"option": "Control Panel",
|
|
"choice_id": 385,
|
|
"choice": "cPanel (Linux)",
|
|
"price": 0.0,
|
|
"setup_fee": 0.0
|
|
}
|
|
],
|
|
"order_id": 1018,
|
|
"invoice_id": 3592,
|
|
"amount": 7349.76,
|
|
"subtotal": 6336.0,
|
|
"tax": 1013.76,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null,
|
|
"service_id": 1470,
|
|
"manage_url": "https://my.example.co.mz/clientarea.php?action=productdetails&id=1470&language=portuguese-mz¤cy=5"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"product_id",
|
|
"billing_cycle"
|
|
],
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "The `id` from the catalog.",
|
|
"x-description-pt": "O `id` do catálogo."
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string",
|
|
"enum": [
|
|
"monthly",
|
|
"quarterly",
|
|
"semi_annually",
|
|
"annually",
|
|
"biennially",
|
|
"triennially",
|
|
"one_time"
|
|
],
|
|
"description": "One of the `billing_cycles` of the product.",
|
|
"x-description-pt": "Um dos `billing_cycles` do produto."
|
|
},
|
|
"config_options": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Optional. `{\"option id\": choice id}`, from GET /v1/catalog/products/{id}.",
|
|
"x-description-pt": "Opcional. `{\"id da opção\": id da escolha}`, de GET /v1/catalog/products/{id}."
|
|
},
|
|
"domain": {
|
|
"type": "string",
|
|
"description": "Hosting only, optional: a domain of this account, without `https`. Another domain answers `409` with `domain_not_owned`.",
|
|
"x-description-pt": "Só hospedagem, opcional: um domínio desta conta, sem `https`. Outro domínio responde `409` com `domain_not_owned`."
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"product_id": 38,
|
|
"billing_cycle": "annually",
|
|
"domain": "mozbiz.co.mz",
|
|
"config_options": {
|
|
"64": 385
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/upgrades": {
|
|
"get": {
|
|
"operationId": "services.upgrades.list",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "List plan upgrades",
|
|
"x-summary-pt": "Ver as mudanças de plano",
|
|
"description": "Needs `billing:read`. The bigger plans this service can move to, the same as in your account, and for each one the cycles equal to or longer than the current one. `amount_today` is what is paid now, without tax: the whole new cycle minus the time left of the period already paid (`credit`). The new cycle starts with the payment and `next_due_date` is the new due date. When `can_upgrade` is `false`, `blocked_reason` says why: `service_not_active`, `no_cycles`, `upgrade_pending` (with `invoice_id`) or `upgrade_not_available`.",
|
|
"x-description-pt": "Precisa de `billing:read`. Os planos maiores para onde este serviço pode passar, os mesmos da sua conta, e em cada um os ciclos iguais ou maiores que o de hoje. `amount_today` é o que se paga agora, sem imposto: o ciclo novo inteiro menos o tempo que falta do período já pago (`credit`). O ciclo novo começa com o pagamento e `next_due_date` é o vencimento novo. Quando `can_upgrade` é `false`, `blocked_reason` diz porquê: `service_not_active`, `no_cycles`, `upgrade_pending` (com `invoice_id`) ou `upgrade_not_available`.",
|
|
"x-permission": "billing:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The service `id`.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List plan upgrades.",
|
|
"x-description-pt": "Ver as mudanças de plano.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesUpgradesListResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"service_id": 1476,
|
|
"product_id": 37,
|
|
"name": "Plus Hosting",
|
|
"current_cycle": "annually",
|
|
"currency": "MZN",
|
|
"can_upgrade": true,
|
|
"blocked_reason": null,
|
|
"invoice_id": null,
|
|
"plans": [
|
|
{
|
|
"product_id": 36,
|
|
"name": "Ultra Hosting",
|
|
"billing_cycles": [
|
|
{
|
|
"billing_cycle": "annually",
|
|
"amount_today": 10197.8,
|
|
"renewal_amount": 15724.8,
|
|
"credit": 5527.0,
|
|
"next_due_date": "2027-11-24"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/services/{id}/upgrade": {
|
|
"post": {
|
|
"operationId": "services.upgrade",
|
|
"tags": [
|
|
"billing"
|
|
],
|
|
"summary": "Change plan",
|
|
"x-summary-pt": "Mudar de plano",
|
|
"description": "Needs `billing:purchase`. Moves the service to a bigger plan from GET /v1/services/{id}/upgrades, now. Also needs the write permission of the service area (`hosting:write` or `vps:write`). `expected_amount` is the `amount_today` you checked: if it changed, it answers `409` with `price_changed` and nothing is charged. With payment, the plan and the due date change, and an unpaid renewal of the service is no longer needed. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`. Accepts `promo_code`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Passa o serviço para um plano maior de GET /v1/services/{id}/upgrades, já. Precisa também da permissão de escrita da área do serviço (`hosting:write` ou `vps:write`). `expected_amount` é o `amount_today` que consultou: se mudou, responde `409` com `price_changed` e nada é cobrado. Com o pagamento mudam o plano e o vencimento, e uma renovação do serviço por pagar deixa de ser precisa. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`. Aceita `promo_code`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The service `id`.",
|
|
"x-description-pt": "O `id` do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Change plan.",
|
|
"x-description-pt": "Mudar de plano.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServicesUpgradeResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"service_id": 1476,
|
|
"previous_product_id": 37,
|
|
"product_id": 36,
|
|
"name": "Ultra Hosting",
|
|
"billing_cycle": "annually",
|
|
"renewal_amount": 15724.8,
|
|
"next_due_date": "2027-11-24",
|
|
"order_id": 1025,
|
|
"invoice_id": 3599,
|
|
"amount": 11829.45,
|
|
"subtotal": 10197.8,
|
|
"tax": 1631.65,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"product_id",
|
|
"billing_cycle",
|
|
"expected_amount"
|
|
],
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer",
|
|
"description": "The new plan.",
|
|
"x-description-pt": "O plano novo."
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string",
|
|
"enum": [
|
|
"monthly",
|
|
"quarterly",
|
|
"semi_annually",
|
|
"annually",
|
|
"biennially",
|
|
"triennially"
|
|
]
|
|
},
|
|
"expected_amount": {
|
|
"type": "number",
|
|
"description": "The `amount_today` you checked.",
|
|
"x-description-pt": "O `amount_today` que consultou."
|
|
},
|
|
"promo_code": {
|
|
"type": "string",
|
|
"maxLength": 64,
|
|
"description": "Optional promo code. If it does not apply to this purchase, it answers `422` with `promo_not_applicable` and nothing is charged; if it does not exist, `promo_code_invalid`. In Sandbox the code is only checked to exist.",
|
|
"x-description-pt": "Código promocional, opcional. Se não valer para esta compra, responde `422` com `promo_not_applicable` e nada é cobrado; se não existir, `promo_code_invalid`. No Sandbox só se confirma que o código existe."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"product_id": 36,
|
|
"billing_cycle": "annually",
|
|
"expected_amount": 10197.8
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/credits/prices": {
|
|
"get": {
|
|
"operationId": "sms.credits.prices",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "SMS credit prices",
|
|
"x-summary-pt": "Preços dos créditos de SMS",
|
|
"description": "Needs `sms:read`. The price of each credit by quantity, in the currency of the account: the whole quantity takes the price of its tier. Tax is added on the invoice (`tax_added`).",
|
|
"x-description-pt": "Precisa de `sms:read`. O preço de cada crédito por quantidade, na moeda da conta: a quantidade toda leva o preço do seu escalão. O imposto junta-se na factura (`tax_added`).",
|
|
"x-permission": "sms:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "SMS credit prices.",
|
|
"x-description-pt": "Preços dos créditos de SMS.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsCreditsPricesResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"currency": "MZN",
|
|
"minimum": 1000,
|
|
"maximum": 100000000,
|
|
"tax_added": true,
|
|
"tiers": [
|
|
{
|
|
"from": 1000,
|
|
"unit_price": 1.0
|
|
},
|
|
{
|
|
"from": 1001,
|
|
"unit_price": 0.9
|
|
},
|
|
{
|
|
"from": 5001,
|
|
"unit_price": 0.85
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/sms/credits/purchase": {
|
|
"post": {
|
|
"operationId": "sms.credits.purchase",
|
|
"tags": [
|
|
"sms"
|
|
],
|
|
"summary": "Buy SMS credits",
|
|
"x-summary-pt": "Comprar créditos de SMS",
|
|
"description": "Needs `billing:purchase`. Also needs `sms:write`. Buys `quantity` credits at the price of GET /v1/sms/credits/prices. The credits enter the SMS balance with the payment and an account without SMS turned on is turned on, as in your account. Credits do not take `promo_code`. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `sms:write`. Compra `quantity` créditos ao preço de GET /v1/sms/credits/prices. Os créditos entram no saldo de SMS com o pagamento e uma conta sem o SMS activo fica activa, como na sua conta. Os créditos não levam `promo_code`. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy SMS credits.",
|
|
"x-description-pt": "Comprar créditos de SMS.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/SmsCreditsPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"credits": 1000,
|
|
"unit_price": 1.0,
|
|
"order_id": null,
|
|
"invoice_id": 3601,
|
|
"amount": 1160.0,
|
|
"subtotal": 1000.0,
|
|
"tax": 160.0,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"quantity": {
|
|
"type": "integer",
|
|
"minimum": 1000,
|
|
"description": "Number of credits.",
|
|
"x-description-pt": "Número de créditos."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"quantity": 1000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/credits/prices": {
|
|
"get": {
|
|
"operationId": "email.credits.prices",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Email credit prices",
|
|
"x-summary-pt": "Preços dos créditos de e-mail",
|
|
"description": "Needs `email_center:read`. The price per thousand emails for each sending type, in tiers that add up (as on the pricing pages), and how many credits each email uses. Tax is added on the invoice (`tax_added`).",
|
|
"x-description-pt": "Precisa de `email_center:read`. O preço por mil e-mails de cada tipo de envio, em faixas que se somam (como nas páginas de preços), e quantos créditos gasta cada e-mail. O imposto junta-se na factura (`tax_added`).",
|
|
"x-permission": "email_center:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Email credit prices.",
|
|
"x-description-pt": "Preços dos créditos de e-mail.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCreditsPricesResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"currency": "MZN",
|
|
"minimum": 1000,
|
|
"maximum": 5000000,
|
|
"tax_added": true,
|
|
"usages": [
|
|
{
|
|
"usage": "transactional",
|
|
"credits_per_email": 1.0,
|
|
"tiers": [
|
|
{
|
|
"from": 1,
|
|
"to": 1000,
|
|
"price_per_thousand": 210.0
|
|
},
|
|
{
|
|
"from": 1001,
|
|
"to": 10000,
|
|
"price_per_thousand": 33.0
|
|
},
|
|
{
|
|
"from": 10001,
|
|
"to": null,
|
|
"price_per_thousand": 21.0
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/email/credits/purchase": {
|
|
"post": {
|
|
"operationId": "email.credits.purchase",
|
|
"tags": [
|
|
"email-center"
|
|
],
|
|
"summary": "Buy email credits",
|
|
"x-summary-pt": "Comprar créditos de e-mail",
|
|
"description": "Needs `billing:purchase`. Also needs `email_center:write`. Buys `quantity` emails of the sending type in `usage` (`transactional`, `marketing` or `smtp-relay`); the balance receives `credits`, the emails times the credits of that type, rounded up. Credits do not take `promo_code`. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `email_center:write`. Compra `quantity` e-mails do tipo de envio em `usage` (`transactional`, `marketing` ou `smtp-relay`); o saldo recebe `credits`, os e-mails vezes os créditos desse tipo, arredondado para cima. Os créditos não levam `promo_code`. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy email credits.",
|
|
"x-description-pt": "Comprar créditos de e-mail.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/EmailCreditsPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"usage": "transactional",
|
|
"emails": 2000,
|
|
"credits": 2000,
|
|
"order_id": null,
|
|
"invoice_id": 3602,
|
|
"amount": 281.88,
|
|
"subtotal": 243.0,
|
|
"tax": 38.88,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"usage": {
|
|
"type": "string",
|
|
"enum": [
|
|
"transactional",
|
|
"marketing",
|
|
"smtp-relay"
|
|
],
|
|
"default": "transactional"
|
|
},
|
|
"quantity": {
|
|
"type": "integer",
|
|
"minimum": 1000,
|
|
"description": "Number of emails.",
|
|
"x-description-pt": "Número de e-mails."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"usage": "transactional",
|
|
"quantity": 2000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/ai/credits/prices": {
|
|
"get": {
|
|
"operationId": "ai.credits.prices",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "AI credit prices",
|
|
"x-summary-pt": "Preços dos créditos de IA",
|
|
"description": "Needs `ai:read`. The price of each AI credit by quantity, in the currency of the account. Tax is added on the invoice (`tax_added`).",
|
|
"x-description-pt": "Precisa de `ai:read`. O preço de cada crédito de IA por quantidade, na moeda da conta. O imposto junta-se na factura (`tax_added`).",
|
|
"x-permission": "ai:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "AI credit prices.",
|
|
"x-description-pt": "Preços dos créditos de IA.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiCreditsPricesResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"currency": "MZN",
|
|
"minimum": 1000,
|
|
"maximum": 10000000,
|
|
"tax_added": true,
|
|
"tiers": [
|
|
{
|
|
"from": 1000,
|
|
"unit_price": 0.6
|
|
},
|
|
{
|
|
"from": 10001,
|
|
"unit_price": 0.54
|
|
},
|
|
{
|
|
"from": 100001,
|
|
"unit_price": 0.45
|
|
}
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/ai/credits/purchase": {
|
|
"post": {
|
|
"operationId": "ai.credits.purchase",
|
|
"tags": [
|
|
"ai"
|
|
],
|
|
"summary": "Buy AI credits",
|
|
"x-summary-pt": "Comprar créditos de IA",
|
|
"description": "Needs `billing:purchase`. Also needs `ai:write`. Buys `quantity` AI credits at the price of GET /v1/ai/credits/prices; they enter the balance with the payment. Credits do not take `promo_code`. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `ai:write`. Compra `quantity` créditos de IA ao preço de GET /v1/ai/credits/prices; entram no saldo com o pagamento. Os créditos não levam `promo_code`. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy AI credits.",
|
|
"x-description-pt": "Comprar créditos de IA.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/AiCreditsPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"credits": 1000,
|
|
"unit_price": 0.6,
|
|
"order_id": null,
|
|
"invoice_id": 3603,
|
|
"amount": 696.0,
|
|
"subtotal": 600.0,
|
|
"tax": 96.0,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"quantity"
|
|
],
|
|
"properties": {
|
|
"quantity": {
|
|
"type": "integer",
|
|
"minimum": 1000,
|
|
"description": "Number of credits.",
|
|
"x-description-pt": "Número de créditos."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"quantity": 1000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/servers/{id}/extras": {
|
|
"get": {
|
|
"operationId": "servers.extras.get",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Server extras",
|
|
"x-summary-pt": "Extras do servidor",
|
|
"description": "Needs `vps:read`. What an additional IP and extra disk cost on this server: `monthly_amount` is added to each renewal and `amount_today` is paid now, from today to the next renewal. Without tax (`tax_added`). When one is not available, `reason` says why: `extra_not_available`, `ip_limit_reached` or `disk_limit_reached`.",
|
|
"x-description-pt": "Precisa de `vps:read`. Quanto custam um IP adicional e disco extra neste servidor: `monthly_amount` junta-se a cada renovação e `amount_today` paga-se agora, de hoje à próxima renovação. Sem imposto (`tax_added`). Quando um não está disponível, `reason` diz porquê: `extra_not_available`, `ip_limit_reached` ou `disk_limit_reached`.",
|
|
"x-permission": "vps:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The server `id` (the service).",
|
|
"x-description-pt": "O `id` do servidor (o serviço)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Server extras.",
|
|
"x-description-pt": "Extras do servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersExtrasGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"server_id": 694,
|
|
"currency": "MZN",
|
|
"tax_added": true,
|
|
"ip": {
|
|
"available": true,
|
|
"reason": null,
|
|
"monthly_amount": 180.0,
|
|
"amount_today": 120.0
|
|
},
|
|
"disk": {
|
|
"available": true,
|
|
"reason": null,
|
|
"current_extra_gb": 0,
|
|
"max_extra_gb": 100,
|
|
"price_per_gb_monthly": 15.0,
|
|
"sizes": [
|
|
{
|
|
"size_gb": 10,
|
|
"monthly_amount": 150.0,
|
|
"amount_today": 100.0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"operationId": "servers.extras.purchase",
|
|
"tags": [
|
|
"servers"
|
|
],
|
|
"summary": "Buy a server extra",
|
|
"x-summary-pt": "Comprar um extra do servidor",
|
|
"description": "Needs `billing:purchase`. Also needs `vps:write`. `type` is `ip` or `disk`; a disk takes `size_gb` (10, 20, 50 or 100, up to 100 GB extra). `expected_amount` is optional: if sent and the price changed, it answers `409` with `price_changed`. With payment the extra is delivered and its monthly amount joins the renewal; it is followed in GET /v1/extras/{id} with `extra_id`. An unpaid invoice of the same extra answers `409` with `invoice_open`. Extras do not take `promo_code`. Paid with credit only, within the spending limit of the key; the `Idempotency-Key` header is required and purchases are limited to 5 per minute. The price is the same as in your account: if the invoice does not match it, the purchase is undone and nothing is charged. `amount` is the invoice total with tax, `subtotal` is without tax and `tax` is the tax; in Sandbox nothing is created, `amount` comes without tax and `tax` is `null`. With the account profile incomplete it answers `409` with `profile_incomplete`.",
|
|
"x-description-pt": "Precisa de `billing:purchase`. Precisa também de `vps:write`. `type` é `ip` ou `disk`; o disco leva `size_gb` (10, 20, 50 ou 100, até 100 GB extra). `expected_amount` é opcional: se vier e o preço tiver mudado, responde `409` com `price_changed`. Com o pagamento o extra é entregue e o valor mensal junta-se à renovação; acompanha-se em GET /v1/extras/{id} com `extra_id`. Uma factura do mesmo extra por pagar responde `409` com `invoice_open`. Os extras não levam `promo_code`. Paga-se só com saldo, dentro do limite de gastos da chave; o cabeçalho `Idempotency-Key` é obrigatório e as compras têm um limite de 5 por minuto. O preço é o mesmo da sua conta: se a factura não bater com ele, a compra desfaz-se e nada é cobrado. `amount` é o total da factura com imposto, `subtotal` é sem imposto e `tax` é o imposto; no Sandbox nada se cria, `amount` vem sem imposto e `tax` vem `null`. Com o perfil da conta por completar responde `409` com `profile_incomplete`.",
|
|
"x-permission": "billing:purchase",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The server `id` (the service).",
|
|
"x-description-pt": "O `id` do servidor (o serviço)."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"202": {
|
|
"description": "Buy a server extra.",
|
|
"x-description-pt": "Comprar um extra do servidor.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ServersExtrasPurchaseResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
|
|
"status": "paid",
|
|
"simulated": false,
|
|
"server_id": 694,
|
|
"type": "disk",
|
|
"size_gb": 10,
|
|
"monthly_amount": 150.0,
|
|
"order_id": null,
|
|
"invoice_id": 3604,
|
|
"amount": 116.0,
|
|
"subtotal": 100.0,
|
|
"tax": 16.0,
|
|
"currency": "MZN",
|
|
"promo_code": null,
|
|
"discount": null,
|
|
"extra_id": "v37"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"400": {
|
|
"$ref": "#/components/responses/InvalidRequest"
|
|
},
|
|
"402": {
|
|
"$ref": "#/components/responses/InsufficientCredit"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"502": {
|
|
"$ref": "#/components/responses/UpstreamError"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"ip",
|
|
"disk"
|
|
]
|
|
},
|
|
"size_gb": {
|
|
"type": "integer",
|
|
"enum": [
|
|
10,
|
|
20,
|
|
50,
|
|
100
|
|
],
|
|
"description": "Disk only.",
|
|
"x-description-pt": "Só disco."
|
|
},
|
|
"expected_amount": {
|
|
"type": "number",
|
|
"description": "Optional: the `amount_today` you checked.",
|
|
"x-description-pt": "Opcional: o `amount_today` que consultou."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"type": "disk",
|
|
"size_gb": 10,
|
|
"expected_amount": 100.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/program": {
|
|
"get": {
|
|
"operationId": "reseller.program.get",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See your Agency",
|
|
"x-summary-pt": "Ver o seu Agency",
|
|
"description": "Needs `reseller:read`. Your Agency and discount, what counts for the next Agency (paid in the last 12 months plus credit, or active domains and services: one of the two is enough), the review warning, the credit with the low credit warning and the automatic top-up, and the credit line when the team gave you one. Amounts in the currency of the account. Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:read`. O seu Agency e o desconto, o que conta para o Agency seguinte (o pago nos últimos 12 meses mais o saldo, ou os domínios e serviços activos: basta um dos dois), o aviso da revisão, o saldo com o aviso de saldo baixo e o carregamento automático, e o débito com tecto quando a equipa o deu. Valores na moeda da conta. Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See your Agency.",
|
|
"x-description-pt": "Ver o seu Agency.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerProgramGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"agence": {
|
|
"name": "Agency Plus",
|
|
"discount_percent": 15.0,
|
|
"custom_discount": false,
|
|
"fixed": false
|
|
},
|
|
"status": "active",
|
|
"member_since": "2026-11-25T06:00:50+02:00",
|
|
"currency": "MZN",
|
|
"conditions": {
|
|
"rule": "either",
|
|
"paid_12m_plus_credit": 150000.0,
|
|
"active_items": 112,
|
|
"current": {
|
|
"name": "Agency Plus",
|
|
"discount_percent": 15.0,
|
|
"paid_12m_plus_credit": 120000.0,
|
|
"active_items": 100
|
|
},
|
|
"next": {
|
|
"name": "Agency Ultra",
|
|
"discount_percent": 25.0,
|
|
"paid_12m_plus_credit": 1200000.0,
|
|
"active_items": 1000,
|
|
"missing": {
|
|
"paid_12m_plus_credit": 1050000.0,
|
|
"active_items": 888
|
|
}
|
|
}
|
|
},
|
|
"review": {
|
|
"warning_until": null
|
|
},
|
|
"credit": {
|
|
"balance": 3500.0,
|
|
"low_warning_at": 1200.0,
|
|
"low": false,
|
|
"auto_top_up": {
|
|
"enabled": true,
|
|
"below": 1200.0,
|
|
"amount": 5000.0
|
|
},
|
|
"top_up_minimum": 2400.0
|
|
},
|
|
"credit_line": {
|
|
"limit": 20000.0,
|
|
"owed": 0.0,
|
|
"available": 20000.0,
|
|
"repayment_days": 7
|
|
}
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/pricing": {
|
|
"get": {
|
|
"operationId": "reseller.pricing.list",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See your prices",
|
|
"x-summary-pt": "Ver os seus preços",
|
|
"description": "Needs `reseller:read`. Your prices, the same as the catalog: `type=domains` (default) gives the extensions, as in GET /v1/catalog/tlds, and `type=products` the products, as in GET /v1/catalog/products. `price` is yours and `list_price` the public one. Accepts `currency`, `extension` and `group_id`. Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:read`. Os seus preços, os mesmos do catálogo: `type=domains` (por omissão) dá as extensões, como em GET /v1/catalog/tlds, e `type=products` os produtos, como em GET /v1/catalog/products. `price` é o seu e `list_price` o público. Aceita `currency`, `extension` e `group_id`. Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"domains",
|
|
"products"
|
|
]
|
|
},
|
|
"description": "`domains` (default) or `products`.",
|
|
"x-description-pt": "`domains` (por omissão) ou `products`."
|
|
},
|
|
{
|
|
"name": "currency",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Optional currency code, such as `USD`.",
|
|
"x-description-pt": "Código da moeda, opcional, como `USD`."
|
|
},
|
|
{
|
|
"name": "extension",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Domains only: one extension, such as `co.mz`.",
|
|
"x-description-pt": "Só domínios: uma extensão, como `co.mz`."
|
|
},
|
|
{
|
|
"name": "group_id",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Products only: one product group.",
|
|
"x-description-pt": "Só produtos: um grupo de produtos."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See your prices.",
|
|
"x-description-pt": "Ver os seus preços.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerPricingListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"extension": ".co.mz",
|
|
"currency": "MZN",
|
|
"register": {
|
|
"1": 2200.0
|
|
},
|
|
"renew": {
|
|
"1": 2200.0
|
|
},
|
|
"transfer": {
|
|
"1": 2200.0
|
|
},
|
|
"list_prices": {
|
|
"register": {
|
|
"1": 2500.8
|
|
},
|
|
"renew": {
|
|
"1": 2500.8
|
|
},
|
|
"transfer": {
|
|
"1": 2500.8
|
|
}
|
|
},
|
|
"discount": {
|
|
"percent": 15.0,
|
|
"type": "reseller_program",
|
|
"level": "Agency Plus",
|
|
"minimum_price_applies_to": [
|
|
"domains",
|
|
"third_party_products"
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1,
|
|
"type": "domains",
|
|
"agence": "Agency Plus"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/customers": {
|
|
"get": {
|
|
"operationId": "reseller.customers.list",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "List end customers",
|
|
"x-summary-pt": "Listar os clientes finais",
|
|
"description": "Needs `reseller:read`. The domains and services of this account that have an end customer label, newest first. Filter with `type` (`domain` or `service`) and `search` (label or domain). Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:read`. Os domínios e serviços desta conta com etiqueta de cliente final, os mais recentes primeiro. Filtre com `type` (`domain` ou `service`) e `search` (etiqueta ou domínio). Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"domain",
|
|
"service"
|
|
]
|
|
},
|
|
"description": "`domain` or `service`.",
|
|
"x-description-pt": "`domain` ou `service`."
|
|
},
|
|
{
|
|
"name": "search",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "Text in the label or in the domain, up to 80 characters.",
|
|
"x-description-pt": "Texto na etiqueta ou no domínio, até 80 caracteres."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List end customers.",
|
|
"x-description-pt": "Listar os clientes finais.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerCustomersListResponse"
|
|
},
|
|
"example": {
|
|
"data": [
|
|
{
|
|
"type": "domain",
|
|
"id": 913,
|
|
"name": "hotelpolana.co.mz",
|
|
"domain": "hotelpolana.co.mz",
|
|
"status": "active",
|
|
"customer_name": "João Fernandes",
|
|
"updated_at": "2026-11-25T12:36:09+02:00"
|
|
}
|
|
],
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/customers/{type}/{id}": {
|
|
"put": {
|
|
"operationId": "reseller.customers.set",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "Label an end customer",
|
|
"x-summary-pt": "Etiquetar um cliente final",
|
|
"description": "Needs `reseller:write`. Writes the end customer of a domain or service of this account, up to 80 characters; an empty `name` removes the label. The same label as in your account. Another account's item answers `404`; in Sandbox nothing is saved. Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:write`. Grava o cliente final de um domínio ou serviço desta conta, até 80 caracteres; um `name` vazio apaga a etiqueta. É a mesma etiqueta da sua conta. Um item de outra conta responde `404`; no Sandbox nada se grava. Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "type",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "`domain` or `service`.",
|
|
"x-description-pt": "`domain` ou `service`."
|
|
},
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The `id` of the domain or service.",
|
|
"x-description-pt": "O `id` do domínio ou do serviço."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Label an end customer.",
|
|
"x-description-pt": "Etiquetar um cliente final.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerCustomersSetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"type": "domain",
|
|
"id": 913,
|
|
"name": "hotelpolana.co.mz",
|
|
"domain": "hotelpolana.co.mz",
|
|
"status": "active",
|
|
"customer_name": "João Fernandes",
|
|
"updated_at": "2026-11-25T12:36:09+02:00",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"name"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"maxLength": 80,
|
|
"description": "The end customer. Empty removes the label.",
|
|
"x-description-pt": "O cliente final. Vazio apaga a etiqueta."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"name": "João Fernandes"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/top-up": {
|
|
"post": {
|
|
"operationId": "reseller.top_up.create",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "Create a top-up invoice",
|
|
"x-summary-pt": "Criar factura de carregamento",
|
|
"description": "Needs `reseller:write`. Creates an invoice that adds `amount` to the credit when paid, without tax; nothing is charged. Pay it at `pay_url` with the methods of the account. The minimum is `top_up_minimum` of GET /v1/reseller/program; with an unpaid top-up invoice it answers `409` with `top_up_pending` and that invoice. In Sandbox nothing is created. Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:write`. Cria uma factura que, paga, junta `amount` ao saldo, sem imposto; nada é cobrado. Paga-se em `pay_url` com os métodos da conta. O mínimo é o `top_up_minimum` de GET /v1/reseller/program; com uma factura de carregamento por pagar responde `409` com `top_up_pending` e essa factura. No Sandbox nada se cria. Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/IdempotencyKey"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "Create a top-up invoice.",
|
|
"x-description-pt": "Criar factura de carregamento.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerTopUpCreateResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"invoice_id": 3632,
|
|
"status": "unpaid",
|
|
"amount": 5000.0,
|
|
"currency": "MZN",
|
|
"due_date": "2026-11-25",
|
|
"pay_url": "https://my.example.co.mz/viewinvoice.php?id=3632&language=portuguese-mz¤cy=5",
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"409": {
|
|
"$ref": "#/components/responses/Conflict"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"amount"
|
|
],
|
|
"properties": {
|
|
"amount": {
|
|
"type": "number",
|
|
"description": "The amount in the currency of the account, from `top_up_minimum`.",
|
|
"x-description-pt": "O valor na moeda da conta, a partir de `top_up_minimum`."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"amount": 5000
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/reseller/statements": {
|
|
"get": {
|
|
"operationId": "reseller.statements.get",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See the credit statement",
|
|
"x-summary-pt": "Ver os movimentos do saldo",
|
|
"description": "Needs `reseller:read`. The credit movements of one month (`month=YYYY-MM`, current month by default), oldest first and in pages, with the opening and closing balance and the totals in and out of the month. Only for active members of the Reseller Program; other accounts get `403` with `reseller_program_required`.",
|
|
"x-description-pt": "Precisa de `reseller:read`. Os movimentos do saldo de um mês (`month=AAAA-MM`, por omissão o actual), dos mais antigos para os mais recentes e em páginas, com o saldo inicial e final e os totais que entraram e saíram no mês. Só para membros activos do Programa de Revenda; as outras contas recebem `403` com `reseller_program_required`.",
|
|
"x-permission": "reseller:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "month",
|
|
"in": "query",
|
|
"required": false,
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"description": "The month, as `YYYY-MM`.",
|
|
"x-description-pt": "O mês, como `AAAA-MM`."
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/Page"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/PerPage"
|
|
},
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the credit statement.",
|
|
"x-description-pt": "Ver os movimentos do saldo.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/ResellerStatementsGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"month": "2026-11",
|
|
"currency": "MZN",
|
|
"opening_balance": 1200.0,
|
|
"closing_balance": 3500.0,
|
|
"total_in": 5000.0,
|
|
"total_out": 2700.0,
|
|
"movements": [
|
|
{
|
|
"id": 325,
|
|
"date": "2026-11-24",
|
|
"description": "Credit top-up, invoice #3632",
|
|
"amount": 5000.0,
|
|
"type": "credit"
|
|
}
|
|
]
|
|
},
|
|
"meta": {
|
|
"page": 1,
|
|
"per_page": 10,
|
|
"total": 1,
|
|
"total_pages": 1
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/ResellerProgramRequired"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks": {
|
|
"get": {
|
|
"operationId": "webhooks.get",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "See the account webhook",
|
|
"x-summary-pt": "Ver o webhook da conta",
|
|
"description": "Needs `webhooks:read`. The address and the events of the account webhook, never the secret. It is the same address as the SMS webhook. `available_events` lists the events you can choose.",
|
|
"x-description-pt": "Precisa de `webhooks:read`. O endereço e os eventos do webhook da conta, nunca o segredo. É o mesmo endereço do webhook do SMS. `available_events` lista os eventos que pode escolher.",
|
|
"x-permission": "webhooks:read",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "See the account webhook.",
|
|
"x-description-pt": "Ver o webhook da conta.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhooksGetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.co.mz/webhooks",
|
|
"events": [
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
],
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"updated_at": "2026-11-25T12:50:39+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null,
|
|
"available_events": [
|
|
"sms.sent",
|
|
"sms.failed",
|
|
"reseller.credit_low",
|
|
"reseller.level_changed",
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
]
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"operationId": "webhooks.set",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "Save the account webhook",
|
|
"x-summary-pt": "Gravar o webhook da conta",
|
|
"description": "Needs `webhooks:write`. Saves the HTTPS address (port 443) and the full list of events. The `secret` is shown only when the webhook is created or with `rotate_secret: true`: keep it. The SMS webhook keeps the events chosen here. Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "Precisa de `webhooks:write`. Grava o endereço HTTPS (porta 443) e a lista completa de eventos. O `secret` só se mostra quando o webhook nasce ou com `rotate_secret: true`: guarde-o. O webhook do SMS mantém os eventos escolhidos aqui. Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"x-permission": "webhooks:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Save the account webhook.",
|
|
"x-description-pt": "Gravar o webhook da conta.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhooksSetResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"url": "https://example.co.mz/webhooks",
|
|
"events": [
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
],
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"updated_at": "2026-11-25T12:50:39+02:00",
|
|
"last_delivery_at": null,
|
|
"last_status_code": null,
|
|
"last_error": null,
|
|
"available_events": [
|
|
"sms.sent",
|
|
"sms.failed",
|
|
"reseller.credit_low",
|
|
"reseller.level_changed",
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
],
|
|
"simulated": false,
|
|
"secret": "whsec_8c1f0e2d4b6a7c9e1f3a5b7d9e0c2a4b6d8f0a1c3e5b7d9f"
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"422": {
|
|
"$ref": "#/components/responses/ValidationFailed"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
},
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"url",
|
|
"events"
|
|
],
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "HTTPS address, port 443.",
|
|
"x-description-pt": "Endereço HTTPS, porta 443."
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms.sent",
|
|
"sms.failed",
|
|
"reseller.credit_low",
|
|
"reseller.level_changed",
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
]
|
|
},
|
|
"description": "One or more events.",
|
|
"x-description-pt": "Um ou mais eventos."
|
|
},
|
|
"rotate_secret": {
|
|
"type": "boolean",
|
|
"description": "Create a new secret.",
|
|
"x-description-pt": "Criar um segredo novo."
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"url": "https://example.co.mz/webhooks",
|
|
"events": [
|
|
"domain.registered",
|
|
"domain.registration_failed",
|
|
"service.created"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"operationId": "webhooks.delete",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "Delete the account webhook",
|
|
"x-summary-pt": "Apagar o webhook da conta",
|
|
"description": "Needs `webhooks:write`. Deletes the address and all its events, the SMS ones included, and cancels the events not yet delivered.",
|
|
"x-description-pt": "Precisa de `webhooks:write`. Apaga o endereço e todos os eventos, também os do SMS, e cancela os avisos ainda por entregar.",
|
|
"x-permission": "webhooks:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Delete the account webhook.",
|
|
"x-description-pt": "Apagar o webhook da conta.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhooksDeleteResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"deleted": true,
|
|
"simulated": false
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/v1/webhooks/test": {
|
|
"post": {
|
|
"operationId": "webhooks.test",
|
|
"tags": [
|
|
"reseller"
|
|
],
|
|
"summary": "Test the account webhook",
|
|
"x-summary-pt": "Testar o webhook da conta",
|
|
"description": "Needs `webhooks:write`. Sends a signed `webhook.test` event to the saved address now and returns what your server answered.",
|
|
"x-description-pt": "Precisa de `webhooks:write`. Envia já um evento `webhook.test` assinado para o endereço gravado e devolve o que o seu servidor respondeu.",
|
|
"x-permission": "webhooks:write",
|
|
"security": [
|
|
{
|
|
"bearerAuth": []
|
|
}
|
|
],
|
|
"parameters": [
|
|
{
|
|
"$ref": "#/components/parameters/XApiMode"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Test the account webhook.",
|
|
"x-description-pt": "Testar o webhook da conta.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/WebhooksTestResponse"
|
|
},
|
|
"example": {
|
|
"data": {
|
|
"delivered": true,
|
|
"status_code": 200,
|
|
"error": null
|
|
},
|
|
"meta": {}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"$ref": "#/components/headers/X-Correlation-ID"
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"$ref": "#/components/headers/X-RateLimit-Limit"
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"$ref": "#/components/headers/X-RateLimit-Remaining"
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"$ref": "#/components/headers/X-RateLimit-Reset"
|
|
},
|
|
"X-API-Mode": {
|
|
"$ref": "#/components/headers/X-API-Mode"
|
|
}
|
|
}
|
|
},
|
|
"401": {
|
|
"$ref": "#/components/responses/Unauthorized"
|
|
},
|
|
"403": {
|
|
"$ref": "#/components/responses/Forbidden"
|
|
},
|
|
"404": {
|
|
"$ref": "#/components/responses/NotFound"
|
|
},
|
|
"429": {
|
|
"$ref": "#/components/responses/RateLimited"
|
|
},
|
|
"500": {
|
|
"$ref": "#/components/responses/InternalError"
|
|
},
|
|
"503": {
|
|
"$ref": "#/components/responses/Disabled"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"components": {
|
|
"securitySchemes": {
|
|
"bearerAuth": {
|
|
"type": "http",
|
|
"scheme": "bearer",
|
|
"bearerFormat": "prod_ or sandbox_ followed by 43 characters",
|
|
"description": "Create the key in the client area, on the API page. It is shown only once. It is never accepted in the query string.",
|
|
"x-description-pt": "Crie a chave na área de cliente, na página API. É mostrada uma só vez. Nunca é aceite no endereço."
|
|
}
|
|
},
|
|
"headers": {
|
|
"X-Correlation-ID": {
|
|
"description": "Identifier of this request. Give it to support when you report a problem.",
|
|
"schema": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
}
|
|
},
|
|
"X-RateLimit-Limit": {
|
|
"description": "Requests allowed per minute.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"X-RateLimit-Remaining": {
|
|
"description": "Requests left in the current minute.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"X-RateLimit-Reset": {
|
|
"description": "When the minute ends, as a Unix timestamp in seconds.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Retry-After": {
|
|
"description": "Seconds to wait before trying again.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"Idempotent-Replayed": {
|
|
"description": "Present and `true` when this is the saved answer of an earlier request with the same Idempotency-Key.",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"X-API-Mode": {
|
|
"description": "The mode of the key that made the request: `sandbox` or `production`.",
|
|
"x-description-pt": "O modo da chave que fez o pedido: `sandbox` ou `production`.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
]
|
|
}
|
|
},
|
|
"X-API-Simulated": {
|
|
"description": "Present and `true` when this write was simulated: nothing changed and nothing was charged.",
|
|
"x-description-pt": "Presente e `true` quando esta escrita foi simulada: nada mudou e nada foi cobrado.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"true"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"parameters": {
|
|
"IdempotencyKey": {
|
|
"name": "Idempotency-Key",
|
|
"in": "header",
|
|
"required": false,
|
|
"description": "Any unique value, up to 255 visible characters. Valid for 24 hours per key. Repeating the same request returns the saved answer; a different body, or a first request still in progress, returns 409.",
|
|
"x-description-pt": "Um valor único qualquer, até 255 caracteres visíveis. Vale 24 horas por chave. Repetir o mesmo pedido devolve a resposta guardada; outro corpo, ou um primeiro pedido ainda em curso, devolve 409.",
|
|
"schema": {
|
|
"type": "string",
|
|
"maxLength": 255
|
|
}
|
|
},
|
|
"AcceptLanguage": {
|
|
"name": "Accept-Language",
|
|
"in": "header",
|
|
"required": false,
|
|
"description": "Language of the error messages: pt or en. The default is en.",
|
|
"x-description-pt": "Língua das mensagens de erro: pt ou en. Por omissão, en.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pt",
|
|
"en"
|
|
]
|
|
}
|
|
},
|
|
"XApiMode": {
|
|
"name": "X-API-Mode",
|
|
"in": "header",
|
|
"required": false,
|
|
"description": "Optional. If it does not match the mode of the key, the request is refused with `invalid_request` and reason `mode_mismatch`. Use it to make sure a program never runs with the wrong key.",
|
|
"x-description-pt": "Opcional. Se não coincidir com o modo da chave, o pedido é recusado com `invalid_request` e a razão `mode_mismatch`. Serve para garantir que um programa nunca corre com a chave errada.",
|
|
"schema": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
]
|
|
}
|
|
},
|
|
"Page": {
|
|
"name": "page",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "The page number. The first is 1.",
|
|
"x-description-pt": "O número da página. A primeira é a 1.",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"default": 1
|
|
}
|
|
},
|
|
"PerPage": {
|
|
"name": "per_page",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Results per page, from 1 to 100. The default is 10.",
|
|
"x-description-pt": "Resultados por página, de 1 a 100. Por omissão, 10.",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 100,
|
|
"default": 10
|
|
}
|
|
},
|
|
"Currency": {
|
|
"name": "currency",
|
|
"in": "query",
|
|
"required": false,
|
|
"description": "Currency code. The default is the currency of the account.",
|
|
"x-description-pt": "Código da moeda. Por omissão, a moeda da conta.",
|
|
"schema": {
|
|
"type": "string"
|
|
},
|
|
"example": "MZN"
|
|
}
|
|
},
|
|
"schemas": {
|
|
"Meta": {
|
|
"type": "object",
|
|
"description": "Extra data. In lists: page, per_page, total and total_pages.",
|
|
"additionalProperties": true
|
|
},
|
|
"ListMeta": {
|
|
"type": "object",
|
|
"required": [
|
|
"page",
|
|
"per_page",
|
|
"total",
|
|
"total_pages"
|
|
],
|
|
"properties": {
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"per_page": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"total_pages": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"Error": {
|
|
"type": "object",
|
|
"required": [
|
|
"error"
|
|
],
|
|
"properties": {
|
|
"error": {
|
|
"type": "object",
|
|
"required": [
|
|
"code",
|
|
"message",
|
|
"correlation_id",
|
|
"details"
|
|
],
|
|
"properties": {
|
|
"code": {
|
|
"$ref": "#/components/schemas/ErrorCode"
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Text for people, in the language asked for. Do not parse it; use code."
|
|
},
|
|
"correlation_id": {
|
|
"type": "string",
|
|
"description": "Give it to support when you report a problem."
|
|
},
|
|
"details": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ErrorCode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"invalid_request",
|
|
"unauthorized",
|
|
"forbidden",
|
|
"insufficient_scope",
|
|
"ip_not_allowed",
|
|
"not_found",
|
|
"method_not_allowed",
|
|
"idempotency_conflict",
|
|
"validation_failed",
|
|
"rate_limited",
|
|
"internal_error",
|
|
"disabled",
|
|
"sms_not_active",
|
|
"conflict",
|
|
"insufficient_credit",
|
|
"spending_limit_exceeded",
|
|
"upstream_error",
|
|
"account_email_domain",
|
|
"insufficient_credits",
|
|
"model_not_found",
|
|
"agent_paused",
|
|
"plan_limit_reached"
|
|
],
|
|
"x-http-status": {
|
|
"invalid_request": 400,
|
|
"unauthorized": 401,
|
|
"forbidden": 403,
|
|
"insufficient_scope": 403,
|
|
"ip_not_allowed": 403,
|
|
"not_found": 404,
|
|
"method_not_allowed": 405,
|
|
"idempotency_conflict": 409,
|
|
"validation_failed": 422,
|
|
"rate_limited": 429,
|
|
"internal_error": 500,
|
|
"disabled": 503,
|
|
"conflict": 409,
|
|
"insufficient_credit": 402,
|
|
"spending_limit_exceeded": 403,
|
|
"upstream_error": 502,
|
|
"account_email_domain": 409,
|
|
"insufficient_credits": 402,
|
|
"model_not_found": 404,
|
|
"agent_paused": 409,
|
|
"plan_limit_reached": 429
|
|
}
|
|
},
|
|
"RequestLimit": {
|
|
"type": "object",
|
|
"required": [
|
|
"limit",
|
|
"remaining",
|
|
"reset",
|
|
"window_seconds"
|
|
],
|
|
"properties": {
|
|
"limit": {
|
|
"type": "integer"
|
|
},
|
|
"remaining": {
|
|
"type": "integer"
|
|
},
|
|
"reset": {
|
|
"type": "integer",
|
|
"description": "Unix timestamp in seconds."
|
|
},
|
|
"window_seconds": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"Spending": {
|
|
"type": "object",
|
|
"required": [
|
|
"limit",
|
|
"spent",
|
|
"currency",
|
|
"window_days"
|
|
],
|
|
"properties": {
|
|
"limit": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "Maximum per 30 days, in the currency of the customer. null means no limit (the key spends up to the account credit); 0 means the key cannot spend."
|
|
},
|
|
"spent": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"window_days": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"PingResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"status",
|
|
"version",
|
|
"time"
|
|
],
|
|
"properties": {
|
|
"status": {
|
|
"type": "string",
|
|
"const": "ok"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
},
|
|
"time": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"TokenResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"name",
|
|
"type",
|
|
"suffix",
|
|
"permissions",
|
|
"allowed_ips",
|
|
"expires_at",
|
|
"created_at",
|
|
"last_used_at",
|
|
"rate_limit",
|
|
"spending",
|
|
"mode",
|
|
"writes_simulated"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"production",
|
|
"sandbox"
|
|
]
|
|
},
|
|
"suffix": {
|
|
"type": "string",
|
|
"description": "Last 4 characters of the key."
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"allowed_ips": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Empty means any IP address."
|
|
},
|
|
"expires_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"format": "date-time",
|
|
"description": "null means no expiry."
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"last_used_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"format": "date-time"
|
|
},
|
|
"rate_limit": {
|
|
"$ref": "#/components/schemas/RequestLimit"
|
|
},
|
|
"spending": {
|
|
"$ref": "#/components/schemas/Spending"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
],
|
|
"description": "The mode of this key.",
|
|
"x-description-pt": "O modo desta chave."
|
|
},
|
|
"writes_simulated": {
|
|
"type": "boolean",
|
|
"description": "True when writes with this key are simulated: a Sandbox key, or a Production key while the API is still in preparation.",
|
|
"x-description-pt": "Verdadeiro quando as escritas com esta chave são simuladas: uma chave de Sandbox, ou uma chave de Produção enquanto a API está em preparação."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"LimitsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"requests",
|
|
"unauthenticated_requests_per_minute",
|
|
"spending",
|
|
"mode"
|
|
],
|
|
"properties": {
|
|
"requests": {
|
|
"$ref": "#/components/schemas/RequestLimit"
|
|
},
|
|
"unauthenticated_requests_per_minute": {
|
|
"type": "integer"
|
|
},
|
|
"spending": {
|
|
"$ref": "#/components/schemas/Spending"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
],
|
|
"description": "The mode of this key.",
|
|
"x-description-pt": "O modo desta chave."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ActionResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"type",
|
|
"target",
|
|
"status",
|
|
"result",
|
|
"created_at",
|
|
"updated_at"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"format": "uuid"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"target": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"running",
|
|
"done",
|
|
"failed"
|
|
]
|
|
},
|
|
"result": {
|
|
"description": "null until the action ends."
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"updated_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsMessage": {
|
|
"type": "object",
|
|
"required": [
|
|
"id",
|
|
"status",
|
|
"simulated",
|
|
"to",
|
|
"sender",
|
|
"parts",
|
|
"encoding",
|
|
"credits",
|
|
"mode",
|
|
"charged"
|
|
],
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "A number for messages in the queue, a UUID for simulated ones.",
|
|
"x-description-pt": "Um número nas mensagens que entraram na fila, um UUID nas simuladas."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"scheduled",
|
|
"queued",
|
|
"sending",
|
|
"sent",
|
|
"simulated",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`scheduled`: waiting for the time in `scheduled_for`, and it can still be cancelled. `queued`: waiting its turn to go out.",
|
|
"x-description-pt": "`scheduled`: à espera da hora em `scheduled_for`, e ainda se pode cancelar. `queued`: à espera da vez para sair."
|
|
},
|
|
"simulated": {
|
|
"type": "boolean",
|
|
"description": "True when no real SMS goes out.",
|
|
"x-description-pt": "Verdadeiro quando o SMS é simulado e não sai nenhuma mensagem."
|
|
},
|
|
"to": {
|
|
"type": "string",
|
|
"description": "The number, partly hidden.",
|
|
"x-description-pt": "O número, em parte tapado."
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"parts": {
|
|
"type": "integer"
|
|
},
|
|
"encoding": {
|
|
"type": "string",
|
|
"enum": [
|
|
"GSM",
|
|
"UCS2"
|
|
]
|
|
},
|
|
"credits": {
|
|
"type": "number",
|
|
"description": "What the message costs in credits. See `charged` to know whether they already left the SMS balance. Always 0 when simulated by the API.",
|
|
"x-description-pt": "Quanto custa a mensagem, em créditos. Veja `charged` para saber se já saíram do saldo de SMS. Sempre 0 quando a API simula."
|
|
},
|
|
"would_cost": {
|
|
"type": "number",
|
|
"description": "Only on simulated messages: what a real send would cost.",
|
|
"x-description-pt": "Só nas simuladas: quanto custaria o envio em Produção."
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
]
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`delivery_failed` when it could not be delivered; `insufficient_credits` when a scheduled message did not have enough balance when it was due to go out.",
|
|
"x-description-pt": "`delivery_failed` quando não foi possível entregar; `insufficient_credits` quando uma mensagem agendada não tinha saldo suficiente na hora de sair."
|
|
},
|
|
"created_at": {
|
|
"type": "string",
|
|
"format": "date-time"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"format": "date-time"
|
|
},
|
|
"charged": {
|
|
"type": "boolean",
|
|
"description": "True when the credits have left the SMS balance. A scheduled message is only charged when it goes out; failed, cancelled and simulated messages give the credits back.",
|
|
"x-description-pt": "Verdadeiro quando os créditos saíram do saldo de SMS. Uma mensagem agendada só se cobra quando sai; as falhadas, canceladas e simuladas devolvem os créditos."
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"format": "date-time",
|
|
"description": "The time chosen in `send_at`, while the message is scheduled or after it was cancelled; otherwise `null`.",
|
|
"x-description-pt": "A hora escolhida em `send_at`, enquanto a mensagem está agendada ou depois de cancelada; nos outros casos, `null`."
|
|
}
|
|
}
|
|
},
|
|
"SmsMessageResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/components/schemas/SmsMessage"
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsBalanceResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"required": [
|
|
"balance",
|
|
"unit",
|
|
"daily_limit",
|
|
"sent_today",
|
|
"mode",
|
|
"scheduled_credits"
|
|
],
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number"
|
|
},
|
|
"unit": {
|
|
"type": "string",
|
|
"enum": [
|
|
"credits"
|
|
]
|
|
},
|
|
"daily_limit": {
|
|
"type": "integer"
|
|
},
|
|
"sent_today": {
|
|
"type": "integer"
|
|
},
|
|
"mode": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sandbox",
|
|
"production"
|
|
]
|
|
},
|
|
"scheduled_credits": {
|
|
"type": "number",
|
|
"description": "Credits of scheduled messages that were not charged yet. They are still in `balance` and leave it when each message goes out.",
|
|
"x-description-pt": "Créditos das mensagens agendadas que ainda não foram cobradas. Continuam em `balance` e saem quando cada mensagem sair."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsSendersResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"sender",
|
|
"status",
|
|
"free"
|
|
],
|
|
"properties": {
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"approved",
|
|
"pending",
|
|
"in_review",
|
|
"rejected"
|
|
]
|
|
},
|
|
"free": {
|
|
"type": "boolean",
|
|
"description": "The free sender, available to every account with SMS active.",
|
|
"x-description-pt": "O remetente grátis, disponível em todas as contas com o SMS activo."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"AccountGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"tax_id": {
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"type": "object",
|
|
"properties": {
|
|
"line1": {
|
|
"type": "string"
|
|
},
|
|
"line2": {
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"postcode": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"email_verified": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"AccountContactsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"address": {
|
|
"type": "object",
|
|
"properties": {
|
|
"line1": {
|
|
"type": "string"
|
|
},
|
|
"line2": {
|
|
"type": "string"
|
|
},
|
|
"city": {
|
|
"type": "string"
|
|
},
|
|
"state": {
|
|
"type": "string"
|
|
},
|
|
"postcode": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"AccountUsersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"first_name": {
|
|
"type": "string"
|
|
},
|
|
"last_name": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"owner": {
|
|
"type": "boolean"
|
|
},
|
|
"two_factor_enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"last_login_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"CatalogProductsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"free": {
|
|
"type": "boolean"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"prices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"setup_fee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"hosting",
|
|
"reseller_hosting",
|
|
"radio",
|
|
"vps",
|
|
"dedicated",
|
|
"ai_plan",
|
|
"extra",
|
|
"other"
|
|
],
|
|
"description": "What the product is. `extra` is bought with POST /v1/extras/purchase.",
|
|
"x-description-pt": "O que é o produto. Um `extra` compra-se com POST /v1/extras/purchase."
|
|
},
|
|
"purchasable": {
|
|
"type": "boolean",
|
|
"description": "True when it can be bought with POST /v1/services/purchase.",
|
|
"x-description-pt": "Verdadeiro quando se pode comprar com POST /v1/services/purchase."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"CatalogTldsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"extension": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"register": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
},
|
|
"2": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"renew": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"transfer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"features": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dns_management": {
|
|
"type": "boolean"
|
|
},
|
|
"email_forwarding": {
|
|
"type": "boolean"
|
|
},
|
|
"id_protection": {
|
|
"type": "boolean"
|
|
},
|
|
"transfer_code_required": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"label": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"CatalogCurrenciesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
},
|
|
"prefix": {
|
|
"type": "string"
|
|
},
|
|
"suffix": {
|
|
"type": "string"
|
|
},
|
|
"default": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"CatalogBillingCyclesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"months": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"period_years": {
|
|
"type": "integer"
|
|
},
|
|
"renewal_amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"auto_renew": {
|
|
"type": "boolean"
|
|
},
|
|
"premium": {
|
|
"type": "boolean"
|
|
},
|
|
"features": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dns_management": {
|
|
"type": "boolean"
|
|
},
|
|
"email_forwarding": {
|
|
"type": "boolean"
|
|
},
|
|
"id_protection": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"period_years": {
|
|
"type": "integer"
|
|
},
|
|
"renewal_amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"auto_renew": {
|
|
"type": "boolean"
|
|
},
|
|
"premium": {
|
|
"type": "boolean"
|
|
},
|
|
"features": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dns_management": {
|
|
"type": "boolean"
|
|
},
|
|
"email_forwarding": {
|
|
"type": "boolean"
|
|
},
|
|
"id_protection": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"product": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"dedicated_ip": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"suspension_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"terminated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"product": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
},
|
|
"dedicated_ip": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"suspension_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"terminated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"InvoicesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"due_date": {
|
|
"type": "string"
|
|
},
|
|
"paid_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"credit_applied": {
|
|
"type": "number"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
},
|
|
"balance_due": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"InvoicesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"due_date": {
|
|
"type": "string"
|
|
},
|
|
"paid_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"credit_applied": {
|
|
"type": "number"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
},
|
|
"balance_due": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"related_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"taxed": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"BillingCreditGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"BillingTransactionsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"amount_in": {
|
|
"type": "number"
|
|
},
|
|
"amount_out": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"transaction_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"TicketsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "string"
|
|
},
|
|
"department": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"unread": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"last_reply_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"TicketsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "string"
|
|
},
|
|
"department": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"unread": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"last_reply_at": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"author": {
|
|
"type": "string"
|
|
},
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SupportDepartmentsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsAvailabilityResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"extension": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"available": {
|
|
"type": "boolean"
|
|
},
|
|
"one_year_price": {
|
|
"type": "object",
|
|
"properties": {
|
|
"register": {
|
|
"type": "number"
|
|
},
|
|
"renew": {
|
|
"type": "number"
|
|
},
|
|
"transfer": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"prices": {
|
|
"type": "array",
|
|
"description": "Register and renew price for each number of years, from 1 to 10. Only the years with a price. A transfer is always for 1 year: see `one_year_price`.",
|
|
"x-description-pt": "Preço de registo e de renovação por número de anos, de 1 a 10. Só os anos com preço. A transferência é sempre de 1 ano: ver `one_year_price`.",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"years": {
|
|
"type": "integer"
|
|
},
|
|
"register": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"renew": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"portal_only": {
|
|
"type": "boolean"
|
|
},
|
|
"portal_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsRegisterResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"years": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"credit_sufficient": {
|
|
"type": "boolean"
|
|
},
|
|
"within_spending_limit": {
|
|
"type": "boolean"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The promo code used, or null.",
|
|
"x-description-pt": "O código promocional usado, ou null."
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "Discount given by the promo code, before tax. null without a code, and in Sandbox.",
|
|
"x-description-pt": "Desconto dado pelo código, antes do imposto. null sem código e no Sandbox."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsTransferResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"years": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"credit_sufficient": {
|
|
"type": "boolean"
|
|
},
|
|
"within_spending_limit": {
|
|
"type": "boolean"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The promo code used, or null.",
|
|
"x-description-pt": "O código promocional usado, ou null."
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "Discount given by the promo code, before tax. null without a code, and in Sandbox.",
|
|
"x-description-pt": "Desconto dado pelo código, antes do imposto. null sem código e no Sandbox."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsRenewResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"years": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"credit_sufficient": {
|
|
"type": "boolean"
|
|
},
|
|
"within_spending_limit": {
|
|
"type": "boolean"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The promo code used, or null.",
|
|
"x-description-pt": "O código promocional usado, ou null."
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "Discount given by the promo code, before tax. null without a code, and in Sandbox.",
|
|
"x-description-pt": "Desconto dado pelo código, antes do imposto. null sem código e no Sandbox."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsNameserversGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"nameservers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"uses_our_nameservers": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsNameserversUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"nameservers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsLockGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"locked": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsLockUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"locked": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsAutoRenewUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"auto_renew": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsContactsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Registrant": {
|
|
"type": "object",
|
|
"properties": {
|
|
"Full Name": {
|
|
"type": "string"
|
|
},
|
|
"Email": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DomainsTransferCodeRequestResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsRecordsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"ttl": {
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
},
|
|
"read_only": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsRecordsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"ttl": {
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
},
|
|
"read_only": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsRecordsValidateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"valid": {
|
|
"type": "boolean"
|
|
},
|
|
"record": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"ttl": {
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsRecordsUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"ttl": {
|
|
"type": "integer"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
},
|
|
"read_only": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsRecordsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsZoneResetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"reset": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsBackupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"records": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"DnsBackupsRestoreResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"removed": {
|
|
"type": "integer"
|
|
},
|
|
"added": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"complete": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"InvoicesPdfResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pdf_available": {
|
|
"type": "boolean"
|
|
},
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"encoding": {
|
|
"type": "string"
|
|
},
|
|
"size_bytes": {
|
|
"type": "integer"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"InvoicesPayResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"amount_charged": {
|
|
"type": "number"
|
|
},
|
|
"balance_due": {
|
|
"type": "number"
|
|
},
|
|
"credit_balance": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"invoice_total": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"credit_sufficient": {
|
|
"type": "boolean",
|
|
"description": "Sandbox only: the credit would be enough.",
|
|
"x-description-pt": "Só em Sandbox: o saldo chegaria."
|
|
},
|
|
"within_spending_limit": {
|
|
"type": "boolean",
|
|
"description": "Sandbox only: the payment would fit the spending limit of the key.",
|
|
"x-description-pt": "Só em Sandbox: o pagamento caberia no limite de gastos da chave."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"OrdersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"OrdersGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"payment_method": {
|
|
"type": "string"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"first_payment": {
|
|
"type": "number"
|
|
},
|
|
"recurring_amount": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"QuotesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": "string"
|
|
},
|
|
"valid_until": {
|
|
"type": "string"
|
|
},
|
|
"accepted_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"QuotesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": "string"
|
|
},
|
|
"valid_until": {
|
|
"type": "string"
|
|
},
|
|
"accepted_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"total": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"proposal": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"quantity": {
|
|
"type": "number"
|
|
},
|
|
"unit_price": {
|
|
"type": "number"
|
|
},
|
|
"discount_percent": {
|
|
"type": "number"
|
|
},
|
|
"taxed": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesBillingCyclesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"current_cycle": {
|
|
"type": "string"
|
|
},
|
|
"current_amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"can_change": {
|
|
"type": "boolean"
|
|
},
|
|
"blocked_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"cycles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"current": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesBillingCycleUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"previous_cycle": {
|
|
"type": "string"
|
|
},
|
|
"cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"applies_from": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesUpgradeLinkGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesCancellationCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"service_ends_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"TicketsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "string"
|
|
},
|
|
"department": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"unread": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"last_reply_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"TicketsRepliesCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ticket_id": {
|
|
"type": "string"
|
|
},
|
|
"reply_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"reopened": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"TicketsCloseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ticket_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"KbCategoriesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"articles": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"KbArticlesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"views": {
|
|
"type": "integer"
|
|
},
|
|
"translated": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"excerpt": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"KbArticlesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"categories": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"views": {
|
|
"type": "integer"
|
|
},
|
|
"translated": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"body_html": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"AnnouncementsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"published_at": {
|
|
"type": "string"
|
|
},
|
|
"translated": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"AnnouncementsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"published_at": {
|
|
"type": "string"
|
|
},
|
|
"translated": {
|
|
"type": "boolean"
|
|
},
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"body_html": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"product": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"power_state": {
|
|
"type": "string"
|
|
},
|
|
"state_checked_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ServersGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"product": {
|
|
"type": "string"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"power_state": {
|
|
"type": "string"
|
|
},
|
|
"state_checked_at": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"additional_ips": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"operating_system": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"location": {
|
|
"type": "string"
|
|
},
|
|
"resources": {
|
|
"type": "object",
|
|
"properties": {
|
|
"vcpu": {
|
|
"type": "integer"
|
|
},
|
|
"ram_gb": {
|
|
"type": "integer"
|
|
},
|
|
"disk_gb": {
|
|
"type": "integer"
|
|
},
|
|
"traffic_gb": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"state_stale": {
|
|
"type": "boolean"
|
|
},
|
|
"portal_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersTrafficGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"month": {
|
|
"type": "string"
|
|
},
|
|
"total_gb": {
|
|
"type": "number"
|
|
},
|
|
"in_gb": {
|
|
"type": "number"
|
|
},
|
|
"out_gb": {
|
|
"type": "number"
|
|
},
|
|
"limit_gb": {
|
|
"type": "integer"
|
|
},
|
|
"days": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"total_gb": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"checked_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersOperatingSystemsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersBackupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"size_gb": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersBackupsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersStartResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersStopResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersRestartResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersPasswordChangeResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersReverseDnsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"hostname": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"checked_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersReverseDnsUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"changed": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersTimezoneGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"available": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersTimezoneUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersReinstallResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"operating_system": {
|
|
"type": "string"
|
|
},
|
|
"backup_first": {
|
|
"type": "boolean"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersRestoreResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"server": {
|
|
"type": "string"
|
|
},
|
|
"backup": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingUsageGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"disk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"used_bytes": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"limit_bytes": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"bandwidth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"used_bytes": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"limit_bytes": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"resources": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"used": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"limit": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingLoginCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"single_use": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingSubdomainsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"root_domain": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingSubdomainsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"root_domain": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingSubdomainsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingAddonDomainsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingAddonDomainsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingAddonDomainsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingRedirectsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"destination": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"wildcard": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingRedirectsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"source": {
|
|
"type": "string"
|
|
},
|
|
"destination": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"wildcard": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingRedirectsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabasesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"disk_usage_bytes": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"users": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabasesCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabasesDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabaseUsersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"databases": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabaseUsersCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabaseUsersPasswordResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password_changed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabaseUsersDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabasesGrantResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"database": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"type": "string"
|
|
},
|
|
"privileges": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingDatabasesRevokeResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"database": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"type": "string"
|
|
},
|
|
"revoked": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingCronListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"schedule": {
|
|
"type": "string"
|
|
},
|
|
"command": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Only with `hosting:code`; otherwise `null`.",
|
|
"x-description-pt": "Só com `hosting:code`; sem ela, `null`."
|
|
},
|
|
"command_hidden": {
|
|
"type": "boolean",
|
|
"description": "`true` when `command` is hidden because the key does not have `hosting:code`.",
|
|
"x-description-pt": "`true` quando `command` está oculto, porque a chave não tem `hosting:code`."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingCronCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"schedule": {
|
|
"type": "string"
|
|
},
|
|
"command": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingCronDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingSslGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"domains": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"expires_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"self_signed": {
|
|
"type": "boolean"
|
|
},
|
|
"validation_type": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"required": [
|
|
"page",
|
|
"per_page",
|
|
"total",
|
|
"total_pages"
|
|
],
|
|
"properties": {
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"per_page": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"total_pages": {
|
|
"type": "integer"
|
|
},
|
|
"autossl_running": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"HostingSslAutosslResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"requested": {
|
|
"type": "boolean"
|
|
},
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingPhpGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"version": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"type": "object",
|
|
"required": [
|
|
"page",
|
|
"per_page",
|
|
"total",
|
|
"total_pages"
|
|
],
|
|
"properties": {
|
|
"page": {
|
|
"type": "integer"
|
|
},
|
|
"per_page": {
|
|
"type": "integer"
|
|
},
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"total_pages": {
|
|
"type": "integer"
|
|
},
|
|
"available_versions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"HostingPhpOptionsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"properties": {
|
|
"memory_limit": {
|
|
"type": "string"
|
|
},
|
|
"post_max_size": {
|
|
"type": "string"
|
|
},
|
|
"upload_max_filesize": {
|
|
"type": "string"
|
|
},
|
|
"max_execution_time": {
|
|
"type": "string"
|
|
},
|
|
"max_input_time": {
|
|
"type": "string"
|
|
},
|
|
"max_input_vars": {
|
|
"type": "string"
|
|
},
|
|
"session.gc_maxlifetime": {
|
|
"type": "string"
|
|
},
|
|
"display_errors": {
|
|
"type": "string"
|
|
},
|
|
"zlib.output_compression": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingPhpOptionsUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"options": {
|
|
"type": "object",
|
|
"properties": {
|
|
"memory_limit": {
|
|
"type": "string"
|
|
},
|
|
"post_max_size": {
|
|
"type": "string"
|
|
},
|
|
"upload_max_filesize": {
|
|
"type": "string"
|
|
},
|
|
"max_execution_time": {
|
|
"type": "string"
|
|
},
|
|
"max_input_time": {
|
|
"type": "string"
|
|
},
|
|
"max_input_vars": {
|
|
"type": "string"
|
|
},
|
|
"session.gc_maxlifetime": {
|
|
"type": "string"
|
|
},
|
|
"display_errors": {
|
|
"type": "string"
|
|
},
|
|
"zlib.output_compression": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingBackupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingBackupsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"requested": {
|
|
"type": "boolean"
|
|
},
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingFtpListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"used_mb": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"quota_mb": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"HostingFtpCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"directory": {
|
|
"type": "string"
|
|
},
|
|
"quota_mb": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingFtpPasswordResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"password_changed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"HostingFtpDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"login": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMailboxesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"used_mb": {
|
|
"type": "number"
|
|
},
|
|
"quota_mb": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMailboxesCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"quota_mb": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMailboxesDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMailboxesPasswordResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"password_changed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMailboxesQuotaResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"quota_mb": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailForwardersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailForwardersCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailForwardersDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutorespondersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutorespondersGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": "boolean"
|
|
},
|
|
"interval_hours": {
|
|
"type": "integer"
|
|
},
|
|
"start_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"stop_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutorespondersPutResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutorespondersDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"address": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDefaultAddressGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDefaultAddressPutResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"action": {
|
|
"type": "string"
|
|
},
|
|
"forward_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"message": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAuthenticationGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"spf": {
|
|
"type": "object",
|
|
"properties": {
|
|
"state": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dkim": {
|
|
"type": "object",
|
|
"properties": {
|
|
"state": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"dmarc": {
|
|
"type": "object",
|
|
"properties": {
|
|
"state": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsMessagesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"scheduled",
|
|
"queued",
|
|
"sending",
|
|
"sent",
|
|
"simulated",
|
|
"failed",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"parts": {
|
|
"type": "integer"
|
|
},
|
|
"encoding": {
|
|
"type": "string"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"campaign_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"scheduled_for": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": "string"
|
|
},
|
|
"charged": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"SmsStatsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "integer"
|
|
},
|
|
"parts": {
|
|
"type": "integer"
|
|
},
|
|
"credits_spent": {
|
|
"type": "number"
|
|
},
|
|
"by_status": {
|
|
"type": "object",
|
|
"properties": {
|
|
"scheduled": {
|
|
"type": "integer"
|
|
},
|
|
"queued": {
|
|
"type": "integer"
|
|
},
|
|
"sending": {
|
|
"type": "integer"
|
|
},
|
|
"sent": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "integer"
|
|
},
|
|
"failed": {
|
|
"type": "integer"
|
|
},
|
|
"cancelled": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"by_day": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "integer"
|
|
},
|
|
"sent": {
|
|
"type": "integer"
|
|
},
|
|
"failed": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsTemplatesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"category": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"SmsTemplatesCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"category": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsTemplatesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"category": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsTemplatesUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"text": {
|
|
"type": "string"
|
|
},
|
|
"category": {
|
|
"type": "string"
|
|
},
|
|
"language": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsTemplatesDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsSendersCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "`payment_pending` (fee to pay), `documents_needed`, `name_needed`, `pending`, `in_review`, `approved` or `rejected`.",
|
|
"x-description-pt": "`payment_pending` (taxa por pagar), `documents_needed`, `name_needed`, `pending`, `in_review`, `approved` ou `rejected`."
|
|
},
|
|
"free": {
|
|
"type": "boolean"
|
|
},
|
|
"entity": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"purpose": {
|
|
"type": "string"
|
|
},
|
|
"sample": {
|
|
"type": "string"
|
|
},
|
|
"note": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"documents": {
|
|
"type": "integer"
|
|
},
|
|
"documents_url": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"payment_url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The page where the fee is paid; null when there is nothing to pay.",
|
|
"x-description-pt": "A página onde se paga a taxa; nulo quando não há nada a pagar."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsSendersGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"description": "`payment_pending` (fee to pay), `documents_needed`, `name_needed`, `pending`, `in_review`, `approved` or `rejected`.",
|
|
"x-description-pt": "`payment_pending` (taxa por pagar), `documents_needed`, `name_needed`, `pending`, `in_review`, `approved` ou `rejected`."
|
|
},
|
|
"free": {
|
|
"type": "boolean"
|
|
},
|
|
"entity": {
|
|
"type": "string"
|
|
},
|
|
"country": {
|
|
"type": "string"
|
|
},
|
|
"purpose": {
|
|
"type": "string"
|
|
},
|
|
"sample": {
|
|
"type": "string"
|
|
},
|
|
"note": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"documents": {
|
|
"type": "integer"
|
|
},
|
|
"documents_url": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOptOutsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOptOutsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"number": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"already_listed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ExtrasCatalogListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"months": {
|
|
"type": "integer"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"setup_fee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"purchasable": {
|
|
"type": "boolean"
|
|
},
|
|
"requires_site": {
|
|
"type": "boolean"
|
|
},
|
|
"portal_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ExtrasListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"parent_service_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"manage_url": {
|
|
"type": "string"
|
|
},
|
|
"certificate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ExtrasGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"parent_service_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"manage_url": {
|
|
"type": "string"
|
|
},
|
|
"certificate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ExtrasPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"credit_sufficient": {
|
|
"type": "boolean"
|
|
},
|
|
"within_spending_limit": {
|
|
"type": "boolean"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The promo code used, or null.",
|
|
"x-description-pt": "O código promocional usado, ou null."
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
],
|
|
"description": "Discount given by the promo code, before tax. null without a code, and in Sandbox.",
|
|
"x-description-pt": "Desconto dado pelo código, antes do imposto. null sem código e no Sandbox."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_reseller": {
|
|
"type": "boolean"
|
|
},
|
|
"programs": {
|
|
"type": "object",
|
|
"properties": {
|
|
"domains": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"sms": {
|
|
"type": "object",
|
|
"properties": {
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"balance": {
|
|
"type": "number"
|
|
},
|
|
"daily_limit": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"hosting": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"accounts": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"reseller_program": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"discount_percent": {
|
|
"type": "number"
|
|
},
|
|
"custom_discount": {
|
|
"type": "boolean"
|
|
},
|
|
"fixed": {
|
|
"type": "boolean"
|
|
}
|
|
},
|
|
"description": "The Agency of the Reseller Program. Without membership, only `active: false`.",
|
|
"x-description-pt": "O Agency do Programa de Revenda. Sem adesão, só `active: false`."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerServicesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"manage_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerServicesGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"registered_at": {
|
|
"type": "string"
|
|
},
|
|
"manage_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsMessagesCancelResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/SmsMessage"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"required": [
|
|
"credits_returned"
|
|
],
|
|
"properties": {
|
|
"credits_returned": {
|
|
"type": "number",
|
|
"description": "Credits that went back to the SMS balance with this cancellation.",
|
|
"x-description-pt": "Créditos que voltaram ao saldo de SMS com este cancelamento."
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsContactsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"SmsContactsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsContactsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsContactsUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"company": {
|
|
"type": "string"
|
|
},
|
|
"phone": {
|
|
"type": "string"
|
|
},
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"notes": {
|
|
"type": "string"
|
|
},
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsContactsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsGroupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"SmsGroupsCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsGroupsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsGroupsUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsGroupsDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"expired",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`pending` (waiting for the code), `verified`, `expired`, `failed` (no attempts left) or `cancelled` (a newer code was sent, or cancelled).",
|
|
"x-description-pt": "`pending` (à espera do código), `verified`, `expired`, `failed` (sem tentativas) ou `cancelled` (saiu um código mais novo, ou cancelado)."
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"attempts": {
|
|
"type": "integer"
|
|
},
|
|
"attempts_left": {
|
|
"type": "integer"
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"parts": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"description": "Only with a sandbox key.",
|
|
"x-description-pt": "Só com uma chave sandbox."
|
|
},
|
|
"resends": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"expired",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`pending` (waiting for the code), `verified`, `expired`, `failed` (no attempts left) or `cancelled` (a newer code was sent, or cancelled).",
|
|
"x-description-pt": "`pending` (à espera do código), `verified`, `expired`, `failed` (sem tentativas) ou `cancelled` (saiu um código mais novo, ou cancelado)."
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"attempts": {
|
|
"type": "integer"
|
|
},
|
|
"attempts_left": {
|
|
"type": "integer"
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"resends": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpVerifyResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"expired",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`pending` (waiting for the code), `verified`, `expired`, `failed` (no attempts left) or `cancelled` (a newer code was sent, or cancelled).",
|
|
"x-description-pt": "`pending` (à espera do código), `verified`, `expired`, `failed` (sem tentativas) ou `cancelled` (saiu um código mais novo, ou cancelado)."
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"attempts": {
|
|
"type": "integer"
|
|
},
|
|
"attempts_left": {
|
|
"type": "integer"
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"valid": {
|
|
"type": "boolean"
|
|
},
|
|
"resends": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpCancelResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"expired",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`pending` (waiting for the code), `verified`, `expired`, `failed` (no attempts left) or `cancelled` (a newer code was sent, or cancelled).",
|
|
"x-description-pt": "`pending` (à espera do código), `verified`, `expired`, `failed` (sem tentativas) ou `cancelled` (saiu um código mais novo, ou cancelado)."
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"attempts": {
|
|
"type": "integer"
|
|
},
|
|
"attempts_left": {
|
|
"type": "integer"
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"resends": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsBatchResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"accepted": {
|
|
"type": "integer"
|
|
},
|
|
"rejected": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"results": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"scheduled",
|
|
"simulated",
|
|
"rejected"
|
|
]
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"parts": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpResendResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"expired",
|
|
"failed",
|
|
"cancelled"
|
|
],
|
|
"description": "`pending` (waiting for the code), `verified`, `expired`, `failed` (no attempts left) or `cancelled` (a newer code was sent, or cancelled).",
|
|
"x-description-pt": "`pending` (à espera do código), `verified`, `expired`, `failed` (sem tentativas) ou `cancelled` (saiu um código mais novo, ou cancelado)."
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"sender": {
|
|
"type": "string"
|
|
},
|
|
"attempts": {
|
|
"type": "integer"
|
|
},
|
|
"attempts_left": {
|
|
"type": "integer"
|
|
},
|
|
"max_attempts": {
|
|
"type": "integer"
|
|
},
|
|
"message_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": "string"
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"resends": {
|
|
"type": "integer"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"code": {
|
|
"type": "string",
|
|
"description": "Only with a sandbox key.",
|
|
"x-description-pt": "Só com uma chave sandbox."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsWebhookGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
]
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsWebhookSetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms.sent",
|
|
"sms.failed"
|
|
]
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"secret": {
|
|
"type": "string",
|
|
"description": "Only when created or rotated.",
|
|
"x-description-pt": "Só quando nasce ou é trocado."
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsWebhookDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsWebhookTestResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delivered": {
|
|
"type": "boolean"
|
|
},
|
|
"status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpSettingsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"resend_wait_seconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 3600,
|
|
"description": "Seconds between resends of the same code. 0 = no limit (default).",
|
|
"x-description-pt": "Segundos entre reenvios do mesmo código. 0 = sem limite (omissão)."
|
|
},
|
|
"max_codes_per_number_per_hour": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1000,
|
|
"description": "Codes (new and resent) per number per hour. 0 = no limit (default).",
|
|
"x-description-pt": "Códigos (novos e reenviados) por número e por hora. 0 = sem limite (omissão)."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsOtpSettingsSetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"resend_wait_seconds": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 3600,
|
|
"description": "Seconds between resends of the same code. 0 = no limit (default).",
|
|
"x-description-pt": "Segundos entre reenvios do mesmo código. 0 = sem limite (omissão)."
|
|
},
|
|
"max_codes_per_number_per_hour": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 1000,
|
|
"description": "Codes (new and resent) per number per hour. 0 = no limit (default).",
|
|
"x-description-pt": "Códigos (novos e reenviados) por número e por hora. 0 = sem limite (omissão)."
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMessageCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"delivered",
|
|
"bounced",
|
|
"complained",
|
|
"failed",
|
|
"simulated",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"bcc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"reply_to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"recipients": {
|
|
"type": "integer",
|
|
"description": "Recipients after the suppression list; each one is one credit.",
|
|
"x-description-pt": "Destinatários depois da lista de bloqueados; cada um é um crédito."
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"charged": {
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"description": "portal, api or smtp.",
|
|
"x-description-pt": "portal, api ou smtp."
|
|
},
|
|
"template_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"enum": [
|
|
null,
|
|
"delivery_failed",
|
|
"insufficient_credits",
|
|
"domain_not_verified"
|
|
]
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"suppressed": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMessagesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"delivered",
|
|
"bounced",
|
|
"complained",
|
|
"failed",
|
|
"simulated",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"bcc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"reply_to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"recipients": {
|
|
"type": "integer",
|
|
"description": "Recipients after the suppression list; each one is one credit.",
|
|
"x-description-pt": "Destinatários depois da lista de bloqueados; cada um é um crédito."
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"charged": {
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"description": "portal, api or smtp.",
|
|
"x-description-pt": "portal, api ou smtp."
|
|
},
|
|
"template_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"enum": [
|
|
null,
|
|
"delivery_failed",
|
|
"insufficient_credits",
|
|
"domain_not_verified"
|
|
]
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailBatchResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"total": {
|
|
"type": "integer"
|
|
},
|
|
"accepted": {
|
|
"type": "integer"
|
|
},
|
|
"rejected": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"results": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"suppressed": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"field": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMessageGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"delivered",
|
|
"bounced",
|
|
"complained",
|
|
"failed",
|
|
"simulated",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"bcc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"reply_to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"recipients": {
|
|
"type": "integer",
|
|
"description": "Recipients after the suppression list; each one is one credit.",
|
|
"x-description-pt": "Destinatários depois da lista de bloqueados; cada um é um crédito."
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"charged": {
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"description": "portal, api or smtp.",
|
|
"x-description-pt": "portal, api ou smtp."
|
|
},
|
|
"template_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"enum": [
|
|
null,
|
|
"delivery_failed",
|
|
"insufficient_credits",
|
|
"domain_not_verified"
|
|
]
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"html": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sent",
|
|
"delivered",
|
|
"bounced",
|
|
"complained",
|
|
"failed"
|
|
]
|
|
},
|
|
"recipient": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"detail": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"headers": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
},
|
|
"description": "The headers of your own that the request carried (see `headers` in POST /v1/email/messages), or null.",
|
|
"x-description-pt": "Os cabeçalhos seus que o pedido levou (veja `headers` em POST /v1/email/messages), ou null."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailMessageCancelResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"delivered",
|
|
"bounced",
|
|
"complained",
|
|
"failed",
|
|
"simulated",
|
|
"cancelled"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"cc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"bcc": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"reply_to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"recipients": {
|
|
"type": "integer",
|
|
"description": "Recipients after the suppression list; each one is one credit.",
|
|
"x-description-pt": "Destinatários depois da lista de bloqueados; cada um é um crédito."
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"charged": {
|
|
"type": "boolean"
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"description": "portal, api or smtp.",
|
|
"x-description-pt": "portal, api ou smtp."
|
|
},
|
|
"template_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"attachments": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"filename": {
|
|
"type": "string"
|
|
},
|
|
"content_type": {
|
|
"type": "string"
|
|
},
|
|
"size": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"enum": [
|
|
null,
|
|
"delivery_failed",
|
|
"insufficient_credits",
|
|
"domain_not_verified"
|
|
]
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"credits_returned": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailBalanceResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number"
|
|
},
|
|
"unit": {
|
|
"type": "string"
|
|
},
|
|
"scheduled_credits": {
|
|
"type": "number"
|
|
},
|
|
"daily_limit": {
|
|
"type": "integer"
|
|
},
|
|
"sent_today": {
|
|
"type": "integer"
|
|
},
|
|
"mode": {
|
|
"type": "string"
|
|
},
|
|
"test_mode": {
|
|
"type": "boolean"
|
|
},
|
|
"monthly_limits": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"description": "The two monthly limits of the account, the same numbers the customer sees in the account dashboard. `null` if this installation does not have them.",
|
|
"x-description-pt": "Os dois limites do mês da conta, os mesmos números que o cliente vê no painel da conta. `null` se esta instalação não os tiver.",
|
|
"properties": {
|
|
"active": {
|
|
"type": "boolean",
|
|
"description": "`false` while the monthly limits do not rule, and then the other fields are `null` and the daily limit is what counts.",
|
|
"x-description-pt": "`false` enquanto os limites do mês não mandam, e então os outros campos são `null` e quem conta é o limite diário."
|
|
},
|
|
"month": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The month these numbers are about, as `YYYY-MM`.",
|
|
"x-description-pt": "O mês de que são estes números, em `AAAA-MM`."
|
|
},
|
|
"resets_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The day both start again, which is always the 1st of the next month.",
|
|
"x-description-pt": "O dia em que os dois recomeçam, que é sempre o dia 1 do mês seguinte."
|
|
},
|
|
"emails": {
|
|
"type": "object",
|
|
"properties": {
|
|
"plan": {
|
|
"type": "integer",
|
|
"description": "What the monthly plan gives, in emails. `0` means the account has no monthly plan and lives on the starter offer and on what it buys.",
|
|
"x-description-pt": "O que o plano do mês dá, em e-mails. `0` quer dizer que a conta não tem plano mensal e vive da oferta de arranque e do que comprar."
|
|
},
|
|
"used": {
|
|
"type": "integer",
|
|
"description": "Used so far this month.",
|
|
"x-description-pt": "Gastos até agora neste mês."
|
|
},
|
|
"remaining": {
|
|
"type": "integer",
|
|
"description": "What the account can still spend: always `plan_remaining` + `offer_remaining` + `extra_credits`. At `0` the next request is refused with `422`.",
|
|
"x-description-pt": "O que a conta ainda pode gastar: é sempre `plan_remaining` + `offer_remaining` + `extra_credits`. A `0`, o pedido seguinte é recusado com `422`."
|
|
},
|
|
"plan_remaining": {
|
|
"type": "integer",
|
|
"description": "What is left of the plan alone.",
|
|
"x-description-pt": "O que falta do plano, só dele."
|
|
},
|
|
"offer_remaining": {
|
|
"type": "integer",
|
|
"description": "What is left of the starter offer.",
|
|
"x-description-pt": "O que falta da oferta de arranque."
|
|
},
|
|
"used_pct": {
|
|
"type": "integer",
|
|
"description": "Used out of everything the account has for this month, from 0 to 100. We warn the customer by email from 80 on.",
|
|
"x-description-pt": "O gasto sobre tudo o que a conta tem para este mês, de 0 a 100. A partir de 80 avisamos o cliente por e-mail."
|
|
}
|
|
}
|
|
},
|
|
"recipients": {
|
|
"type": "object",
|
|
"properties": {
|
|
"plan": {
|
|
"type": "integer",
|
|
"description": "What the monthly plan gives, in different recipients. `0` means the account has no monthly plan and lives on the starter offer and on what it buys.",
|
|
"x-description-pt": "O que o plano do mês dá, em destinatários diferentes. `0` quer dizer que a conta não tem plano mensal e vive da oferta de arranque e do que comprar."
|
|
},
|
|
"used": {
|
|
"type": "integer",
|
|
"description": "Used so far this month.",
|
|
"x-description-pt": "Gastos até agora neste mês."
|
|
},
|
|
"remaining": {
|
|
"type": "integer",
|
|
"description": "What the account can still spend: always `plan_remaining` + `offer_remaining` + `extra_credits`. At `0` the next request is refused with `422`.",
|
|
"x-description-pt": "O que a conta ainda pode gastar: é sempre `plan_remaining` + `offer_remaining` + `extra_credits`. A `0`, o pedido seguinte é recusado com `422`."
|
|
},
|
|
"plan_remaining": {
|
|
"type": "integer",
|
|
"description": "What is left of the plan alone.",
|
|
"x-description-pt": "O que falta do plano, só dele."
|
|
},
|
|
"offer_remaining": {
|
|
"type": "integer",
|
|
"description": "What is left of the starter offer.",
|
|
"x-description-pt": "O que falta da oferta de arranque."
|
|
},
|
|
"used_pct": {
|
|
"type": "integer",
|
|
"description": "Used out of everything the account has for this month, from 0 to 100. We warn the customer by email from 80 on.",
|
|
"x-description-pt": "O gasto sobre tudo o que a conta tem para este mês, de 0 a 100. A partir de 80 avisamos o cliente por e-mail."
|
|
}
|
|
}
|
|
},
|
|
"extra_credits": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "The emails you bought, counted in both limits and spent only after the plan and the offer. It is `balance`, whole.",
|
|
"x-description-pt": "Os e-mails que comprou, que contam nos dois limites e só se gastam depois do plano e da oferta. É o `balance`, inteiro."
|
|
}
|
|
}
|
|
},
|
|
"starter_offer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"given": {
|
|
"type": "boolean",
|
|
"description": "`true` once the starter offer has been given. It is given once in the life of the account, when E-mail Center is turned on, and never comes back.",
|
|
"x-description-pt": "`true` depois de a oferta de arranque ter sido dada. Dá-se uma vez na vida da conta, ao activar o E-mail Center, e não volta."
|
|
},
|
|
"emails_remaining": {
|
|
"type": "integer"
|
|
},
|
|
"recipients_remaining": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailStatsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "integer"
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits_spent": {
|
|
"type": "number"
|
|
},
|
|
"by_status": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"events": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"delivery_rate": {
|
|
"type": "number"
|
|
},
|
|
"bounce_rate": {
|
|
"type": "number"
|
|
},
|
|
"complaint_rate": {
|
|
"type": "number"
|
|
},
|
|
"by_day": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"failed"
|
|
]
|
|
},
|
|
"mail_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_checked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"failed"
|
|
]
|
|
},
|
|
"mail_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_checked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dns_records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CNAME",
|
|
"TXT",
|
|
"MX"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"purpose": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dkim",
|
|
"spf",
|
|
"dmarc",
|
|
"mail_from"
|
|
]
|
|
},
|
|
"required": {
|
|
"type": "boolean"
|
|
},
|
|
"found": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test_mode_accepted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"failed"
|
|
]
|
|
},
|
|
"mail_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_checked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dns_records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CNAME",
|
|
"TXT",
|
|
"MX"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"purpose": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dkim",
|
|
"spf",
|
|
"dmarc",
|
|
"mail_from"
|
|
]
|
|
},
|
|
"required": {
|
|
"type": "boolean"
|
|
},
|
|
"found": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test_mode_accepted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainVerifyResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"failed"
|
|
]
|
|
},
|
|
"mail_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_checked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dns_records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CNAME",
|
|
"TXT",
|
|
"MX"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"purpose": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dkim",
|
|
"spf",
|
|
"dmarc",
|
|
"mail_from"
|
|
]
|
|
},
|
|
"required": {
|
|
"type": "boolean"
|
|
},
|
|
"found": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test_mode_accepted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailDomainMailFromResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"verified",
|
|
"failed"
|
|
]
|
|
},
|
|
"mail_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"verified_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_checked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"dns_records": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"CNAME",
|
|
"TXT",
|
|
"MX"
|
|
]
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"value": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"purpose": {
|
|
"type": "string",
|
|
"enum": [
|
|
"dkim",
|
|
"spf",
|
|
"dmarc",
|
|
"mail_from"
|
|
]
|
|
},
|
|
"required": {
|
|
"type": "boolean"
|
|
},
|
|
"found": {
|
|
"type": [
|
|
"boolean",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"test_mode_accepted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailTemplatesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"variables": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailTemplateCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"variables": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailTemplateGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"variables": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailTemplateUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"html": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"variables": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailTemplateDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailSuppressionsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"bounce",
|
|
"complaint",
|
|
"manual"
|
|
]
|
|
},
|
|
"note": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailSuppressionCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"enum": [
|
|
"bounce",
|
|
"complaint",
|
|
"manual"
|
|
]
|
|
},
|
|
"note": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"already_listed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailSuppressionDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailWebhookGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"email.sent",
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained",
|
|
"email.failed"
|
|
]
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailWebhookSetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string",
|
|
"enum": [
|
|
"email.sent",
|
|
"email.delivered",
|
|
"email.bounced",
|
|
"email.complained",
|
|
"email.failed"
|
|
]
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailWebhookDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailWebhookTestResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delivered": {
|
|
"type": "boolean"
|
|
},
|
|
"status_code": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
]
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignGenerateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignUpdateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignSpamResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"max": {
|
|
"type": "integer"
|
|
},
|
|
"blocks_sending_at": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignSendResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
},
|
|
"stats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"sent": {
|
|
"type": "integer"
|
|
},
|
|
"delivered": {
|
|
"type": "integer"
|
|
},
|
|
"bounced": {
|
|
"type": "integer"
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"unsubscribed": {
|
|
"type": "integer"
|
|
},
|
|
"open_rate": {
|
|
"type": "number"
|
|
},
|
|
"click_rate": {
|
|
"type": "number"
|
|
},
|
|
"unsubscribe_rate": {
|
|
"type": "number"
|
|
},
|
|
"bounce_rate": {
|
|
"type": "number"
|
|
},
|
|
"by_status": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"top_links": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"clicks": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignCancelResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"campaign",
|
|
"automation"
|
|
]
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"draft",
|
|
"scheduled",
|
|
"sending",
|
|
"sent",
|
|
"cancelled",
|
|
"automation"
|
|
]
|
|
},
|
|
"subject": {
|
|
"type": "string"
|
|
},
|
|
"preheader": {
|
|
"type": "string"
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from_name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"reply_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "number"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"spam": {
|
|
"type": "object",
|
|
"properties": {
|
|
"score": {
|
|
"type": "integer"
|
|
},
|
|
"warnings": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"scheduled_for": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"blocks": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"required": [
|
|
"type"
|
|
],
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"header",
|
|
"text",
|
|
"image",
|
|
"button",
|
|
"divider",
|
|
"footer"
|
|
]
|
|
},
|
|
"title": {
|
|
"type": "string",
|
|
"description": "header",
|
|
"x-description-pt": "header"
|
|
},
|
|
"logo": {
|
|
"type": "string",
|
|
"description": "header: https image.",
|
|
"x-description-pt": "header: imagem https."
|
|
},
|
|
"color": {
|
|
"type": "string",
|
|
"description": "header and button: #rrggbb.",
|
|
"x-description-pt": "header e button: #rrggbb."
|
|
},
|
|
"text": {
|
|
"type": "string",
|
|
"description": "text (blank line between paragraphs, **bold**, [link](https://...)), button, footer.",
|
|
"x-description-pt": "text (linha em branco entre parágrafos, **negrito**, [ligação](https://...)), button, footer."
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "image (https) and button.",
|
|
"x-description-pt": "image (https) e button."
|
|
},
|
|
"alt": {
|
|
"type": "string"
|
|
},
|
|
"link": {
|
|
"type": "string",
|
|
"description": "image: where a click goes.",
|
|
"x-description-pt": "image: para onde vai o clique."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"target": {
|
|
"type": "object",
|
|
"properties": {
|
|
"groups": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
},
|
|
"description": "Contact group ids; empty means all contacts.",
|
|
"x-description-pt": "Ids dos grupos; vazio quer dizer todos os contactos."
|
|
},
|
|
"opened": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no: opened any campaign before.",
|
|
"x-description-pt": "yes ou no: já abriu alguma campanha."
|
|
},
|
|
"clicked": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "yes or no.",
|
|
"x-description-pt": "yes ou no."
|
|
},
|
|
"joined_from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
},
|
|
"joined_to": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "YYYY-MM-DD.",
|
|
"x-description-pt": "AAAA-MM-DD."
|
|
}
|
|
}
|
|
},
|
|
"credits_returned": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignStatsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"sent": {
|
|
"type": "integer"
|
|
},
|
|
"delivered": {
|
|
"type": "integer"
|
|
},
|
|
"bounced": {
|
|
"type": "integer"
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"unsubscribed": {
|
|
"type": "integer"
|
|
},
|
|
"open_rate": {
|
|
"type": "number"
|
|
},
|
|
"click_rate": {
|
|
"type": "number"
|
|
},
|
|
"unsubscribe_rate": {
|
|
"type": "number"
|
|
},
|
|
"bounce_rate": {
|
|
"type": "number"
|
|
},
|
|
"by_status": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"top_links": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"clicks": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCampaignRecipientsResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"opened_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"opens": {
|
|
"type": "integer"
|
|
},
|
|
"clicked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"clicks": {
|
|
"type": "integer"
|
|
},
|
|
"unsubscribed_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"bounced_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailContactsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"company": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms_contact",
|
|
"email_contact"
|
|
]
|
|
},
|
|
"subscription": {
|
|
"type": "string",
|
|
"enum": [
|
|
"subscribed",
|
|
"unsubscribed",
|
|
"suppressed"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailContactCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"company": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms_contact",
|
|
"email_contact"
|
|
]
|
|
},
|
|
"subscription": {
|
|
"type": "string",
|
|
"enum": [
|
|
"subscribed",
|
|
"unsubscribed",
|
|
"suppressed"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"created": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailContactGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"company": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"source": {
|
|
"type": "string",
|
|
"enum": [
|
|
"sms_contact",
|
|
"email_contact"
|
|
]
|
|
},
|
|
"subscription": {
|
|
"type": "string",
|
|
"enum": [
|
|
"subscribed",
|
|
"unsubscribed",
|
|
"suppressed"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"campaigns": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"campaign_id": {
|
|
"type": "integer"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"opened": {
|
|
"type": "boolean"
|
|
},
|
|
"clicked": {
|
|
"type": "boolean"
|
|
},
|
|
"unsubscribed": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailContactSubscriptionResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"subscription": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailGroupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"contacts": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailFormsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Whether the form is accepting sign-ups.",
|
|
"x-description-pt": "Se o formulário está a aceitar inscrições."
|
|
},
|
|
"fields": {
|
|
"type": "object",
|
|
"description": "What the form asks for: each field is `required`, `optional` or `off`.",
|
|
"x-description-pt": "O que o formulário pede: cada campo é `required` (obrigatório), `optional` (opcional) ou `off` (não aparece).",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string",
|
|
"enum": [
|
|
"required",
|
|
"optional",
|
|
"off"
|
|
],
|
|
"description": "The email address.",
|
|
"x-description-pt": "O endereço de e-mail."
|
|
},
|
|
"phone": {
|
|
"type": "string",
|
|
"enum": [
|
|
"required",
|
|
"optional",
|
|
"off"
|
|
],
|
|
"description": "The phone number.",
|
|
"x-description-pt": "O número de telefone."
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"enum": [
|
|
"required",
|
|
"optional",
|
|
"off"
|
|
],
|
|
"description": "The name.",
|
|
"x-description-pt": "O nome."
|
|
}
|
|
}
|
|
},
|
|
"group_id": {
|
|
"type": "integer",
|
|
"description": "The contact group that confirmed sign-ups join (see GET /v1/email/groups).",
|
|
"x-description-pt": "O grupo de contactos em que entram as inscrições confirmadas (veja GET /v1/email/groups)."
|
|
},
|
|
"sites": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "The sites where the form may be embedded, as host names; subdomains are included. Empty means any site.",
|
|
"x-description-pt": "Os sites em que o formulário pode ser incorporado, pelo nome; os subdomínios também valem. Vazio quer dizer qualquer site."
|
|
},
|
|
"page_url": {
|
|
"type": "string",
|
|
"description": "The direct link: a page with the form, to share where there is no site to embed it in.",
|
|
"x-description-pt": "A ligação directa: uma página com o formulário, para partilhar onde não há site em que o incorporar."
|
|
},
|
|
"embed_code": {
|
|
"type": "string",
|
|
"description": "The HTML to paste into the site, where the form should appear.",
|
|
"x-description-pt": "O HTML a colar no site, no sítio em que o formulário deve aparecer."
|
|
},
|
|
"signups": {
|
|
"type": "object",
|
|
"properties": {
|
|
"pending": {
|
|
"type": "integer",
|
|
"description": "Waiting for the confirmation.",
|
|
"x-description-pt": "À espera da confirmação."
|
|
},
|
|
"confirmed": {
|
|
"type": "integer"
|
|
},
|
|
"expired": {
|
|
"type": "integer",
|
|
"description": "Not confirmed in time.",
|
|
"x-description-pt": "Não confirmadas a tempo."
|
|
},
|
|
"confirmation_rate": {
|
|
"type": "number",
|
|
"description": "Confirmed sign-ups as a percentage of all of them.",
|
|
"x-description-pt": "As inscrições confirmadas, em percentagem do total."
|
|
}
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailFormSignupsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"pending",
|
|
"confirmed",
|
|
"expired"
|
|
]
|
|
},
|
|
"email": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Masked (`r***@example.org`) until the sign-up is confirmed; `null` if the person gave no email address, or after the data of an expired sign-up is erased.",
|
|
"x-description-pt": "Mascarado (`r***@example.org`) até a inscrição ser confirmada; `null` se a pessoa não deu e-mail, ou depois de apagados os dados de uma inscrição expirada."
|
|
},
|
|
"phone": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "With the country code. Masked, with only the first and the last digits, until the sign-up is confirmed; `null` if the person gave no phone number, or after the data of an expired sign-up is erased.",
|
|
"x-description-pt": "Com o indicativo do país. Mascarado, só com os primeiros e os últimos algarismos, até a inscrição ser confirmada; `null` se a pessoa não deu telefone, ou depois de apagados os dados de uma inscrição expirada."
|
|
},
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Only in confirmed sign-ups, when the person gave it.",
|
|
"x-description-pt": "Só nas inscrições confirmadas, quando a pessoa o deu."
|
|
},
|
|
"confirmation_channel": {
|
|
"type": "string",
|
|
"enum": [
|
|
"email",
|
|
"sms"
|
|
],
|
|
"description": "How the confirmation was requested: `email`, or `sms` when the person gave only a phone number.",
|
|
"x-description-pt": "Por onde se pediu a confirmação: `email`, ou `sms` quando a pessoa só deu o telefone."
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"expires_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Until when the person can confirm; `null` in confirmed sign-ups.",
|
|
"x-description-pt": "Até quando a pessoa pode confirmar; `null` nas inscrições confirmadas."
|
|
},
|
|
"confirmed_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Proof of consent: when the person confirmed.",
|
|
"x-description-pt": "Prova do consentimento: quando a pessoa confirmou."
|
|
},
|
|
"confirmation_ip": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Proof of consent: the IP address the confirmation came from.",
|
|
"x-description-pt": "Prova do consentimento: o endereço IP de onde veio a confirmação."
|
|
},
|
|
"consent_text": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "Proof of consent: the text the person accepted, as it was in the form at that moment.",
|
|
"x-description-pt": "Prova do consentimento: o texto que a pessoa aceitou, como estava no formulário nesse momento."
|
|
},
|
|
"simulated": {
|
|
"type": "boolean",
|
|
"description": "`true` when the confirmation message was only simulated (test mode).",
|
|
"x-description-pt": "`true` quando a mensagem de confirmação foi só simulada (modo de teste)."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutomationsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"goal": {
|
|
"type": "string",
|
|
"enum": [
|
|
"welcome_series",
|
|
"form_signup",
|
|
"resend_unopened",
|
|
"follow_up_opened",
|
|
"win_back",
|
|
"contact_date"
|
|
],
|
|
"description": "What the automation is for: `welcome_series` (whoever joins a contact group), `form_signup` (whoever confirms a sign-up on one of your forms), `resend_unopened` (whoever did not open a campaign gets it again), `follow_up_opened` (whoever opened a campaign but clicked nothing), `win_back` (whoever falls into the inactive segment) and `contact_date` (the birthday or other date of the contact, every year).",
|
|
"x-description-pt": "Para que serve a automação: `welcome_series` (quem entra num grupo de contactos), `form_signup` (quem confirma a inscrição num dos seus formulários), `resend_unopened` (quem não abriu uma campanha recebe-a outra vez), `follow_up_opened` (quem abriu uma campanha mas não clicou em nada), `win_back` (quem entra no segmento dos inactivos) e `contact_date` (o aniversário ou outra data do contacto, todos os anos)."
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Your switch: `false` and the automation sends nothing.",
|
|
"x-description-pt": "O seu interruptor: a `false` a automação não manda nada."
|
|
},
|
|
"sending_paused": {
|
|
"type": "boolean",
|
|
"description": "`true` while we hold every automation of every account for a moment, which happens when something is being looked at. Nothing is lost: what is waiting goes out when they run again, and your `enabled` stays as it is.",
|
|
"x-description-pt": "`true` enquanto travamos as automações de todas as contas por uns momentos, o que acontece quando se está a ver alguma coisa. Nada se perde: o que estiver à espera sai quando voltarem a correr, e o seu `enabled` fica como está."
|
|
},
|
|
"trigger": {
|
|
"type": "object",
|
|
"description": "What sets the automation off. The fields depend on `type`.",
|
|
"x-description-pt": "O que dispara a automação. Os campos dependem do `type`.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"group",
|
|
"form",
|
|
"campaign",
|
|
"segment",
|
|
"contact_date"
|
|
],
|
|
"description": "Where the trigger comes from.",
|
|
"x-description-pt": "De onde vem o gatilho."
|
|
},
|
|
"group_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`group` only: the contact group to join (see GET /v1/email/groups).",
|
|
"x-description-pt": "Só no `group`: o grupo de contactos em que se entra (veja GET /v1/email/groups)."
|
|
},
|
|
"form_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`form` only: the subscription form (see GET /v1/email/forms).",
|
|
"x-description-pt": "Só no `form`: o formulário de subscrição (veja GET /v1/email/forms)."
|
|
},
|
|
"campaign_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: the campaign that was sent (see GET /v1/email/campaigns).",
|
|
"x-description-pt": "Só no `campaign`: a campanha que foi enviada (veja GET /v1/email/campaigns)."
|
|
},
|
|
"after_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: how many days after the original send the email goes out.",
|
|
"x-description-pt": "Só no `campaign`: quantos dias depois do envio original sai o e-mail."
|
|
},
|
|
"segment": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: the ready-made segment, `inactive`.",
|
|
"x-description-pt": "Só no `segment`: o segmento pronto, `inactive`."
|
|
},
|
|
"inactive_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: how long without opening anything counts as inactive.",
|
|
"x-description-pt": "Só no `segment`: quanto tempo sem abrir nada conta como inactivo."
|
|
},
|
|
"days_before": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`contact_date` only: how many days before the date the email goes out; `0` is on the day itself.",
|
|
"x-description-pt": "Só no `contact_date`: quantos dias antes da data sai o e-mail; `0` é no próprio dia."
|
|
}
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "integer",
|
|
"description": "How many emails the series has.",
|
|
"x-description-pt": "Quantos e-mails tem a série."
|
|
},
|
|
"stats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sent": {
|
|
"type": "integer",
|
|
"description": "Emails that went out, from the first day.",
|
|
"x-description-pt": "E-mails que saíram, desde o primeiro dia."
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"sent_last_hour": {
|
|
"type": "integer",
|
|
"description": "Emails in the last hour, which is what `hourly_cap` limits. In the first hour of a new automation it also counts the contacts that were already in the group, which are marked as done so that they do not get the whole history at once.",
|
|
"x-description-pt": "E-mails na última hora, que é o que o `hourly_cap` limita. Na primeira hora de uma automação nova também conta os contactos que já estavam no grupo, que ficam marcados como feitos para não levarem com o histórico todo de uma vez."
|
|
}
|
|
}
|
|
},
|
|
"hourly_cap": {
|
|
"type": "integer",
|
|
"description": "The most emails this automation sends in one hour. What goes over it is not lost: it goes out in the next hour.",
|
|
"x-description-pt": "O máximo de e-mails que esta automação manda numa hora. O que passa daí não se perde: sai na hora seguinte."
|
|
},
|
|
"alert": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"description": "Set when the automation sent a lot in one hour, in the last day. Check that this is what you want: if it is not, turn it off.",
|
|
"x-description-pt": "Vem preenchido quando a automação mandou muito numa hora, no último dia. Confirme que é isso que quer: se não for, desligue-a.",
|
|
"properties": {
|
|
"emails_last_hour": {
|
|
"type": "integer"
|
|
},
|
|
"at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"last_run_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutomationResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"goal": {
|
|
"type": "string",
|
|
"enum": [
|
|
"welcome_series",
|
|
"form_signup",
|
|
"resend_unopened",
|
|
"follow_up_opened",
|
|
"win_back",
|
|
"contact_date"
|
|
],
|
|
"description": "What the automation is for: `welcome_series` (whoever joins a contact group), `form_signup` (whoever confirms a sign-up on one of your forms), `resend_unopened` (whoever did not open a campaign gets it again), `follow_up_opened` (whoever opened a campaign but clicked nothing), `win_back` (whoever falls into the inactive segment) and `contact_date` (the birthday or other date of the contact, every year).",
|
|
"x-description-pt": "Para que serve a automação: `welcome_series` (quem entra num grupo de contactos), `form_signup` (quem confirma a inscrição num dos seus formulários), `resend_unopened` (quem não abriu uma campanha recebe-a outra vez), `follow_up_opened` (quem abriu uma campanha mas não clicou em nada), `win_back` (quem entra no segmento dos inactivos) e `contact_date` (o aniversário ou outra data do contacto, todos os anos)."
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Your switch: `false` and the automation sends nothing.",
|
|
"x-description-pt": "O seu interruptor: a `false` a automação não manda nada."
|
|
},
|
|
"sending_paused": {
|
|
"type": "boolean",
|
|
"description": "`true` while we hold every automation of every account for a moment, which happens when something is being looked at. Nothing is lost: what is waiting goes out when they run again, and your `enabled` stays as it is.",
|
|
"x-description-pt": "`true` enquanto travamos as automações de todas as contas por uns momentos, o que acontece quando se está a ver alguma coisa. Nada se perde: o que estiver à espera sai quando voltarem a correr, e o seu `enabled` fica como está."
|
|
},
|
|
"trigger": {
|
|
"type": "object",
|
|
"description": "What sets the automation off. The fields depend on `type`.",
|
|
"x-description-pt": "O que dispara a automação. Os campos dependem do `type`.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"group",
|
|
"form",
|
|
"campaign",
|
|
"segment",
|
|
"contact_date"
|
|
],
|
|
"description": "Where the trigger comes from.",
|
|
"x-description-pt": "De onde vem o gatilho."
|
|
},
|
|
"group_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`group` only: the contact group to join (see GET /v1/email/groups).",
|
|
"x-description-pt": "Só no `group`: o grupo de contactos em que se entra (veja GET /v1/email/groups)."
|
|
},
|
|
"form_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`form` only: the subscription form (see GET /v1/email/forms).",
|
|
"x-description-pt": "Só no `form`: o formulário de subscrição (veja GET /v1/email/forms)."
|
|
},
|
|
"campaign_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: the campaign that was sent (see GET /v1/email/campaigns).",
|
|
"x-description-pt": "Só no `campaign`: a campanha que foi enviada (veja GET /v1/email/campaigns)."
|
|
},
|
|
"after_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: how many days after the original send the email goes out.",
|
|
"x-description-pt": "Só no `campaign`: quantos dias depois do envio original sai o e-mail."
|
|
},
|
|
"segment": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: the ready-made segment, `inactive`.",
|
|
"x-description-pt": "Só no `segment`: o segmento pronto, `inactive`."
|
|
},
|
|
"inactive_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: how long without opening anything counts as inactive.",
|
|
"x-description-pt": "Só no `segment`: quanto tempo sem abrir nada conta como inactivo."
|
|
},
|
|
"days_before": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`contact_date` only: how many days before the date the email goes out; `0` is on the day itself.",
|
|
"x-description-pt": "Só no `contact_date`: quantos dias antes da data sai o e-mail; `0` é no próprio dia."
|
|
}
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "integer",
|
|
"description": "How many emails the series has.",
|
|
"x-description-pt": "Quantos e-mails tem a série."
|
|
},
|
|
"stats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sent": {
|
|
"type": "integer",
|
|
"description": "Emails that went out, from the first day.",
|
|
"x-description-pt": "E-mails que saíram, desde o primeiro dia."
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"sent_last_hour": {
|
|
"type": "integer",
|
|
"description": "Emails in the last hour, which is what `hourly_cap` limits. In the first hour of a new automation it also counts the contacts that were already in the group, which are marked as done so that they do not get the whole history at once.",
|
|
"x-description-pt": "E-mails na última hora, que é o que o `hourly_cap` limita. Na primeira hora de uma automação nova também conta os contactos que já estavam no grupo, que ficam marcados como feitos para não levarem com o histórico todo de uma vez."
|
|
}
|
|
}
|
|
},
|
|
"hourly_cap": {
|
|
"type": "integer",
|
|
"description": "The most emails this automation sends in one hour. What goes over it is not lost: it goes out in the next hour.",
|
|
"x-description-pt": "O máximo de e-mails que esta automação manda numa hora. O que passa daí não se perde: sai na hora seguinte."
|
|
},
|
|
"alert": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"description": "Set when the automation sent a lot in one hour, in the last day. Check that this is what you want: if it is not, turn it off.",
|
|
"x-description-pt": "Vem preenchido quando a automação mandou muito numa hora, no último dia. Confirme que é isso que quer: se não for, desligue-a.",
|
|
"properties": {
|
|
"emails_last_hour": {
|
|
"type": "integer"
|
|
},
|
|
"at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"last_run_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"limits": {
|
|
"type": "object",
|
|
"properties": {
|
|
"hourly_per_automation": {
|
|
"type": "integer"
|
|
},
|
|
"hourly_per_account": {
|
|
"type": "integer",
|
|
"description": "For all the automations of the account together.",
|
|
"x-description-pt": "Para todas as automações da conta juntas."
|
|
},
|
|
"daily_per_contact": {
|
|
"type": "integer",
|
|
"description": "Automation emails one person gets in a day, whichever automation they come from. This is what closes the door on loops.",
|
|
"x-description-pt": "E-mails de automação que uma pessoa recebe num dia, venha a automação que vier. É este que fecha a porta aos ciclos."
|
|
}
|
|
}
|
|
},
|
|
"emails": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"order": {
|
|
"type": "integer",
|
|
"description": "`1` is the first email, right after the trigger.",
|
|
"x-description-pt": "`1` é o primeiro e-mail, logo a seguir ao gatilho."
|
|
},
|
|
"campaign_id": {
|
|
"type": "integer",
|
|
"description": "The campaign that holds the content of this email (see GET /v1/email/campaigns/{id}).",
|
|
"x-description-pt": "A campanha que tem o conteúdo deste e-mail (veja GET /v1/email/campaigns/{id})."
|
|
},
|
|
"subject": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"from": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"wait_hours": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "How long after the previous email it goes out; `null` on the first one.",
|
|
"x-description-pt": "Quanto tempo depois do e-mail anterior é que sai; `null` no primeiro."
|
|
},
|
|
"sent": {
|
|
"type": "integer",
|
|
"description": "Emails of this step that went out.",
|
|
"x-description-pt": "E-mails deste passo que saíram."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutomationActivityListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"email": {
|
|
"type": "string"
|
|
},
|
|
"step": {
|
|
"type": "integer",
|
|
"description": "Which email of the series this was.",
|
|
"x-description-pt": "Qual o e-mail da série que isto foi."
|
|
},
|
|
"campaign_id": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"queued",
|
|
"sending",
|
|
"sent",
|
|
"simulated",
|
|
"failed",
|
|
"suppressed",
|
|
"cancelled"
|
|
],
|
|
"description": "What happened to this email.",
|
|
"x-description-pt": "O que aconteceu a este e-mail."
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"sent_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"opened_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"opens": {
|
|
"type": "integer"
|
|
},
|
|
"clicked_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"clicks": {
|
|
"type": "integer"
|
|
},
|
|
"unsubscribed_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"bounced_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutomationEnableResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"goal": {
|
|
"type": "string",
|
|
"enum": [
|
|
"welcome_series",
|
|
"form_signup",
|
|
"resend_unopened",
|
|
"follow_up_opened",
|
|
"win_back",
|
|
"contact_date"
|
|
],
|
|
"description": "What the automation is for: `welcome_series` (whoever joins a contact group), `form_signup` (whoever confirms a sign-up on one of your forms), `resend_unopened` (whoever did not open a campaign gets it again), `follow_up_opened` (whoever opened a campaign but clicked nothing), `win_back` (whoever falls into the inactive segment) and `contact_date` (the birthday or other date of the contact, every year).",
|
|
"x-description-pt": "Para que serve a automação: `welcome_series` (quem entra num grupo de contactos), `form_signup` (quem confirma a inscrição num dos seus formulários), `resend_unopened` (quem não abriu uma campanha recebe-a outra vez), `follow_up_opened` (quem abriu uma campanha mas não clicou em nada), `win_back` (quem entra no segmento dos inactivos) e `contact_date` (o aniversário ou outra data do contacto, todos os anos)."
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Your switch: `false` and the automation sends nothing.",
|
|
"x-description-pt": "O seu interruptor: a `false` a automação não manda nada."
|
|
},
|
|
"sending_paused": {
|
|
"type": "boolean",
|
|
"description": "`true` while we hold every automation of every account for a moment, which happens when something is being looked at. Nothing is lost: what is waiting goes out when they run again, and your `enabled` stays as it is.",
|
|
"x-description-pt": "`true` enquanto travamos as automações de todas as contas por uns momentos, o que acontece quando se está a ver alguma coisa. Nada se perde: o que estiver à espera sai quando voltarem a correr, e o seu `enabled` fica como está."
|
|
},
|
|
"trigger": {
|
|
"type": "object",
|
|
"description": "What sets the automation off. The fields depend on `type`.",
|
|
"x-description-pt": "O que dispara a automação. Os campos dependem do `type`.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"group",
|
|
"form",
|
|
"campaign",
|
|
"segment",
|
|
"contact_date"
|
|
],
|
|
"description": "Where the trigger comes from.",
|
|
"x-description-pt": "De onde vem o gatilho."
|
|
},
|
|
"group_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`group` only: the contact group to join (see GET /v1/email/groups).",
|
|
"x-description-pt": "Só no `group`: o grupo de contactos em que se entra (veja GET /v1/email/groups)."
|
|
},
|
|
"form_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`form` only: the subscription form (see GET /v1/email/forms).",
|
|
"x-description-pt": "Só no `form`: o formulário de subscrição (veja GET /v1/email/forms)."
|
|
},
|
|
"campaign_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: the campaign that was sent (see GET /v1/email/campaigns).",
|
|
"x-description-pt": "Só no `campaign`: a campanha que foi enviada (veja GET /v1/email/campaigns)."
|
|
},
|
|
"after_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: how many days after the original send the email goes out.",
|
|
"x-description-pt": "Só no `campaign`: quantos dias depois do envio original sai o e-mail."
|
|
},
|
|
"segment": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: the ready-made segment, `inactive`.",
|
|
"x-description-pt": "Só no `segment`: o segmento pronto, `inactive`."
|
|
},
|
|
"inactive_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: how long without opening anything counts as inactive.",
|
|
"x-description-pt": "Só no `segment`: quanto tempo sem abrir nada conta como inactivo."
|
|
},
|
|
"days_before": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`contact_date` only: how many days before the date the email goes out; `0` is on the day itself.",
|
|
"x-description-pt": "Só no `contact_date`: quantos dias antes da data sai o e-mail; `0` é no próprio dia."
|
|
}
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "integer",
|
|
"description": "How many emails the series has.",
|
|
"x-description-pt": "Quantos e-mails tem a série."
|
|
},
|
|
"stats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sent": {
|
|
"type": "integer",
|
|
"description": "Emails that went out, from the first day.",
|
|
"x-description-pt": "E-mails que saíram, desde o primeiro dia."
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"sent_last_hour": {
|
|
"type": "integer",
|
|
"description": "Emails in the last hour, which is what `hourly_cap` limits. In the first hour of a new automation it also counts the contacts that were already in the group, which are marked as done so that they do not get the whole history at once.",
|
|
"x-description-pt": "E-mails na última hora, que é o que o `hourly_cap` limita. Na primeira hora de uma automação nova também conta os contactos que já estavam no grupo, que ficam marcados como feitos para não levarem com o histórico todo de uma vez."
|
|
}
|
|
}
|
|
},
|
|
"hourly_cap": {
|
|
"type": "integer",
|
|
"description": "The most emails this automation sends in one hour. What goes over it is not lost: it goes out in the next hour.",
|
|
"x-description-pt": "O máximo de e-mails que esta automação manda numa hora. O que passa daí não se perde: sai na hora seguinte."
|
|
},
|
|
"alert": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"description": "Set when the automation sent a lot in one hour, in the last day. Check that this is what you want: if it is not, turn it off.",
|
|
"x-description-pt": "Vem preenchido quando a automação mandou muito numa hora, no último dia. Confirme que é isso que quer: se não for, desligue-a.",
|
|
"properties": {
|
|
"emails_last_hour": {
|
|
"type": "integer"
|
|
},
|
|
"at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"last_run_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean",
|
|
"description": "`true` in test mode, where nothing is saved.",
|
|
"x-description-pt": "`true` em modo de teste, em que nada se grava."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailAutomationDisableResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"goal": {
|
|
"type": "string",
|
|
"enum": [
|
|
"welcome_series",
|
|
"form_signup",
|
|
"resend_unopened",
|
|
"follow_up_opened",
|
|
"win_back",
|
|
"contact_date"
|
|
],
|
|
"description": "What the automation is for: `welcome_series` (whoever joins a contact group), `form_signup` (whoever confirms a sign-up on one of your forms), `resend_unopened` (whoever did not open a campaign gets it again), `follow_up_opened` (whoever opened a campaign but clicked nothing), `win_back` (whoever falls into the inactive segment) and `contact_date` (the birthday or other date of the contact, every year).",
|
|
"x-description-pt": "Para que serve a automação: `welcome_series` (quem entra num grupo de contactos), `form_signup` (quem confirma a inscrição num dos seus formulários), `resend_unopened` (quem não abriu uma campanha recebe-a outra vez), `follow_up_opened` (quem abriu uma campanha mas não clicou em nada), `win_back` (quem entra no segmento dos inactivos) e `contact_date` (o aniversário ou outra data do contacto, todos os anos)."
|
|
},
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "Your switch: `false` and the automation sends nothing.",
|
|
"x-description-pt": "O seu interruptor: a `false` a automação não manda nada."
|
|
},
|
|
"sending_paused": {
|
|
"type": "boolean",
|
|
"description": "`true` while we hold every automation of every account for a moment, which happens when something is being looked at. Nothing is lost: what is waiting goes out when they run again, and your `enabled` stays as it is.",
|
|
"x-description-pt": "`true` enquanto travamos as automações de todas as contas por uns momentos, o que acontece quando se está a ver alguma coisa. Nada se perde: o que estiver à espera sai quando voltarem a correr, e o seu `enabled` fica como está."
|
|
},
|
|
"trigger": {
|
|
"type": "object",
|
|
"description": "What sets the automation off. The fields depend on `type`.",
|
|
"x-description-pt": "O que dispara a automação. Os campos dependem do `type`.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"group",
|
|
"form",
|
|
"campaign",
|
|
"segment",
|
|
"contact_date"
|
|
],
|
|
"description": "Where the trigger comes from.",
|
|
"x-description-pt": "De onde vem o gatilho."
|
|
},
|
|
"group_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`group` only: the contact group to join (see GET /v1/email/groups).",
|
|
"x-description-pt": "Só no `group`: o grupo de contactos em que se entra (veja GET /v1/email/groups)."
|
|
},
|
|
"form_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`form` only: the subscription form (see GET /v1/email/forms).",
|
|
"x-description-pt": "Só no `form`: o formulário de subscrição (veja GET /v1/email/forms)."
|
|
},
|
|
"campaign_id": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: the campaign that was sent (see GET /v1/email/campaigns).",
|
|
"x-description-pt": "Só no `campaign`: a campanha que foi enviada (veja GET /v1/email/campaigns)."
|
|
},
|
|
"after_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`campaign` only: how many days after the original send the email goes out.",
|
|
"x-description-pt": "Só no `campaign`: quantos dias depois do envio original sai o e-mail."
|
|
},
|
|
"segment": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: the ready-made segment, `inactive`.",
|
|
"x-description-pt": "Só no `segment`: o segmento pronto, `inactive`."
|
|
},
|
|
"inactive_days": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`segment` only: how long without opening anything counts as inactive.",
|
|
"x-description-pt": "Só no `segment`: quanto tempo sem abrir nada conta como inactivo."
|
|
},
|
|
"days_before": {
|
|
"type": [
|
|
"integer",
|
|
"null"
|
|
],
|
|
"description": "`contact_date` only: how many days before the date the email goes out; `0` is on the day itself.",
|
|
"x-description-pt": "Só no `contact_date`: quantos dias antes da data sai o e-mail; `0` é no próprio dia."
|
|
}
|
|
}
|
|
},
|
|
"steps": {
|
|
"type": "integer",
|
|
"description": "How many emails the series has.",
|
|
"x-description-pt": "Quantos e-mails tem a série."
|
|
},
|
|
"stats": {
|
|
"type": "object",
|
|
"properties": {
|
|
"sent": {
|
|
"type": "integer",
|
|
"description": "Emails that went out, from the first day.",
|
|
"x-description-pt": "E-mails que saíram, desde o primeiro dia."
|
|
},
|
|
"opened": {
|
|
"type": "integer"
|
|
},
|
|
"clicked": {
|
|
"type": "integer"
|
|
},
|
|
"sent_last_hour": {
|
|
"type": "integer",
|
|
"description": "Emails in the last hour, which is what `hourly_cap` limits. In the first hour of a new automation it also counts the contacts that were already in the group, which are marked as done so that they do not get the whole history at once.",
|
|
"x-description-pt": "E-mails na última hora, que é o que o `hourly_cap` limita. Na primeira hora de uma automação nova também conta os contactos que já estavam no grupo, que ficam marcados como feitos para não levarem com o histórico todo de uma vez."
|
|
}
|
|
}
|
|
},
|
|
"hourly_cap": {
|
|
"type": "integer",
|
|
"description": "The most emails this automation sends in one hour. What goes over it is not lost: it goes out in the next hour.",
|
|
"x-description-pt": "O máximo de e-mails que esta automação manda numa hora. O que passa daí não se perde: sai na hora seguinte."
|
|
},
|
|
"alert": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"description": "Set when the automation sent a lot in one hour, in the last day. Check that this is what you want: if it is not, turn it off.",
|
|
"x-description-pt": "Vem preenchido quando a automação mandou muito numa hora, no último dia. Confirme que é isso que quer: se não for, desligue-a.",
|
|
"properties": {
|
|
"emails_last_hour": {
|
|
"type": "integer"
|
|
},
|
|
"at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"last_run_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"simulated": {
|
|
"type": "boolean",
|
|
"description": "`true` in test mode, where nothing is saved.",
|
|
"x-description-pt": "`true` em modo de teste, em que nada se grava."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailRelayResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean",
|
|
"description": "`false` while the SMTP server is still being brought up. You can already create the credentials in the account dashboard: they start working when the server is up. Until then, send with POST /v1/email/messages.",
|
|
"x-description-pt": "`false` enquanto o servidor SMTP ainda está a ser ligado. Já pode criar as credenciais no painel da conta: passam a funcionar quando o servidor estiver no ar. Até lá, envie com POST /v1/email/messages."
|
|
},
|
|
"hostname": {
|
|
"type": "string",
|
|
"description": "The SMTP server to point your program at.",
|
|
"x-description-pt": "O servidor SMTP para onde aponta o seu programa."
|
|
},
|
|
"ports": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"encryption": {
|
|
"type": "string",
|
|
"enum": [
|
|
"starttls",
|
|
"tls"
|
|
],
|
|
"description": "How the connection is protected.",
|
|
"x-description-pt": "Como se protege a ligação."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"limits": {
|
|
"type": "object",
|
|
"properties": {
|
|
"max_message_size_kb": {
|
|
"type": "integer"
|
|
},
|
|
"max_recipients_per_message": {
|
|
"type": "integer"
|
|
},
|
|
"max_credentials": {
|
|
"type": "integer",
|
|
"description": "Active credentials the account may have at the same time.",
|
|
"x-description-pt": "Credenciais activas que a conta pode ter ao mesmo tempo."
|
|
}
|
|
}
|
|
},
|
|
"credentials": {
|
|
"type": "object",
|
|
"properties": {
|
|
"active": {
|
|
"type": "integer"
|
|
},
|
|
"revoked": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"description": "What went out through the relay in the last 30 days. Emails sent with POST /v1/email/messages are not counted here: see GET /v1/email/stats for all of them together.",
|
|
"x-description-pt": "O que saiu pelo relay nos últimos 30 dias. Os e-mails enviados com POST /v1/email/messages não contam aqui: veja GET /v1/email/stats para todos juntos.",
|
|
"properties": {
|
|
"from": {
|
|
"type": "string"
|
|
},
|
|
"to": {
|
|
"type": "string"
|
|
},
|
|
"messages": {
|
|
"type": "integer"
|
|
},
|
|
"recipients": {
|
|
"type": "integer"
|
|
},
|
|
"credits_spent": {
|
|
"type": "number"
|
|
},
|
|
"last_message_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailRelayCredentialsListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "The name you gave it, to know which program it is.",
|
|
"x-description-pt": "O nome que lhe deu, para saber de que programa é."
|
|
},
|
|
"username": {
|
|
"type": "string",
|
|
"description": "The SMTP user. The password is not here and never comes out of the API: we only keep a one-way encrypted version of it.",
|
|
"x-description-pt": "O utilizador SMTP. A senha não está aqui e nunca sai da API: guardamos apenas uma versão cifrada irreversível."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"revoked"
|
|
],
|
|
"description": "A revoked credential no longer sends and does not come back.",
|
|
"x-description-pt": "Uma credencial revogada já não envia e não volta atrás."
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"last_used_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "When something last sent with it; `null` if it was never used.",
|
|
"x-description-pt": "Quando foi a última vez que alguma coisa enviou com ela; `null` se nunca foi usada."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"AiModel": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The model id, to send in `model`. It has a slash, such as `deepseek-ai/deepseek-v4-flash`.",
|
|
"x-description-pt": "O id do modelo, a enviar em `model`. Tem uma barra, como `deepseek-ai/deepseek-v4-flash`."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "Always `model`.",
|
|
"x-description-pt": "Sempre `model`."
|
|
},
|
|
"owned_by": {
|
|
"type": "string",
|
|
"description": "Who made the model: the part of the id before the first slash.",
|
|
"x-description-pt": "Quem fez o modelo: a parte do id antes da primeira barra."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"video",
|
|
"audio",
|
|
"agent"
|
|
],
|
|
"description": "What the model produces. Only `text` models and your agents (`agent`, id `agent/<id>`) work in POST /v1/chat/completions; the others work in POST /v1/media/generations.",
|
|
"x-description-pt": "O que o modelo produz. Só os modelos `text` e os seus agentes (`agent`, id `agent/<id>`) funcionam em POST /v1/chat/completions; os outros funcionam em POST /v1/media/generations."
|
|
},
|
|
"category": {
|
|
"type": "string",
|
|
"description": "A more detailed category, such as `LLM`, `text-to-image`, `image-to-video` or `text-to-speech`.",
|
|
"x-description-pt": "Uma categoria mais detalhada, como `LLM`, `text-to-image`, `image-to-video` ou `text-to-speech`."
|
|
},
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The name to show to people.",
|
|
"x-description-pt": "O nome a mostrar às pessoas."
|
|
},
|
|
"description": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "What the model is good at. In Portuguese when there is a translation and the request asks for `pt`.",
|
|
"x-description-pt": "Para que serve o modelo. Em português quando há tradução e se pede `pt`."
|
|
},
|
|
"pricing": {
|
|
"type": "object",
|
|
"description": "The price in credits. Text models: `unit` is `1M tokens`, with `input`, `output` and `cached_input` (input read from the cache). Image, video and voice models: `unit` is `image`, `second` or `generation`, with `credits`.",
|
|
"x-description-pt": "O preço em créditos. Modelos de texto: `unit` é `1M tokens`, com `input`, `output` e `cached_input` (entrada lida da cache). Modelos de imagem, vídeo e voz: `unit` é `image`, `second` ou `generation`, com `credits`.",
|
|
"properties": {
|
|
"unit": {
|
|
"type": "string",
|
|
"enum": [
|
|
"1M tokens",
|
|
"image",
|
|
"second",
|
|
"generation"
|
|
],
|
|
"description": "What the price is counted by.",
|
|
"x-description-pt": "A unidade em que se conta o preço."
|
|
},
|
|
"input": {
|
|
"type": "number",
|
|
"description": "Text only: credits per 1 million input tokens.",
|
|
"x-description-pt": "Só no texto: créditos por 1 milhão de tokens de entrada."
|
|
},
|
|
"output": {
|
|
"type": "number",
|
|
"description": "Text only: credits per 1 million output tokens.",
|
|
"x-description-pt": "Só no texto: créditos por 1 milhão de tokens de saída."
|
|
},
|
|
"cached_input": {
|
|
"type": "number",
|
|
"description": "Text only: credits per 1 million input tokens read from the cache.",
|
|
"x-description-pt": "Só no texto: créditos por 1 milhão de tokens de entrada lidos da cache."
|
|
},
|
|
"credits": {
|
|
"type": "number",
|
|
"description": "Image, video and voice only: credits per `unit`.",
|
|
"x-description-pt": "Só nos modelos de imagem, vídeo e voz: créditos por `unit`."
|
|
}
|
|
}
|
|
},
|
|
"context_length": {
|
|
"type": "integer",
|
|
"description": "Text models and agents: the most tokens the model reads in one request (input and output together). Use it in the context window setting of coding tools.",
|
|
"x-description-pt": "Modelos de texto e agentes: o máximo de tokens que o modelo lê num pedido (entrada e saída juntas). Use-o na janela de contexto das ferramentas de programação."
|
|
},
|
|
"max_output_tokens": {
|
|
"type": "integer",
|
|
"description": "Text models and agents: the most tokens the model writes in one answer.",
|
|
"x-description-pt": "Modelos de texto e agentes: o máximo de tokens que o modelo escreve numa resposta."
|
|
},
|
|
"base_model": {
|
|
"type": "string",
|
|
"description": "Agents only: the text model the agent uses. `pricing` is the price of this model.",
|
|
"x-description-pt": "Só nos agentes: o modelo de texto que o agente usa. `pricing` é o preço deste modelo."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"paused"
|
|
],
|
|
"description": "Agents only: a `paused` agent answers `409` with `agent_paused`.",
|
|
"x-description-pt": "Só nos agentes: um agente `paused` responde `409` com `agent_paused`."
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Agents only: the tools turned on, `web_fetch` and `current_datetime`.",
|
|
"x-description-pt": "Só nos agentes: as ferramentas activas, `web_fetch` e `current_datetime`."
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"object",
|
|
"owned_by",
|
|
"type",
|
|
"pricing"
|
|
]
|
|
},
|
|
"AiModelDetail": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/components/schemas/AiModel"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"input": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string",
|
|
"description": "The field name, to use inside `input`.",
|
|
"x-description-pt": "O nome do campo, a usar dentro de `input`."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "`string`, `integer`, `number`, `boolean`, or `image`, `video` or `audio` for a field that takes a public URL of a file.",
|
|
"x-description-pt": "`string`, `integer`, `number`, `boolean`, ou `image`, `video` ou `audio` para um campo que recebe o URL público de um ficheiro."
|
|
},
|
|
"required": {
|
|
"type": "boolean"
|
|
},
|
|
"options": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {},
|
|
"description": "The accepted values, when the list is closed.",
|
|
"x-description-pt": "Os valores aceites, quando a lista é fechada."
|
|
},
|
|
"default": {
|
|
"type": "string",
|
|
"description": "The value used when the field is not sent.",
|
|
"x-description-pt": "O valor usado quando o campo não é enviado."
|
|
},
|
|
"min": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"max": {
|
|
"type": [
|
|
"number",
|
|
"null"
|
|
]
|
|
},
|
|
"description": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"description": "Image, video and voice models only: the fields that go inside `input` in POST /v1/media/generations.",
|
|
"x-description-pt": "Só nos modelos de imagem, vídeo e voz: os campos que vão dentro de `input` em POST /v1/media/generations."
|
|
}
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"AiModelsList": {
|
|
"type": "object",
|
|
"properties": {
|
|
"object": {
|
|
"type": "string",
|
|
"description": "Always `list`.",
|
|
"x-description-pt": "Sempre `list`."
|
|
},
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/components/schemas/AiModel"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"object",
|
|
"data"
|
|
]
|
|
},
|
|
"AiChatRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "A `text` model id from GET /v1/models, or `agent/<id>` to use one of your agents.",
|
|
"x-description-pt": "O id de um modelo `text` de GET /v1/models, ou `agent/<id>` para usar um dos seus agentes."
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"system",
|
|
"user",
|
|
"assistant",
|
|
"tool"
|
|
],
|
|
"description": "Who is speaking.",
|
|
"x-description-pt": "Quem fala."
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "The text of the message. It may also be a list of parts, as in the OpenAI format.",
|
|
"x-description-pt": "O texto da mensagem. Também pode ser uma lista de partes, como no formato da OpenAI."
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
]
|
|
},
|
|
"description": "The conversation, oldest first.",
|
|
"x-description-pt": "A conversa, da mais antiga para a mais recente."
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"description": "`true` to receive the answer in pieces, as server-sent events (`text/event-stream`), ending with `data: [DONE]`.",
|
|
"x-description-pt": "`true` para receber a resposta por partes, como eventos (`text/event-stream`), a acabar em `data: [DONE]`."
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer",
|
|
"description": "The most tokens the answer may have. Without it we reserve 4096. A lower value reserves fewer credits.",
|
|
"x-description-pt": "O máximo de tokens da resposta. Sem ele reservamos 4096. Um valor mais baixo reserva menos créditos."
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"description": "From 0 to 2: lower is more predictable.",
|
|
"x-description-pt": "De 0 a 2: mais baixo é mais previsível."
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"description": "Functions the model may call, in the OpenAI format.",
|
|
"x-description-pt": "Funções que o modelo pode chamar, no formato da OpenAI."
|
|
},
|
|
"stream_options": {
|
|
"type": "object",
|
|
"description": "With `stream`, send `{\"include_usage\": true}` to get the token count in the last event.",
|
|
"x-description-pt": "Com `stream`, envie `{\"include_usage\": true}` para receber a contagem de tokens no último evento."
|
|
}
|
|
},
|
|
"required": [
|
|
"model",
|
|
"messages"
|
|
],
|
|
"description": "The OpenAI chat format. Other OpenAI fields (`top_p`, `stop`, `response_format`, `tool_choice` and others) go through as they are.",
|
|
"x-description-pt": "O formato de chat da OpenAI. Os outros campos da OpenAI (`top_p`, `stop`, `response_format`, `tool_choice` e outros) passam tal como vêm."
|
|
},
|
|
"AiChatCompletion": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "`chat.completion`.",
|
|
"x-description-pt": "`chat.completion`."
|
|
},
|
|
"created": {
|
|
"type": "integer",
|
|
"description": "Unix time.",
|
|
"x-description-pt": "Hora Unix."
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"index": {
|
|
"type": "integer"
|
|
},
|
|
"message": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"tool_calls": {
|
|
"type": [
|
|
"array",
|
|
"null"
|
|
],
|
|
"items": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"finish_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`stop`, `length` (it hit `max_tokens`), `tool_calls` or `content_filter`.",
|
|
"x-description-pt": "`stop`, `length` (chegou ao `max_tokens`), `tool_calls` ou `content_filter`."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"prompt_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"completion_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"prompt_tokens_details": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cached_tokens": {
|
|
"type": "integer",
|
|
"description": "Input tokens read from the cache, charged at `cached_input`.",
|
|
"x-description-pt": "Tokens de entrada lidos da cache, cobrados ao preço de `cached_input`."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "The tokens counted. We charge by these numbers and give back the rest of the reservation.",
|
|
"x-description-pt": "Os tokens contados. Cobramos por estes números e devolvemos o resto da reserva."
|
|
}
|
|
}
|
|
},
|
|
"AiMediaRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "An `image`, `video` or `audio` model id from GET /v1/models.",
|
|
"x-description-pt": "O id de um modelo `image`, `video` ou `audio` de GET /v1/models."
|
|
},
|
|
"input": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"description": "The fields of the model, as listed in `input` of GET /v1/models/{id}. Files (images, videos, audio) go as public URLs.",
|
|
"x-description-pt": "Os campos do modelo, como vêm em `input` de GET /v1/models/{id}. Os ficheiros (imagens, vídeos, áudio) vão como URL públicos."
|
|
}
|
|
},
|
|
"required": [
|
|
"model",
|
|
"input"
|
|
]
|
|
},
|
|
"AiMediaCreated": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The id of the generation, to follow it with GET /v1/media/generations/{id}.",
|
|
"x-description-pt": "O id da geração, para a acompanhar com GET /v1/media/generations/{id}."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"processing",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"description": "`processing` while it is being made, then `completed` or `failed`.",
|
|
"x-description-pt": "`processing` enquanto está a ser gerada, depois `completed` ou `failed`."
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"credits_reserved": {
|
|
"type": "number",
|
|
"description": "Credits held for this generation. At the end we charge the real cost and give back the rest.",
|
|
"x-description-pt": "Créditos reservados para esta geração. No fim cobramos o custo real e devolvemos o resto."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"data"
|
|
]
|
|
},
|
|
"AiMediaJob": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The id of the generation, to follow it with GET /v1/media/generations/{id}.",
|
|
"x-description-pt": "O id da geração, para a acompanhar com GET /v1/media/generations/{id}."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"processing",
|
|
"completed",
|
|
"failed"
|
|
],
|
|
"description": "`processing` while it is being made, then `completed` or `failed`.",
|
|
"x-description-pt": "`processing` enquanto está a ser gerada, depois `completed` ou `failed`."
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"outputs": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "With `completed`: the links to the files made (image, video or audio). Download them and keep a copy: the links are not permanent.",
|
|
"x-description-pt": "Com `completed`: as ligações aos ficheiros gerados (imagem, vídeo ou áudio). Descarregue-os e guarde uma cópia: as ligações não são permanentes."
|
|
},
|
|
"credits_charged": {
|
|
"type": "number",
|
|
"description": "Credits charged so far: `0` while `processing`, the real cost with `completed`, and `0` with `failed` (the reservation comes back).",
|
|
"x-description-pt": "Créditos cobrados até agora: `0` em `processing`, o custo real com `completed`, e `0` com `failed` (a reserva volta ao saldo)."
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "With `failed`: the reason, in plain language.",
|
|
"x-description-pt": "Com `failed`: o motivo, em linguagem simples."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"data"
|
|
]
|
|
},
|
|
"AiBalance": {
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"credits": {
|
|
"type": "number",
|
|
"description": "The AI credits of the account, with two decimal places.",
|
|
"x-description-pt": "Os créditos de IA da conta, com duas casas decimais."
|
|
},
|
|
"currency": {
|
|
"type": "string",
|
|
"description": "Always `credits`.",
|
|
"x-description-pt": "Sempre `credits`."
|
|
},
|
|
"subscription": {
|
|
"type": "object",
|
|
"properties": {
|
|
"plan": {
|
|
"type": "string",
|
|
"description": "The plan code: `starter`, `lite`, `plus`, `max`, `ultra` or `enterprise`.",
|
|
"x-description-pt": "O código do plano: `starter`, `lite`, `plus`, `max`, `ultra` ou `enterprise`."
|
|
},
|
|
"plan_name": {
|
|
"type": "string",
|
|
"description": "The plan name.",
|
|
"x-description-pt": "O nome do plano."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"active",
|
|
"suspended",
|
|
"terminated",
|
|
"cancelled"
|
|
],
|
|
"description": "Only an `active` plan spends points.",
|
|
"x-description-pt": "Só um plano `active` gasta pontos."
|
|
},
|
|
"weekly_remaining": {
|
|
"type": "number",
|
|
"description": "Points left this week.",
|
|
"x-description-pt": "Pontos que restam esta semana."
|
|
},
|
|
"monthly_remaining": {
|
|
"type": "number",
|
|
"description": "Points left in this monthly cycle.",
|
|
"x-description-pt": "Pontos que restam neste ciclo mensal."
|
|
},
|
|
"weekly_resets_at": {
|
|
"type": "string",
|
|
"description": "When the weekly points come back: every Monday at 00:00 UTC (ISO 8601).",
|
|
"x-description-pt": "Quando voltam os pontos da semana: todas as segundas-feiras às 00:00 UTC (ISO 8601)."
|
|
},
|
|
"monthly_resets_at": {
|
|
"type": "string",
|
|
"description": "When the monthly cycle starts again, counted from the start of the subscription period (ISO 8601).",
|
|
"x-description-pt": "Quando recomeça o ciclo mensal, contado desde o início do período da assinatura (ISO 8601)."
|
|
},
|
|
"fallback_to_credits": {
|
|
"type": "boolean",
|
|
"description": "`true` (the default): when the points run out, requests go on and are paid with credits. Turn it off in the Plan tab of All in One AI.",
|
|
"x-description-pt": "`true` (por omissão): quando os pontos acabam, os pedidos continuam e pagam-se com créditos. Desligue-o na aba Plano do All in One AI."
|
|
}
|
|
},
|
|
"description": "Only with a Coding Plan: the plan and the points left. Without a plan this field does not come.",
|
|
"x-description-pt": "Só com um Coding Plan: o plano e os pontos que restam. Sem plano, este campo não vem."
|
|
}
|
|
},
|
|
"required": [
|
|
"credits",
|
|
"currency"
|
|
]
|
|
}
|
|
},
|
|
"required": [
|
|
"data"
|
|
]
|
|
},
|
|
"AiAnthropicError": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Always `error`.",
|
|
"x-description-pt": "Sempre `error`."
|
|
},
|
|
"error": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "The Anthropic error type: `invalid_request_error`, `authentication_error`, `billing_error`, `permission_error`, `not_found_error`, `rate_limit_error`, `api_error` or `overloaded_error`.",
|
|
"x-description-pt": "O tipo de erro da Anthropic: `invalid_request_error`, `authentication_error`, `billing_error`, `permission_error`, `not_found_error`, `rate_limit_error`, `api_error` ou `overloaded_error`."
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "Text for people, in the language of `Accept-Language`.",
|
|
"x-description-pt": "Texto para pessoas, na língua de `Accept-Language`."
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"message"
|
|
]
|
|
},
|
|
"request_id": {
|
|
"type": "string",
|
|
"description": "The id of the request, the same as the `X-Correlation-ID` header.",
|
|
"x-description-pt": "O identificador do pedido, o mesmo do cabeçalho `X-Correlation-ID`."
|
|
}
|
|
},
|
|
"required": [
|
|
"type",
|
|
"error"
|
|
],
|
|
"description": "The error format of the Anthropic API, used only in /v1/messages and /v1/messages/count_tokens.",
|
|
"x-description-pt": "O formato de erro da API da Anthropic, usado só em /v1/messages e /v1/messages/count_tokens."
|
|
},
|
|
"AiMessagesRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "A `text` model id from GET /v1/models, or `agent/<id>`. A name that is not in the catalog (such as `claude-sonnet-...`) uses our default coding model. The answer brings back the name you sent.",
|
|
"x-description-pt": "O id de um modelo `text` de GET /v1/models, ou `agent/<id>`. Um nome que não está no catálogo (como `claude-sonnet-...`) usa o nosso modelo de código por omissão. A resposta devolve o nome que enviou."
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user",
|
|
"assistant"
|
|
],
|
|
"description": "Who is speaking.",
|
|
"x-description-pt": "Quem fala."
|
|
},
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A content block: `text` {text}, `image` {source}, `tool_use` {id, name, input} or `tool_result` {tool_use_id, content}.",
|
|
"x-description-pt": "Um bloco de conteúdo: `text` {text}, `image` {source}, `tool_use` {id, name, input} ou `tool_result` {tool_use_id, content}.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"tool_use",
|
|
"tool_result"
|
|
],
|
|
"description": "The kind of block.",
|
|
"x-description-pt": "O tipo de bloco."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Text, or a list of content blocks.",
|
|
"x-description-pt": "Texto, ou uma lista de blocos de conteúdo."
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
]
|
|
},
|
|
"description": "The conversation, oldest first.",
|
|
"x-description-pt": "A conversa, da mais antiga para a mais recente."
|
|
},
|
|
"system": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A content block: `text` {text}, `image` {source}, `tool_use` {id, name, input} or `tool_result` {tool_use_id, content}.",
|
|
"x-description-pt": "Um bloco de conteúdo: `text` {text}, `image` {source}, `tool_use` {id, name, input} ou `tool_result` {tool_use_id, content}.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"tool_use",
|
|
"tool_result"
|
|
],
|
|
"description": "The kind of block.",
|
|
"x-description-pt": "O tipo de bloco."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "The instructions, as text or as a list of `text` blocks.",
|
|
"x-description-pt": "As instruções, em texto ou numa lista de blocos `text`."
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"input_schema": {
|
|
"type": "object",
|
|
"description": "JSON Schema of the input.",
|
|
"x-description-pt": "JSON Schema da entrada."
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"input_schema"
|
|
]
|
|
},
|
|
"description": "Tools the model may call, in the Anthropic format.",
|
|
"x-description-pt": "Ferramentas que o modelo pode chamar, no formato da Anthropic."
|
|
},
|
|
"tool_choice": {
|
|
"type": "object",
|
|
"description": "`{\"type\": \"auto\"}`, `{\"type\": \"any\"}`, `{\"type\": \"tool\", \"name\": \"...\"}` or `{\"type\": \"none\"}`.",
|
|
"x-description-pt": "`{\"type\": \"auto\"}`, `{\"type\": \"any\"}`, `{\"type\": \"tool\", \"name\": \"...\"}` ou `{\"type\": \"none\"}`."
|
|
},
|
|
"max_tokens": {
|
|
"type": "integer",
|
|
"description": "The most tokens the answer may have. Required. We reserve credits for this number of output tokens, so a lower value needs a smaller balance.",
|
|
"x-description-pt": "O máximo de tokens da resposta. Obrigatório. Reservamos créditos para este número de tokens de saída, por isso um valor mais baixo precisa de menos saldo."
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"description": "From 0 to 1: lower is more predictable.",
|
|
"x-description-pt": "De 0 a 1: mais baixo é mais previsível."
|
|
},
|
|
"stop_sequences": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
},
|
|
"description": "Texts that end the answer when the model writes them.",
|
|
"x-description-pt": "Textos que acabam a resposta quando o modelo os escreve."
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"description": "`true` to receive the answer as Anthropic server-sent events (`message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop` and `ping`).",
|
|
"x-description-pt": "`true` para receber a resposta em eventos da Anthropic (`message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop` e `ping`)."
|
|
}
|
|
},
|
|
"required": [
|
|
"model",
|
|
"max_tokens",
|
|
"messages"
|
|
],
|
|
"description": "The Anthropic Messages format. Other fields, such as `metadata` and `thinking`, are accepted and may be ignored.",
|
|
"x-description-pt": "O formato Messages da Anthropic. Outros campos, como `metadata` e `thinking`, são aceites e podem ser ignorados."
|
|
},
|
|
"AiMessage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The message id, starting with `msg_`.",
|
|
"x-description-pt": "O id da mensagem, a começar por `msg_`."
|
|
},
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Always `message`.",
|
|
"x-description-pt": "Sempre `message`."
|
|
},
|
|
"role": {
|
|
"type": "string",
|
|
"description": "Always `assistant`.",
|
|
"x-description-pt": "Sempre `assistant`."
|
|
},
|
|
"model": {
|
|
"type": "string",
|
|
"description": "The `model` you sent.",
|
|
"x-description-pt": "O `model` que enviou."
|
|
},
|
|
"content": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A content block: `text` {text}, `image` {source}, `tool_use` {id, name, input} or `tool_result` {tool_use_id, content}.",
|
|
"x-description-pt": "Um bloco de conteúdo: `text` {text}, `image` {source}, `tool_use` {id, name, input} ou `tool_result` {tool_use_id, content}.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"tool_use",
|
|
"tool_result"
|
|
],
|
|
"description": "The kind of block.",
|
|
"x-description-pt": "O tipo de bloco."
|
|
}
|
|
}
|
|
},
|
|
"description": "The answer, as a list of `text` and `tool_use` blocks.",
|
|
"x-description-pt": "A resposta, numa lista de blocos `text` e `tool_use`."
|
|
},
|
|
"stop_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "`end_turn`, `max_tokens` (it hit `max_tokens`), `stop_sequence` or `tool_use` (the model wants to call a tool).",
|
|
"x-description-pt": "`end_turn`, `max_tokens` (chegou ao `max_tokens`), `stop_sequence` ou `tool_use` (o modelo quer chamar uma ferramenta)."
|
|
},
|
|
"stop_sequence": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"input_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"output_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"cache_creation_input_tokens": {
|
|
"type": "integer",
|
|
"description": "Input tokens written to the cache.",
|
|
"x-description-pt": "Tokens de entrada escritos na cache."
|
|
},
|
|
"cache_read_input_tokens": {
|
|
"type": "integer",
|
|
"description": "Input tokens read from the cache, charged at `cached_input`.",
|
|
"x-description-pt": "Tokens de entrada lidos da cache, cobrados ao preço de `cached_input`."
|
|
}
|
|
},
|
|
"description": "The tokens counted. We charge by these numbers and give back the rest of the reservation.",
|
|
"x-description-pt": "Os tokens contados. Cobramos por estes números e devolvemos o resto da reserva."
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"type",
|
|
"role",
|
|
"model",
|
|
"content",
|
|
"usage"
|
|
]
|
|
},
|
|
"AiCountTokensRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "A `text` model id from GET /v1/models, or `agent/<id>`. A name that is not in the catalog (such as `claude-sonnet-...`) uses our default coding model. The answer brings back the name you sent.",
|
|
"x-description-pt": "O id de um modelo `text` de GET /v1/models, ou `agent/<id>`. Um nome que não está no catálogo (como `claude-sonnet-...`) usa o nosso modelo de código por omissão. A resposta devolve o nome que enviou."
|
|
},
|
|
"messages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"role": {
|
|
"type": "string",
|
|
"enum": [
|
|
"user",
|
|
"assistant"
|
|
],
|
|
"description": "Who is speaking.",
|
|
"x-description-pt": "Quem fala."
|
|
},
|
|
"content": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A content block: `text` {text}, `image` {source}, `tool_use` {id, name, input} or `tool_result` {tool_use_id, content}.",
|
|
"x-description-pt": "Um bloco de conteúdo: `text` {text}, `image` {source}, `tool_use` {id, name, input} ou `tool_result` {tool_use_id, content}.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"tool_use",
|
|
"tool_result"
|
|
],
|
|
"description": "The kind of block.",
|
|
"x-description-pt": "O tipo de bloco."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "Text, or a list of content blocks.",
|
|
"x-description-pt": "Texto, ou uma lista de blocos de conteúdo."
|
|
}
|
|
},
|
|
"required": [
|
|
"role",
|
|
"content"
|
|
]
|
|
},
|
|
"description": "The conversation, oldest first.",
|
|
"x-description-pt": "A conversa, da mais antiga para a mais recente."
|
|
},
|
|
"system": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "A content block: `text` {text}, `image` {source}, `tool_use` {id, name, input} or `tool_result` {tool_use_id, content}.",
|
|
"x-description-pt": "Um bloco de conteúdo: `text` {text}, `image` {source}, `tool_use` {id, name, input} ou `tool_result` {tool_use_id, content}.",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"enum": [
|
|
"text",
|
|
"image",
|
|
"tool_use",
|
|
"tool_result"
|
|
],
|
|
"description": "The kind of block.",
|
|
"x-description-pt": "O tipo de bloco."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"description": "The instructions, as text or as a list of `text` blocks.",
|
|
"x-description-pt": "As instruções, em texto ou numa lista de blocos `text`."
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"input_schema": {
|
|
"type": "object",
|
|
"description": "JSON Schema of the input.",
|
|
"x-description-pt": "JSON Schema da entrada."
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"input_schema"
|
|
]
|
|
},
|
|
"description": "Tools the model may call, in the Anthropic format.",
|
|
"x-description-pt": "Ferramentas que o modelo pode chamar, no formato da Anthropic."
|
|
},
|
|
"tool_choice": {
|
|
"type": "object",
|
|
"description": "`{\"type\": \"auto\"}`, `{\"type\": \"any\"}`, `{\"type\": \"tool\", \"name\": \"...\"}` or `{\"type\": \"none\"}`.",
|
|
"x-description-pt": "`{\"type\": \"auto\"}`, `{\"type\": \"any\"}`, `{\"type\": \"tool\", \"name\": \"...\"}` ou `{\"type\": \"none\"}`."
|
|
}
|
|
},
|
|
"required": [
|
|
"model",
|
|
"messages"
|
|
],
|
|
"description": "The same body as POST /v1/messages, without `max_tokens` and `stream`.",
|
|
"x-description-pt": "O mesmo corpo de POST /v1/messages, sem `max_tokens` e `stream`."
|
|
},
|
|
"AiTokenCount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"input_tokens": {
|
|
"type": "integer",
|
|
"description": "An estimate of the input tokens of the request.",
|
|
"x-description-pt": "Uma estimativa dos tokens de entrada do pedido."
|
|
}
|
|
},
|
|
"required": [
|
|
"input_tokens"
|
|
]
|
|
},
|
|
"AiResponsesRequest": {
|
|
"type": "object",
|
|
"properties": {
|
|
"model": {
|
|
"type": "string",
|
|
"description": "A `text` model id from GET /v1/models, or `agent/<id>`.",
|
|
"x-description-pt": "O id de um modelo `text` de GET /v1/models, ou `agent/<id>`."
|
|
},
|
|
"input": {
|
|
"oneOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "An input item: a message `{\"role\", \"content\"}` or a `function_call_output` `{\"call_id\", \"output\"}` with the result of a function you ran.",
|
|
"x-description-pt": "Um item de entrada: uma mensagem `{\"role\", \"content\"}` ou um `function_call_output` `{\"call_id\", \"output\"}` com o resultado de uma função que executou."
|
|
}
|
|
}
|
|
],
|
|
"description": "The text of the request, or a list of input items.",
|
|
"x-description-pt": "O texto do pedido, ou uma lista de itens de entrada."
|
|
},
|
|
"instructions": {
|
|
"type": "string",
|
|
"description": "The instructions (the system message).",
|
|
"x-description-pt": "As instruções (a mensagem de sistema)."
|
|
},
|
|
"previous_response_id": {
|
|
"type": "string",
|
|
"description": "The `id` of an earlier response of the same account, to go on with that conversation without sending it again. Responses are kept for 30 days.",
|
|
"x-description-pt": "O `id` de uma resposta anterior da mesma conta, para continuar essa conversa sem a enviar de novo. As respostas guardam-se 30 dias."
|
|
},
|
|
"tools": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object"
|
|
},
|
|
"description": "Functions the model may call: `{\"type\": \"function\", \"name\", \"description\", \"parameters\"}`.",
|
|
"x-description-pt": "Funções que o modelo pode chamar: `{\"type\": \"function\", \"name\", \"description\", \"parameters\"}`."
|
|
},
|
|
"tool_choice": {
|
|
"type": "string",
|
|
"description": "`auto`, `none`, `required` or a function.",
|
|
"x-description-pt": "`auto`, `none`, `required` ou uma função."
|
|
},
|
|
"max_output_tokens": {
|
|
"type": "integer",
|
|
"description": "The most tokens the answer may have. Without it we reserve 4096.",
|
|
"x-description-pt": "O máximo de tokens da resposta. Sem ele reservamos 4096."
|
|
},
|
|
"temperature": {
|
|
"type": "number",
|
|
"description": "From 0 to 2: lower is more predictable.",
|
|
"x-description-pt": "De 0 a 2: mais baixo é mais previsível."
|
|
},
|
|
"stream": {
|
|
"type": "boolean",
|
|
"description": "`true` to receive the answer as Responses events (`response.created`, `response.output_item.added`, `response.output_text.delta`, `response.function_call_arguments.delta`, `response.output_item.done` and `response.completed`).",
|
|
"x-description-pt": "`true` para receber a resposta em eventos do Responses (`response.created`, `response.output_item.added`, `response.output_text.delta`, `response.function_call_arguments.delta`, `response.output_item.done` e `response.completed`)."
|
|
}
|
|
},
|
|
"required": [
|
|
"model",
|
|
"input"
|
|
]
|
|
},
|
|
"AiResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "string",
|
|
"description": "The response id, starting with `resp_`. Use it in `previous_response_id` or in GET /v1/responses/{id}.",
|
|
"x-description-pt": "O id da resposta, a começar por `resp_`. Use-o em `previous_response_id` ou em GET /v1/responses/{id}."
|
|
},
|
|
"object": {
|
|
"type": "string",
|
|
"description": "Always `response`.",
|
|
"x-description-pt": "Sempre `response`."
|
|
},
|
|
"created_at": {
|
|
"type": "integer",
|
|
"description": "Unix time.",
|
|
"x-description-pt": "Hora Unix."
|
|
},
|
|
"status": {
|
|
"type": "string",
|
|
"enum": [
|
|
"completed",
|
|
"incomplete",
|
|
"failed"
|
|
],
|
|
"description": "`completed`, or `incomplete` when it hit `max_output_tokens` (see `incomplete_details`).",
|
|
"x-description-pt": "`completed`, ou `incomplete` quando chegou ao `max_output_tokens` (veja `incomplete_details`)."
|
|
},
|
|
"model": {
|
|
"type": "string"
|
|
},
|
|
"output": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"description": "An output item: `message` (with `content` of type `output_text`) or `function_call` (with `call_id`, `name` and `arguments` in JSON).",
|
|
"x-description-pt": "Um item de saída: `message` (com `content` do tipo `output_text`) ou `function_call` (com `call_id`, `name` e `arguments` em JSON)."
|
|
},
|
|
"description": "What the model produced.",
|
|
"x-description-pt": "O que o modelo produziu."
|
|
},
|
|
"previous_response_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"usage": {
|
|
"type": "object",
|
|
"properties": {
|
|
"input_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"output_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"total_tokens": {
|
|
"type": "integer"
|
|
},
|
|
"input_tokens_details": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cached_tokens": {
|
|
"type": "integer",
|
|
"description": "Input tokens read from the cache.",
|
|
"x-description-pt": "Tokens de entrada lidos da cache."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "The tokens counted. We charge by these numbers.",
|
|
"x-description-pt": "Os tokens contados. Cobramos por estes números."
|
|
}
|
|
},
|
|
"required": [
|
|
"id",
|
|
"object",
|
|
"status",
|
|
"model",
|
|
"output"
|
|
],
|
|
"description": "The OpenAI Responses object. It also brings the request fields (`instructions`, `tools`, `temperature` and others), as in the OpenAI format.",
|
|
"x-description-pt": "O objecto response da OpenAI. Traz também os campos do pedido (`instructions`, `tools`, `temperature` e outros), como no formato da OpenAI."
|
|
},
|
|
"CatalogProductsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"group": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"months": {
|
|
"type": "integer"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"setup_fee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"config_options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"default_choice_id": {
|
|
"type": "integer"
|
|
},
|
|
"choices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"prices": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"setup_fee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"accepts_domain": {
|
|
"type": "boolean"
|
|
},
|
|
"purchasable": {
|
|
"type": "boolean"
|
|
},
|
|
"not_purchasable_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"enum": [
|
|
"use_extras_purchase",
|
|
"portal_only",
|
|
"free_product",
|
|
"prorata_billing",
|
|
"out_of_stock",
|
|
"custom_fields_required",
|
|
"no_price",
|
|
null
|
|
],
|
|
"description": "Why it cannot be bought through the API.",
|
|
"x-description-pt": "Porque não se compra pela API."
|
|
},
|
|
"purchase_path": {
|
|
"type": "string"
|
|
},
|
|
"portal_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"kind": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"temporary_address": {
|
|
"type": "boolean"
|
|
},
|
|
"config_options": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"option_id": {
|
|
"type": "integer"
|
|
},
|
|
"option": {
|
|
"type": "string"
|
|
},
|
|
"choice_id": {
|
|
"type": "integer"
|
|
},
|
|
"choice": {
|
|
"type": "string"
|
|
},
|
|
"price": {
|
|
"type": "number"
|
|
},
|
|
"setup_fee": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"order_id": {
|
|
"type": "integer"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"manage_url": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesUpgradesListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"current_cycle": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"can_upgrade": {
|
|
"type": "boolean"
|
|
},
|
|
"blocked_reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"plans": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycles": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"amount_today": {
|
|
"type": "number"
|
|
},
|
|
"renewal_amount": {
|
|
"type": "number"
|
|
},
|
|
"credit": {
|
|
"type": "number"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServicesUpgradeResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"service_id": {
|
|
"type": "integer"
|
|
},
|
|
"previous_product_id": {
|
|
"type": "integer"
|
|
},
|
|
"product_id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"billing_cycle": {
|
|
"type": "string"
|
|
},
|
|
"renewal_amount": {
|
|
"type": "number"
|
|
},
|
|
"next_due_date": {
|
|
"type": "string"
|
|
},
|
|
"order_id": {
|
|
"type": "integer"
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsCreditsPricesResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"minimum": {
|
|
"type": "integer"
|
|
},
|
|
"maximum": {
|
|
"type": "integer"
|
|
},
|
|
"tax_added": {
|
|
"type": "boolean"
|
|
},
|
|
"tiers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "integer"
|
|
},
|
|
"unit_price": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"SmsCreditsPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"credits": {
|
|
"type": "integer"
|
|
},
|
|
"unit_price": {
|
|
"type": "number"
|
|
},
|
|
"order_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCreditsPricesResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"minimum": {
|
|
"type": "integer"
|
|
},
|
|
"maximum": {
|
|
"type": "integer"
|
|
},
|
|
"tax_added": {
|
|
"type": "boolean"
|
|
},
|
|
"usages": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"usage": {
|
|
"type": "string"
|
|
},
|
|
"credits_per_email": {
|
|
"type": "number"
|
|
},
|
|
"tiers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "integer"
|
|
},
|
|
"to": {
|
|
"type": "integer"
|
|
},
|
|
"price_per_thousand": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"EmailCreditsPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"usage": {
|
|
"type": "string"
|
|
},
|
|
"emails": {
|
|
"type": "integer"
|
|
},
|
|
"credits": {
|
|
"type": "integer"
|
|
},
|
|
"order_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"AiCreditsPricesResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"minimum": {
|
|
"type": "integer"
|
|
},
|
|
"maximum": {
|
|
"type": "integer"
|
|
},
|
|
"tax_added": {
|
|
"type": "boolean"
|
|
},
|
|
"tiers": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"from": {
|
|
"type": "integer"
|
|
},
|
|
"unit_price": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"AiCreditsPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"credits": {
|
|
"type": "integer"
|
|
},
|
|
"unit_price": {
|
|
"type": "number"
|
|
},
|
|
"order_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersExtrasGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"tax_added": {
|
|
"type": "boolean"
|
|
},
|
|
"ip": {
|
|
"type": "object",
|
|
"properties": {
|
|
"available": {
|
|
"type": "boolean"
|
|
},
|
|
"reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"monthly_amount": {
|
|
"type": "number"
|
|
},
|
|
"amount_today": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"disk": {
|
|
"type": "object",
|
|
"properties": {
|
|
"available": {
|
|
"type": "boolean"
|
|
},
|
|
"reason": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"current_extra_gb": {
|
|
"type": "integer"
|
|
},
|
|
"max_extra_gb": {
|
|
"type": "integer"
|
|
},
|
|
"price_per_gb_monthly": {
|
|
"type": "number"
|
|
},
|
|
"sizes": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"size_gb": {
|
|
"type": "integer"
|
|
},
|
|
"monthly_amount": {
|
|
"type": "number"
|
|
},
|
|
"amount_today": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ServersExtrasPurchaseResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_id": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"server_id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"size_gb": {
|
|
"type": "integer"
|
|
},
|
|
"monthly_amount": {
|
|
"type": "number"
|
|
},
|
|
"order_id": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"subtotal": {
|
|
"type": "number"
|
|
},
|
|
"tax": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"promo_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"discount": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"extra_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerProgramGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"agence": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"discount_percent": {
|
|
"type": "number"
|
|
},
|
|
"custom_discount": {
|
|
"type": "boolean"
|
|
},
|
|
"fixed": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"member_since": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"conditions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"rule": {
|
|
"type": "string"
|
|
},
|
|
"paid_12m_plus_credit": {
|
|
"type": "number"
|
|
},
|
|
"active_items": {
|
|
"type": "integer"
|
|
},
|
|
"current": {
|
|
"type": "object",
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"discount_percent": {
|
|
"type": "number"
|
|
},
|
|
"paid_12m_plus_credit": {
|
|
"type": "number"
|
|
},
|
|
"active_items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"next": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"discount_percent": {
|
|
"type": "number"
|
|
},
|
|
"paid_12m_plus_credit": {
|
|
"type": "number"
|
|
},
|
|
"active_items": {
|
|
"type": "integer"
|
|
},
|
|
"missing": {
|
|
"type": "object",
|
|
"properties": {
|
|
"paid_12m_plus_credit": {
|
|
"type": "number"
|
|
},
|
|
"active_items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"description": "The next Agency and what is missing; `null` in Agency Ultra.",
|
|
"x-description-pt": "O Agency seguinte e o que falta; `null` no Agency Ultra."
|
|
}
|
|
}
|
|
},
|
|
"review": {
|
|
"type": "object",
|
|
"properties": {
|
|
"warning_until": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
],
|
|
"description": "When the account no longer meets its Agency: the date it moves down if it does not meet it again.",
|
|
"x-description-pt": "Quando a conta deixou de cumprir o Agency: a data em que desce se não voltar a cumprir."
|
|
}
|
|
}
|
|
},
|
|
"credit": {
|
|
"type": "object",
|
|
"properties": {
|
|
"balance": {
|
|
"type": "number"
|
|
},
|
|
"low_warning_at": {
|
|
"type": "number"
|
|
},
|
|
"low": {
|
|
"type": "boolean"
|
|
},
|
|
"auto_top_up": {
|
|
"type": "object",
|
|
"properties": {
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"below": {
|
|
"type": "number"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"top_up_minimum": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"credit_line": {
|
|
"type": [
|
|
"object",
|
|
"null"
|
|
],
|
|
"properties": {
|
|
"limit": {
|
|
"type": "number"
|
|
},
|
|
"owed": {
|
|
"type": "number"
|
|
},
|
|
"available": {
|
|
"type": "number"
|
|
},
|
|
"repayment_days": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"description": "Only when the team gave a credit line: `available` is what purchases through the API can still use beyond the credit.",
|
|
"x-description-pt": "Só quando a equipa deu débito com tecto: `available` é o que as compras pela API ainda podem usar além do saldo."
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerPricingListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"extension": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"register": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"renew": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"transfer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"list_prices": {
|
|
"type": "object",
|
|
"properties": {
|
|
"register": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"renew": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
},
|
|
"transfer": {
|
|
"type": "object",
|
|
"properties": {
|
|
"1": {
|
|
"type": "number"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"discount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"percent": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"level": {
|
|
"type": "string"
|
|
},
|
|
"minimum_price_applies_to": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerCustomersListResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"customer_name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/ListMeta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerCustomersSetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"domain": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"customer_name": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerTopUpCreateResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"invoice_id": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"due_date": {
|
|
"type": "string"
|
|
},
|
|
"pay_url": {
|
|
"type": "string"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"ResellerStatementsGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"month": {
|
|
"type": "string"
|
|
},
|
|
"currency": {
|
|
"type": "string"
|
|
},
|
|
"opening_balance": {
|
|
"type": "number"
|
|
},
|
|
"closing_balance": {
|
|
"type": "number"
|
|
},
|
|
"total_in": {
|
|
"type": "number"
|
|
},
|
|
"total_out": {
|
|
"type": "number"
|
|
},
|
|
"movements": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"date": {
|
|
"type": "string"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"amount": {
|
|
"type": "number"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"WebhooksGetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"available_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"WebhooksSetResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string"
|
|
},
|
|
"events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"last_delivery_at": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_status_code": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"last_error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
},
|
|
"available_events": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
},
|
|
"secret": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"WebhooksDeleteResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"deleted": {
|
|
"type": "boolean"
|
|
},
|
|
"simulated": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
},
|
|
"WebhooksTestResponse": {
|
|
"type": "object",
|
|
"required": [
|
|
"data",
|
|
"meta"
|
|
],
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"properties": {
|
|
"delivered": {
|
|
"type": "boolean"
|
|
},
|
|
"status_code": {
|
|
"type": "integer"
|
|
},
|
|
"error": {
|
|
"type": [
|
|
"string",
|
|
"null"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"meta": {
|
|
"$ref": "#/components/schemas/Meta"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"InvalidRequest": {
|
|
"description": "The request is not valid, for example the body is not JSON or the connection is not HTTPS.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "invalid_request",
|
|
"message": "The request is not valid.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Unauthorized": {
|
|
"description": "The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "unauthorized",
|
|
"message": "Missing or invalid API key.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Forbidden": {
|
|
"description": "The account cannot use the API (`forbidden`), the key lacks the permission (`insufficient_scope`), or the IP address is not on the list of the key (`ip_not_allowed`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "insufficient_scope",
|
|
"message": "This key does not have the required permission.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"required": "dns:read"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"NotFound": {
|
|
"description": "Not found.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "not_found",
|
|
"message": "Not found.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"MethodNotAllowed": {
|
|
"description": "This method is not allowed on this path. See the Allow header.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "method_not_allowed",
|
|
"message": "This method is not allowed on this path.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"IdempotencyConflict": {
|
|
"description": "The Idempotency-Key was used with a different request, or the first request is still in progress.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "idempotency_conflict",
|
|
"message": "This Idempotency-Key was already used with a different request, or the first request is still in progress.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"reason": "different_request"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ValidationFailed": {
|
|
"description": "Some of the data is not valid.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "validation_failed",
|
|
"message": "Some of the data is not valid.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"RateLimited": {
|
|
"description": "Too many requests. Wait for the time in Retry-After.",
|
|
"headers": {
|
|
"Retry-After": {
|
|
"$ref": "#/components/headers/Retry-After"
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "rate_limited",
|
|
"message": "Too many requests. Please try again shortly.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"retry_after": 42
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"InternalError": {
|
|
"description": "An internal error occurred. Give the correlation_id to support.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "internal_error",
|
|
"message": "An internal error occurred. Please give the correlation_id to support.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Disabled": {
|
|
"description": "The API is turned off.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "disabled",
|
|
"message": "The API is currently turned off.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"SmsResellerRequired": {
|
|
"description": "SMS is not active on this account (`sms_not_active`), the key lacks the permission (`insufficient_scope`), or the account cannot use the API (`forbidden`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "insufficient_scope",
|
|
"message": "This key does not have the required permission.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"required": "dns:read"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"x-description-pt": "O SMS não está activo nesta conta (`sms_not_active`), a chave não tem a permissão (`insufficient_scope`), ou a conta não pode usar a API (`forbidden`)."
|
|
},
|
|
"Conflict": {
|
|
"description": "The operation cannot be done in the current state. See `details.reason`.",
|
|
"x-description-pt": "A operação não se pode fazer no estado actual. Veja `details.reason`.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "conflict",
|
|
"message": "This operation only works on an active domain.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"reason": "domain_not_active"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"InsufficientCredit": {
|
|
"description": "Not enough credit. Nothing was charged.",
|
|
"x-description-pt": "Saldo insuficiente. Nada foi cobrado.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "insufficient_credit",
|
|
"message": "The account does not have enough credit. Nothing was charged.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"amount": 1900.0,
|
|
"currency": "MZN"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"UpstreamError": {
|
|
"description": "The service behind the API did not respond as expected.",
|
|
"x-description-pt": "O serviço por trás da API não respondeu como esperado.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "upstream_error",
|
|
"message": "The service did not respond as expected. Please try again later.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"EmailAccountRequired": {
|
|
"description": "The account does not have E-mail Center active (`forbidden`, `details.reason` = `email_account_required`), or the key lacks the permission (`insufficient_scope`).",
|
|
"x-description-pt": "A conta não tem o E-mail Center activo (`forbidden`, `details.reason` = `email_account_required`), ou a chave não tem a permissão (`insufficient_scope`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "forbidden",
|
|
"message": "This account does not have E-mail Center active. Turn it on in the account dashboard.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"reason": "email_account_required"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AiInsufficientCredits": {
|
|
"description": "Not enough AI credits for this request (`insufficient_credits`). Nothing was charged. `details.required` is what the request needs and `details.balance` is what the account has.",
|
|
"x-description-pt": "Os créditos de IA não chegam para este pedido (`insufficient_credits`). Nada foi cobrado. `details.required` é o que o pedido precisa e `details.balance` é o que a conta tem.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "insufficient_credits",
|
|
"message": "Not enough credits for this request. Nothing was charged.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"required": 46.12,
|
|
"balance": 12.5
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ModelNotFound": {
|
|
"description": "The model does not exist in the catalog, or it is not of the right type for this operation (`model_not_found`). See GET /v1/models.",
|
|
"x-description-pt": "O modelo não existe no catálogo, ou não é do tipo certo para esta operação (`model_not_found`). Veja GET /v1/models.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "model_not_found",
|
|
"message": "This model does not exist.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"model": "example/unknown-model"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AgentPaused": {
|
|
"description": "The agent in `model` is paused (`agent_paused`). Nothing was charged. Turn it back on in All in One AI.",
|
|
"x-description-pt": "O agente de `model` está em pausa (`agent_paused`). Nada foi cobrado. Volte a activá-lo no All in One AI.",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "agent_paused",
|
|
"message": "This agent is paused.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"model": "agent/7c1e9a42-b35d8f06-a2c4e719-5d0b3f8e"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"AiLimit": {
|
|
"description": "Too many requests per minute for this key (`rate_limited`, wait the seconds in `Retry-After`), or the points of your Coding Plan ran out for the week or the month (`plan_limit_reached`). With `plan_limit_reached`, `details` has `limit` (`weekly` or `monthly`), `used`, `remaining`, `resets_at`, `fallback_to_credits` and `credits`. It only happens when \"Use credits when the plan runs out\" is off, or when the account has no credits left.",
|
|
"x-description-pt": "Demasiados pedidos por minuto com esta chave (`rate_limited`, espere os segundos de `Retry-After`), ou os pontos do seu Coding Plan acabaram na semana ou no mês (`plan_limit_reached`). Com `plan_limit_reached`, `details` traz `limit` (`weekly` ou `monthly`), `used`, `remaining`, `resets_at`, `fallback_to_credits` e `credits`. Só acontece com «Usar créditos quando o plano acabar» desligado, ou quando a conta já não tem créditos.",
|
|
"headers": {
|
|
"Retry-After": {
|
|
"description": "Seconds to wait before trying again.",
|
|
"x-description-pt": "Segundos a esperar antes de tentar de novo.",
|
|
"schema": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "plan_limit_reached",
|
|
"message": "Your plan's weekly limit has been reached.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {
|
|
"limit": "weekly",
|
|
"used": 16500000,
|
|
"remaining": 0,
|
|
"resets_at": "2026-11-23T00:00:00+00:00",
|
|
"fallback_to_credits": false,
|
|
"credits": 0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"ResellerProgramRequired": {
|
|
"description": "This account is not an active member of the Reseller Program (`reseller_program_required`), the key lacks the permission (`insufficient_scope`), or the account cannot use the API (`forbidden`).",
|
|
"x-description-pt": "Esta conta não é membro activo do Programa de Revenda (`reseller_program_required`), a chave não tem a permissão (`insufficient_scope`), ou a conta não pode usar a API (`forbidden`).",
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"$ref": "#/components/schemas/Error"
|
|
},
|
|
"example": {
|
|
"error": {
|
|
"code": "reseller_program_required",
|
|
"message": "This account is not an active member of the Reseller Program.",
|
|
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
|
|
"details": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"webhooks": {
|
|
"reseller.credit_low": {
|
|
"post": {
|
|
"operationId": "webhook.reseller.credit_low",
|
|
"summary": "Reseller credit is low",
|
|
"x-summary-pt": "O saldo de revenda está baixo",
|
|
"description": "The credit of a Reseller Program member went below `low_warning_at`. Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "O saldo de um membro do Programa de Revenda baixou de `low_warning_at`. Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"event",
|
|
"created_at",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"event": {
|
|
"type": "string",
|
|
"const": "reseller.credit_low"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event": "reseller.credit_low",
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"data": {
|
|
"balance": 950.0,
|
|
"low_warning_at": 1200.0,
|
|
"currency": "MZN"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Any 2xx confirms the delivery.",
|
|
"x-description-pt": "Qualquer 2xx confirma a entrega."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"reseller.level_changed": {
|
|
"post": {
|
|
"operationId": "webhook.reseller.level_changed",
|
|
"summary": "The Agency changed",
|
|
"x-summary-pt": "O Agency mudou",
|
|
"description": "The Agency of a Reseller Program member went up or down. Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "O Agency de um membro do Programa de Revenda subiu ou desceu. Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"event",
|
|
"created_at",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"event": {
|
|
"type": "string",
|
|
"const": "reseller.level_changed"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event": "reseller.level_changed",
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"data": {
|
|
"agence": "Agency Plus",
|
|
"discount_percent": 15.0,
|
|
"previous_agence": "Agency Pro",
|
|
"previous_discount_percent": 10.0
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Any 2xx confirms the delivery.",
|
|
"x-description-pt": "Qualquer 2xx confirma a entrega."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.registered": {
|
|
"post": {
|
|
"operationId": "webhook.domain.registered",
|
|
"summary": "Domain registered",
|
|
"x-summary-pt": "Domínio registado",
|
|
"description": "A domain of the account was registered. Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "Um domínio da conta ficou registado. Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"event",
|
|
"created_at",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"event": {
|
|
"type": "string",
|
|
"const": "domain.registered"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event": "domain.registered",
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"data": {
|
|
"domain_id": 913,
|
|
"domain": "joaofernandes.co.mz",
|
|
"years": 1,
|
|
"status": "active",
|
|
"registered_at": "2026-11-25",
|
|
"expires_at": "2027-11-25"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Any 2xx confirms the delivery.",
|
|
"x-description-pt": "Qualquer 2xx confirma a entrega."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"domain.registration_failed": {
|
|
"post": {
|
|
"operationId": "webhook.domain.registration_failed",
|
|
"summary": "Domain registration failed",
|
|
"x-summary-pt": "O registo do domínio falhou",
|
|
"description": "The registration of a domain failed. `refund.automatic` says whether the amount goes back to the credit by itself (Reseller Program). Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "O registo de um domínio falhou. `refund.automatic` diz se o valor volta sozinho ao saldo (Programa de Revenda). Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"event",
|
|
"created_at",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"event": {
|
|
"type": "string",
|
|
"const": "domain.registration_failed"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event": "domain.registration_failed",
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"data": {
|
|
"domain_id": 913,
|
|
"domain": "joaofernandes.co.mz",
|
|
"years": 1,
|
|
"status": "pending",
|
|
"error": "registration_failed",
|
|
"refund": {
|
|
"automatic": true,
|
|
"to": "credit"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Any 2xx confirms the delivery.",
|
|
"x-description-pt": "Qualquer 2xx confirma a entrega."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"service.created": {
|
|
"post": {
|
|
"operationId": "webhook.service.created",
|
|
"summary": "Service created",
|
|
"x-summary-pt": "Serviço criado",
|
|
"description": "A service of the account was created on the server. Each event is a signed POST, as in the SMS webhook: `X-Webhook-Signature: t=<unix time>,v1=<hex>`, HMAC-SHA256 of `t + \".\" + raw body` with your secret; answer 2xx within 5 seconds or we retry up to 5 times.",
|
|
"x-description-pt": "Um serviço da conta foi criado no servidor. Cada evento é um POST assinado, como no webhook do SMS: `X-Webhook-Signature: t=<hora unix>,v1=<hex>`, HMAC-SHA256 de `t + \".\" + corpo cru` com o seu segredo; responda 2xx em 5 segundos ou tentamos até 5 vezes.",
|
|
"requestBody": {
|
|
"required": true,
|
|
"content": {
|
|
"application/json": {
|
|
"schema": {
|
|
"type": "object",
|
|
"required": [
|
|
"event",
|
|
"created_at",
|
|
"data"
|
|
],
|
|
"properties": {
|
|
"event": {
|
|
"type": "string",
|
|
"const": "service.created"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"data": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
},
|
|
"example": {
|
|
"event": "service.created",
|
|
"created_at": "2026-11-25T12:50:39+02:00",
|
|
"data": {
|
|
"service_id": 679,
|
|
"product_id": 38,
|
|
"name": "Pro Hosting",
|
|
"domain": "joaofernandes.co.mz",
|
|
"status": "active",
|
|
"billing_cycle": "annually",
|
|
"next_due_date": "2027-11-25"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"responses": {
|
|
"200": {
|
|
"description": "Any 2xx confirms the delivery.",
|
|
"x-description-pt": "Qualquer 2xx confirma a entrega."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|