{"openapi":"3.1.0","info":{"title":"API do Meeng.dev","description":"API de e-mail do Meeng.dev: envie e-mails, gerencie domínios, listas de contatos, campanhas, modelos, supressões, webhooks e análises. Autentique cada chamada com `Authorization: Bearer mg_\u003cclientId\u003e_\u003ctoken\u003e`, usando uma chave criada no painel.","version":"1.0.0"},"jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base","servers":[{"url":"https://meeng.dev"}],"paths":{"/api/v1/analytics/email-time-series":{"get":{"tags":["Análises"],"summary":"Série temporal de e-mails","description":"Série temporal dos e-mails que a equipe enviou, transacionais e de campanha juntos, com os contadores de cada dia. Um dia sem envio vem zerado. O dia é o de Brasília (America/Sao_Paulo), da meia-noite à meia-noite, com o rótulo \"Nov 20\" em `date`. Os instantes que a API troca continuam em UTC.","operationId":"api.analytics.timeseries","parameters":[{"name":"days","in":"query","description":"Quantos dias para trás contar: 7 ou 30 (padrão 30). A resposta traz uma entrada para cada um desses dias e uma para hoje.","schema":{"type":"string","enum":["7","30"]},"example":"30"},{"name":"domainId","in":"query","description":"Conta só este domínio, pelo id numérico. Um valor que não seja número não filtra nada. Uma chave restrita a um domínio lê esse domínio e ignora este parâmetro.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Série temporal dos e-mails","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTimeSeries"}}}},"400":{"description":"days não é 7 nem 30.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.analytics.timeseries"}},"/api/v1/analytics/reputation-metrics":{"get":{"tags":["Análises"],"summary":"Consultar a reputação","description":"O que foi entregue, devolvido de forma definitiva e denunciado como spam desde o início, e as duas taxas em porcentagem, sem arredondar: devolvidos sobre entregues e denunciados sobre entregues, zero quando nada foi entregue.","operationId":"api.analytics.reputation","parameters":[{"name":"domainId","in":"query","description":"Lê só este domínio, pelo id numérico. Um valor que não seja número não filtra nada. Uma chave restrita a um domínio lê esse domínio e ignora este parâmetro.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"Métricas de reputação","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReputationMetrics"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.analytics.reputation"}},"/api/v1/campaigns":{"get":{"tags":["Campanhas"],"summary":"Listar campanhas","description":"Campanhas da mais nova à mais antiga, 30 por página. Uma chave restrita a um domínio vê as campanhas que enviam por ele.","operationId":"api.campaigns.index","parameters":[{"name":"page","in":"query","description":"A página, a partir de 1; 30 campanhas por página.","schema":{"type":"string"}},{"name":"status","in":"query","description":"Só campanhas neste status.","schema":{"type":"string","enum":["DRAFT","SCHEDULED","RUNNING","PAUSED","SENT"]}},{"name":"search","in":"query","description":"Parte do nome ou do assunto.","schema":{"type":"string"}}],"responses":{"200":{"description":"Campanhas","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPage"}}}},"400":{"description":"O status não é um dos cinco, ou a página não é um número.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.index"},"post":{"tags":["Campanhas"],"summary":"Criar uma campanha","description":"Cria uma campanha em rascunho para uma lista de contatos. É obrigatório informar content (o documento do editor) ou html, e a mensagem precisa trazer o link de descadastro, {{meeng_unsubscribe_url}}. Com sendNow, ou com scheduledAt (ISO 8601, ou expressões como 'tomorrow 9am'), a campanha é agendada na hora; se o agendamento for recusado, o rascunho continua criado e a resposta é a recusa.","operationId":"api.campaigns.store","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"from":{"type":"string","minLength":1},"subject":{"type":"string","minLength":1},"previewText":{"type":"string"},"contactBookId":{"type":"string","minLength":1},"content":{"type":"string","minLength":1},"html":{"type":"string","minLength":1},"replyTo":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"sendNow":{"type":"boolean"},"scheduledAt":{"type":"string"},"batchSize":{"type":"integer","minimum":1,"maximum":100000}},"required":["name","from","subject","contactBookId"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Criar uma campanha","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"O corpo não é válido, a lista ou o remetente está errado, ou falta o link de descadastro (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.store"}},"/api/v1/campaigns/{campaignId}":{"get":{"tags":["Campanhas"],"summary":"Consultar uma campanha","description":"Uma campanha da equipe, com os contadores dela.","operationId":"api.campaigns.show","parameters":[{"name":"campaignId","in":"path","description":"O ID da campanha.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A campanha","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Campanha não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.show"},"delete":{"tags":["Campanhas"],"summary":"Excluir uma campanha","description":"Exclui a campanha, mesmo uma em andamento. Os e-mails que ela já gerou permanecem. A resposta é a linha inteira que foi excluída.","operationId":"api.campaigns.destroy","parameters":[{"name":"campaignId","in":"path","description":"O ID da campanha.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campanha excluída","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRow"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Campanha não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.destroy"}},"/api/v1/campaigns/{campaignId}/pause":{"post":{"tags":["Campanhas"],"summary":"Pausar uma campanha","description":"Para a campanha entre os lotes. Não olha em que status ela está.","operationId":"api.campaigns.pause","parameters":[{"name":"campaignId","in":"path","description":"O ID da campanha.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campanha pausada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Campanha não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.pause"}},"/api/v1/campaigns/{campaignId}/resume":{"post":{"tags":["Campanhas"],"summary":"Retomar uma campanha","description":"Deixa uma campanha pausada seguir: agendada quando a data ainda está à frente, em andamento no caso contrário.","operationId":"api.campaigns.resume","parameters":[{"name":"campaignId","in":"path","description":"O ID da campanha.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Campanha retomada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Campanha não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.resume"}},"/api/v1/campaigns/{campaignId}/schedule":{"post":{"tags":["Campanhas"],"summary":"Agendar uma campanha","description":"Coloca a campanha na fila: agora, quando scheduledAt não é informado, ou na data indicada (ISO 8601, ou expressões como 'tomorrow 9am'). É recusado quando a campanha não tem lista, conteúdo, link de descadastro ou contato inscrito.","operationId":"api.campaigns.schedule","parameters":[{"name":"campaignId","in":"path","description":"O ID da campanha.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string"},"batchSize":{"type":"integer","minimum":1,"maximum":100000}},"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Campanha agendada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"400":{"description":"O corpo não é válido, ou a campanha não pode ser agendada (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Campanha não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.campaigns.schedule"}},"/api/v1/contactBooks":{"get":{"tags":["Contatos"],"summary":"Listar listas de contatos","description":"Todas as listas de contatos da equipe, cada uma com o número de contatos que guarda, sem ordem definida.","operationId":"api.contactbooks.index","responses":{"200":{"description":"Listas de contatos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBookList"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contactbooks.index"},"post":{"tags":["Contatos"],"summary":"Criar uma lista de contatos","description":"Cria uma lista de contatos com confirmação em dois passos ligada e o e-mail de confirmação padrão, e aplica o que o corpo disser. O e-mail de confirmação precisa conter o marcador {{doubleOptInUrl}}. No plano gratuito a equipe tem uma lista; além dela a resposta é 403 FORBIDDEN com a mensagem CONTACT_BOOK.","operationId":"api.contactbooks.store","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"doubleOptInEnabled":{"type":"boolean"},"doubleOptInFrom":{"type":["string","null"]},"doubleOptInSubject":{"type":"string"},"doubleOptInContent":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}}},"required":["name"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Lista de contatos criada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBook"}}}},"400":{"description":"O corpo não é válido, ou o remetente ou o conteúdo da confirmação foi recusado (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contactbooks.store"}},"/api/v1/contactBooks/{contactBookId}":{"get":{"tags":["Contatos"],"summary":"Consultar uma lista de contatos","description":"Uma lista de contatos, com o número de contatos.","operationId":"api.contactbooks.show","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A lista de contatos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBook"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contactbooks.show"},"delete":{"tags":["Contatos"],"summary":"Excluir uma lista de contatos","description":"Exclui a lista e os contatos dela. As campanhas que apontavam para ela continuam existindo, sem lista.","operationId":"api.contactbooks.destroy","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lista de contatos excluída","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBookDeleted"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contactbooks.destroy"},"patch":{"tags":["Contatos"],"summary":"Atualizar uma lista de contatos","description":"Muda os campos que o corpo traz e deixa os outros como estão.","operationId":"api.contactbooks.update","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"emoji":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"doubleOptInEnabled":{"type":"boolean"},"doubleOptInFrom":{"type":["string","null"]},"doubleOptInSubject":{"type":"string"},"doubleOptInContent":{"type":"string"},"variables":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Lista de contatos atualizada","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactBook"}}}},"400":{"description":"O corpo não é válido (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contactbooks.update"}},"/api/v1/contactBooks/{contactBookId}/contacts":{"get":{"tags":["Contatos"],"summary":"Listar os contatos de uma lista","description":"Os contatos da lista, em ordem de id, como um array sem total.","operationId":"api.contacts.index","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}},{"name":"emails","in":"query","description":"Endereços de e-mail separados por vírgula; correspondência exata.","schema":{"type":"string"}},{"name":"page","in":"query","description":"A página, a partir de 1.","schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Contatos por página; 5000 quando não é informado.","schema":{"type":"integer"}},{"name":"ids","in":"query","description":"Ids de contatos separados por vírgula.","schema":{"type":"string"}}],"responses":{"200":{"description":"Contatos da lista","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactList"}}}},"400":{"description":"Um número da consulta não é um número.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.index"},"post":{"tags":["Contatos"],"summary":"Adicionar um contato a uma lista","description":"Cria o contato, ou atualiza o que tem esse e-mail. Um contato que saiu continua fora (só o PATCH o inscreve de novo). Quando a lista tem confirmação em dois passos, um contato novo fica pendente, sem inscrição, até confirmar o e-mail que recebe.","operationId":"api.contacts.store","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"subscribed":{"type":"boolean"}},"required":["email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Contato criado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactID"}}}},"400":{"description":"O corpo não é válido (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.store"}},"/api/v1/contactBooks/{contactBookId}/contacts/bulk":{"post":{"tags":["Contatos"],"summary":"Adicionar contatos a uma lista em lote","description":"Recebe até 1000 contatos e os adiciona em segundo plano, um a um, como o POST de um contato faz. A resposta diz quantos foram recebidos; um contato que não pode ser adicionado não é informado.","operationId":"api.contacts.bulk.store","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"subscribed":{"type":"boolean"}},"required":["email"],"additionalProperties":false},"maxItems":1000}}},"required":true},"responses":{"200":{"description":"Contatos na fila para processamento","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkQueued"}}}},"400":{"description":"O corpo não é válido, ou tem mais de 1000 contatos.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.bulk.store"},"delete":{"tags":["Contatos"],"summary":"Excluir contatos de uma lista em lote","description":"Exclui os contatos da lista que os ids indicam, de 1 a 1000. Ids que não estão na lista são ignorados.","operationId":"api.contacts.bulk.destroy","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"contactIds":{"type":"array","items":{"type":"string"},"minItems":1,"maxItems":1000}},"required":["contactIds"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Contatos excluídos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleted"}}}},"400":{"description":"O corpo não é válido, ou tem mais de 1000 ids.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.bulk.destroy"}},"/api/v1/contactBooks/{contactBookId}/contacts/{contactId}":{"get":{"tags":["Contatos"],"summary":"Consultar um contato","description":"Um contato da lista.","operationId":"api.contacts.show","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"O ID do contato.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"O contato","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Contato não encontrado (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.show"},"put":{"tags":["Contatos"],"summary":"Criar ou substituir um contato","description":"Faz o que o POST de um contato faz. O contactId do caminho não é lido: o contato é encontrado, ou criado, pelo e-mail.","operationId":"api.contacts.upsert","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"O ID do contato.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"subscribed":{"type":"boolean"}},"required":["email"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Contato criado ou atualizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactID"}}}},"400":{"description":"O corpo não é válido (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Lista de contatos não encontrada nesta equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.upsert"},"delete":{"tags":["Contatos"],"summary":"Excluir um contato","description":"Exclui o contato da lista.","operationId":"api.contacts.destroy","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"O ID do contato.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Contato excluído","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Success"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Contato não encontrado (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.destroy"},"patch":{"tags":["Contatos"],"summary":"Atualizar um contato","description":"Muda os campos que o corpo traz. As propriedades são mescladas sobre as antigas. É a chamada que inscreve um contato de novo, com subscribed true.","operationId":"api.contacts.update","parameters":[{"name":"contactBookId","in":"path","description":"O ID da lista de contatos.","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"O ID do contato.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"properties":{"type":"object","properties":{},"additionalProperties":false},"subscribed":{"type":"boolean"}},"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Contato atualizado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactID"}}}},"400":{"description":"O corpo não é válido (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Contato não encontrado (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.contacts.update"}},"/api/v1/domains":{"get":{"tags":["Domínios"],"summary":"Listar os domínios","description":"Os domínios da equipe dona da chave, do mais novo ao mais antigo, cada um com os registros DNS que precisa publicar. Uma chave restrita a um domínio vê só esse domínio.","operationId":"api.domains.index","responses":{"200":{"description":"Domínios que a chave de API alcança","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainList"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.domains.index"},"post":{"tags":["Domínios"],"summary":"Criar um domínio","description":"Cria o domínio, a chave DKIM dele e os registros a publicar. Uma chave restrita a um domínio não cria outro (403).","operationId":"api.domains.store","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"region":{"type":"string"}},"required":["name","region"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"Domínio criado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"O corpo não é válido: name e region são obrigatórios e devem ser texto.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.domains.store"}},"/api/v1/domains/{id}":{"get":{"tags":["Domínios"],"summary":"Consultar um domínio","description":"Um domínio da equipe. Enquanto está em verificação, a consulta confere o DNS antes de responder.","operationId":"api.domains.show","parameters":[{"name":"id","in":"path","description":"O ID do domínio.","required":true,"schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"O domínio","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Domain"}}}},"400":{"description":"O id não é um número.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"A chave é restrita a outro domínio (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.domains.show"},"delete":{"tags":["Domínios"],"summary":"Excluir um domínio","description":"Exclui o domínio e as chaves de API restritas a ele.","operationId":"api.domains.destroy","parameters":[{"name":"id","in":"path","description":"O ID do domínio.","required":true,"schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"Domínio excluído","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainDeleted"}}}},"400":{"description":"O id não é um número.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Domínio não encontrado (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.domains.destroy"}},"/api/v1/domains/{id}/verify":{"put":{"tags":["Domínios"],"summary":"Verificar um domínio","description":"Inicia a verificação dos registros DNS do domínio.","operationId":"api.domains.verify","parameters":[{"name":"id","in":"path","description":"O ID do domínio.","required":true,"schema":{"type":"string"},"example":1}],"responses":{"200":{"description":"Verificação iniciada","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"O id não é um número.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"Domínio não encontrado, ou a chave é restrita a outro.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TextError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.domains.verify"}},"/api/v1/emails":{"get":{"tags":["E-mails"],"summary":"Listar e-mails","description":"Os e-mails da equipe, do mais novo ao mais antigo, em páginas de até 50, com o total do mesmo filtro. Uma chave restrita a um domínio lista os e-mails desse domínio e ignora domainId. Com as duas datas, só endDate vale.","operationId":"api.emails.index","parameters":[{"name":"page","in":"query","schema":{"type":"string","default":"1"},"example":"1"},{"name":"limit","in":"query","schema":{"type":"string","default":"50"},"example":"50"},{"name":"startDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"2024-01-01T00:00:00Z"},{"name":"endDate","in":"query","schema":{"type":"string","format":"date-time"},"example":"2024-01-31T23:59:59Z"},{"name":"domainId","in":"query","schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"example":"123"}],"responses":{"200":{"description":"Lista de e-mails","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailList"}}}},"400":{"description":"Uma data não está no formato ISO 8601 em UTC.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.index"},"post":{"tags":["E-mails"],"summary":"Enviar um e-mail","description":"Aceita um e-mail e o coloca na fila. O domínio do remetente precisa ser da equipe e estar verificado. Um modelo (templateId e variables) substitui subject e html. Quando todos os destinatários de `to` estão na lista de supressão, o e-mail é registrado como SUPPRESSED e a resposta continua 200.","operationId":"api.emails.store","parameters":[{"name":"Idempotency-Key","in":"header","description":"Informe o cabeçalho opcional Idempotency-Key para poder repetir a requisição com segurança. A chave pode ter até 256 caracteres. O servidor guarda o corpo canônico da requisição e se comporta assim: a mesma chave com o mesmo corpo devolve os ids originais com 200 OK, sem enviar de novo; a mesma chave com um corpo diferente devolve 409 NOT_UNIQUE; a mesma chave enquanto outra requisição ainda está em andamento devolve 409 NOT_UNIQUE, tente de novo depois de um instante. As entradas expiram em 24 horas.","schema":{"type":"string","minLength":1,"maxLength":256}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"from":{"type":"string"},"subject":{"type":"string","description":"Opcional quando templateId é informado.","minLength":1},"templateId":{"type":"string","description":"ID de um modelo criado no painel."},"variables":{"type":"object","description":"Os valores das variáveis do modelo, em texto.","properties":{}},"replyTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"text":{"type":["string","null"],"minLength":1},"html":{"type":["string","null"],"minLength":1},"headers":{"type":"object","description":"Cabeçalhos personalizados do e-mail, do nome ao valor.","properties":{}},"attachments":{"type":"array","description":"Não aceito: o Meeng.dev não anexa, guarda nem repassa arquivos. Não envie a lista, ou envie uma vazia, e ponha links para os seus arquivos no corpo do e-mail. Uma lista com itens é recusada com 400 (ZodError).","maxItems":0},"scheduledAt":{"type":"string","format":"date-time"},"inReplyToId":{"type":["string","null"]}},"required":["to","from"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"E-mail aceito","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailId"}}}},"400":{"description":"O corpo ou um parâmetro não é válido (ZodError), ou a requisição foi recusada (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"O e-mail ou o modelo não é da equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"A Idempotency-Key já foi usada com outro corpo, ou está em uso por uma requisição em andamento (NOT_UNIQUE).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.store"}},"/api/v1/emails/batch":{"post":{"tags":["E-mails"],"summary":"Enviar até 100 e-mails em uma chamada","description":"Todos os e-mails são validados antes de qualquer um ser gravado, e todos são gravados juntos: ou todos são aceitos, na ordem em que vieram, ou nenhum é.","operationId":"api.emails.batch","parameters":[{"name":"Idempotency-Key","in":"header","description":"Informe o cabeçalho opcional Idempotency-Key para poder repetir a requisição com segurança. A chave pode ter até 256 caracteres. O servidor guarda o corpo canônico da requisição e se comporta assim: a mesma chave com o mesmo corpo devolve os ids originais com 200 OK, sem enviar de novo; a mesma chave com um corpo diferente devolve 409 NOT_UNIQUE; a mesma chave enquanto outra requisição ainda está em andamento devolve 409 NOT_UNIQUE, tente de novo depois de um instante. As entradas expiram em 24 horas.","schema":{"type":"string","minLength":1,"maxLength":256}}],"requestBody":{"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"to":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"from":{"type":"string"},"subject":{"type":"string","description":"Opcional quando templateId é informado.","minLength":1},"templateId":{"type":"string","description":"ID de um modelo criado no painel."},"variables":{"type":"object","description":"Os valores das variáveis do modelo, em texto.","properties":{}},"replyTo":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"cc":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"bcc":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"text":{"type":["string","null"],"minLength":1},"html":{"type":["string","null"],"minLength":1},"headers":{"type":"object","description":"Cabeçalhos personalizados do e-mail, do nome ao valor.","properties":{}},"attachments":{"type":"array","description":"Não aceito: o Meeng.dev não anexa, guarda nem repassa arquivos. Não envie a lista, ou envie uma vazia, e ponha links para os seus arquivos no corpo do e-mail. Uma lista com itens é recusada com 400 (ZodError).","maxItems":0},"scheduledAt":{"type":"string","format":"date-time"},"inReplyToId":{"type":["string","null"]}},"required":["to","from"],"additionalProperties":false},"maxItems":100}}},"required":true},"responses":{"200":{"description":"Lista dos ids dos e-mails aceitos","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailIds"}}}},"400":{"description":"O corpo ou um parâmetro não é válido (ZodError), ou a requisição foi recusada (BAD_REQUEST).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"O e-mail ou o modelo não é da equipe (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"409":{"description":"A Idempotency-Key já foi usada com outro corpo, ou está em uso por uma requisição em andamento (NOT_UNIQUE).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.batch"}},"/api/v1/emails/{emailId}":{"get":{"tags":["E-mails"],"summary":"Consultar um e-mail","description":"Um e-mail da equipe, com os eventos dele.","operationId":"api.emails.show","parameters":[{"name":"emailId","in":"path","description":"O ID do e-mail.","required":true,"schema":{"type":"string"},"example":"cuiwqdj74rygf74"}],"responses":{"200":{"description":"O e-mail","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Email"}}}},"400":{"description":"O id tem menos de três caracteres.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"O e-mail não é da equipe, ou não é do domínio da chave (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.show"},"patch":{"tags":["E-mails"],"summary":"Reagendar um e-mail","description":"Move um e-mail agendado para outro horário, em ISO 8601 e UTC. Só um e-mail ainda SCHEDULED pode ser movido (senão, 400 \"Email already processed\").","operationId":"api.emails.update","parameters":[{"name":"emailId","in":"path","description":"O ID do e-mail.","required":true,"schema":{"type":"string"},"example":"cuiwqdj74rygf74"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"type":"string","format":"date-time"}},"required":["scheduledAt"],"additionalProperties":false}}},"required":true},"responses":{"200":{"description":"E-mail reagendado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailId"}}}},"400":{"description":"O corpo não é válido, ou o e-mail já foi processado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"O e-mail não é da equipe, ou não é do domínio da chave (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.update"}},"/api/v1/emails/{emailId}/cancel":{"post":{"tags":["E-mails"],"summary":"Cancelar um e-mail agendado","description":"Cancela um e-mail que ainda está SCHEDULED (senão, 400 \"Email already processed\").","operationId":"api.emails.cancel","parameters":[{"name":"emailId","in":"path","description":"O ID do e-mail.","required":true,"schema":{"type":"string"},"example":"cuiwqdj74rygf74"}],"responses":{"200":{"description":"E-mail cancelado","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailId"}}}},"400":{"description":"O id não é válido, ou o e-mail já foi processado.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationError"}}}},"401":{"description":"Cabeçalho Authorization ausente (UNAUTHORIZED).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"403":{"description":"Chave de API inválida (FORBIDDEN).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"404":{"description":"O e-mail não é da equipe, ou não é do domínio da chave (NOT_FOUND).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"429":{"description":"Limite de requisições por segundo da equipe excedido (RATE_LIMITED); aguarde o tempo de Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}},"500":{"description":"Algo inesperado aconteceu (INTERNAL_SERVER_ERROR).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}},"security":[{"Bearer":[]}],"x-arandu-module":"web","x-arandu-route-name":"api.emails.cancel"}}},"components":{"schemas":{"ApiError":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["BAD_REQUEST","FORBIDDEN","INTERNAL_SERVER_ERROR","NOT_FOUND","NOT_UNIQUE","RATE_LIMITED","UNAUTHORIZED","METHOD_NOT_ALLOWED","NOT_IMPLEMENTED"]},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"BulkDeleted":{"type":"object","required":["success","count"],"properties":{"success":{"type":"boolean"},"count":{"type":"integer"}}},"BulkQueued":{"type":"object","required":["message","count"],"properties":{"message":{"type":"string"},"count":{"type":"integer"}}},"Campaign":{"type":"object","required":["id","name","from","subject","previewText","contactBookId","html","content","status","scheduledAt","batchSize","batchWindowMinutes","total","sent","delivered","opened","clicked","unsubscribed","bounced","hardBounced","complained","replyTo","cc","bcc","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"previewText":{"type":["string","null"]},"contactBookId":{"type":["string","null"]},"html":{"type":["string","null"]},"content":{"type":["string","null"]},"status":{"type":"string"},"scheduledAt":{"type":["string","null"]},"batchSize":{"type":"integer"},"batchWindowMinutes":{"type":"integer"},"total":{"type":"integer"},"sent":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"unsubscribed":{"type":"integer"},"bounced":{"type":"integer"},"hardBounced":{"type":"integer"},"complained":{"type":"integer"},"replyTo":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"CampaignPage":{"type":"object","required":["campaigns","totalPage"],"properties":{"campaigns":{"type":"array","items":{"type":"object","required":["id","name","from","subject","createdAt","updatedAt","status","scheduledAt","total","sent","delivered","unsubscribed"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"status":{"type":"string"},"scheduledAt":{"type":["string","null"]},"total":{"type":"integer"},"sent":{"type":"integer"},"delivered":{"type":"integer"},"unsubscribed":{"type":"integer"}}}},"totalPage":{"type":"integer"}}},"CampaignRow":{"type":"object","required":["id","name","from","subject","previewText","contactBookId","html","content","status","scheduledAt","batchSize","batchWindowMinutes","total","sent","delivered","opened","clicked","unsubscribed","bounced","hardBounced","complained","replyTo","cc","bcc","createdAt","updatedAt","teamId","domainId","isApi","lastCursor","lastSentAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"from":{"type":"string"},"subject":{"type":"string"},"previewText":{"type":["string","null"]},"contactBookId":{"type":["string","null"]},"html":{"type":["string","null"]},"content":{"type":["string","null"]},"status":{"type":"string"},"scheduledAt":{"type":["string","null"]},"batchSize":{"type":"integer"},"batchWindowMinutes":{"type":"integer"},"total":{"type":"integer"},"sent":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"unsubscribed":{"type":"integer"},"bounced":{"type":"integer"},"hardBounced":{"type":"integer"},"complained":{"type":"integer"},"replyTo":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"teamId":{"type":"integer"},"domainId":{"type":"integer"},"isApi":{"type":"boolean"},"lastCursor":{"type":["string","null"]},"lastSentAt":{"type":["string","null"]}}},"Contact":{"type":"object","required":["id","firstName","lastName","email","subscribed","unsubscribeReason","properties","contactBookId","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"firstName":{"type":["string","null"]},"lastName":{"type":["string","null"]},"email":{"type":"string"},"subscribed":{"type":"boolean"},"unsubscribeReason":{"type":["string","null"]},"properties":{"type":"object","additionalProperties":{"type":"string"}},"contactBookId":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}}},"ContactBook":{"type":"object","required":["id","name","teamId","properties","variables","emoji","doubleOptInEnabled","doubleOptInFrom","doubleOptInSubject","doubleOptInContent","createdAt","updatedAt"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"teamId":{"type":"integer"},"properties":{"type":"object","additionalProperties":{"type":"string"}},"variables":{"type":"array","items":{"type":"string"}},"emoji":{"type":"string"},"doubleOptInEnabled":{"type":"boolean"},"doubleOptInFrom":{"type":["string","null"]},"doubleOptInSubject":{"type":["string","null"]},"doubleOptInContent":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"_count":{"anyOf":[{"type":"object","required":["contacts"],"properties":{"contacts":{"type":"integer"}}},{"type":"null"}]}}},"ContactBookDeleted":{"type":"object","required":["id","success","message"],"properties":{"id":{"type":"string"},"success":{"type":"boolean"},"message":{"type":"string"}}},"ContactBookList":{"$ref":"#/components/schemas/ContactBookList"},"ContactID":{"type":"object","required":["contactId"],"properties":{"contactId":{"type":"string"}}},"ContactList":{"$ref":"#/components/schemas/ContactList"},"Domain":{"type":"object","required":["id","name","teamId","status","region","clickTracking","openTracking","publicKey","dkimSelector","dkimStatus","spfDetails","dmarcAdded","isVerifying","errorMessage","subdomain","verificationError","lastCheckedTime","createdAt","updatedAt","dnsRecords"],"properties":{"id":{"type":"integer"},"name":{"type":"string"},"teamId":{"type":"integer"},"status":{"type":"string"},"region":{"type":"string"},"clickTracking":{"type":"boolean"},"openTracking":{"type":"boolean"},"publicKey":{"type":"string"},"dkimSelector":{"type":"string"},"dkimStatus":{"type":"string"},"spfDetails":{"type":"string"},"dmarcAdded":{"type":"boolean"},"isVerifying":{"type":"boolean"},"errorMessage":{"type":["string","null"]},"subdomain":{"type":["string","null"]},"verificationError":{"type":["string","null"]},"lastCheckedTime":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"dnsRecords":{"type":"array","items":{"$ref":"#/components/schemas/DomainDnsRecord"}}}},"DomainDeleted":{"type":"object","required":["id","success","message"],"properties":{"id":{"type":"integer"},"success":{"type":"boolean"},"message":{"type":"string"}}},"DomainDnsRecord":{"type":"object","required":["type","name","value","ttl","status"],"properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"},"ttl":{"type":"string"},"priority":{"type":["string","null"]},"status":{"type":"string"},"recommended":{"type":["boolean","null"]}}},"DomainList":{"$ref":"#/components/schemas/DomainList"},"Email":{"type":"object","required":["id","teamId","to","replyTo","cc","bcc","from","subject","html","text","createdAt","updatedAt","latestStatus","scheduledAt","emailEvents"],"properties":{"id":{"type":"string"},"teamId":{"type":"integer"},"to":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"latestStatus":{"type":["string","null"]},"scheduledAt":{"type":["string","null"]},"emailEvents":{"type":"array","items":{"$ref":"#/components/schemas/EmailEvent"}}}},"EmailEvent":{"type":"object","required":["emailId","status","createdAt"],"properties":{"emailId":{"type":"string"},"status":{"type":"string"},"createdAt":{"type":"string"},"data":{"type":"object","additionalProperties":{}}}},"EmailId":{"type":"object","required":["emailId"],"properties":{"emailId":{"type":"string"}}},"EmailIds":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/EmailId"}}}},"EmailList":{"type":"object","required":["data","count"],"properties":{"data":{"type":"array","items":{"type":"object","required":["id","to","replyTo","cc","bcc","from","subject","html","text","createdAt","updatedAt","latestStatus","scheduledAt","domainId"],"properties":{"id":{"type":"string"},"to":{"type":"array","items":{"type":"string"}},"replyTo":{"type":"array","items":{"type":"string"}},"cc":{"type":"array","items":{"type":"string"}},"bcc":{"type":"array","items":{"type":"string"}},"from":{"type":"string"},"subject":{"type":"string"},"html":{"type":["string","null"]},"text":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"latestStatus":{"type":["string","null"]},"scheduledAt":{"type":["string","null"]},"domainId":{"type":["integer","null"]}}}},"count":{"type":"integer"}}},"EmailTimeSeries":{"type":"object","required":["result","totalCounts"],"properties":{"result":{"type":"array","items":{"type":"object","required":["date","sent","delivered","opened","clicked","bounced","complained"],"properties":{"date":{"type":"string"},"sent":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"bounced":{"type":"integer"},"complained":{"type":"integer"}}}},"totalCounts":{"type":"object","required":["sent","delivered","opened","clicked","bounced","complained"],"properties":{"sent":{"type":"integer"},"delivered":{"type":"integer"},"opened":{"type":"integer"},"clicked":{"type":"integer"},"bounced":{"type":"integer"},"complained":{"type":"integer"}}}}},"ReputationMetrics":{"type":"object","required":["delivered","hardBounced","complained","bounceRate","complaintRate"],"properties":{"delivered":{"type":"integer"},"hardBounced":{"type":"integer"},"complained":{"type":"integer"},"bounceRate":{"type":"number"},"complaintRate":{"type":"number"}}},"Success":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean"}}},"TextError":{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"additionalProperties":false},"ValidationError":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"object","properties":{"issues":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":false}},"name":{"type":"string"}},"required":["issues","name"],"additionalProperties":false}},"required":["success","error"],"additionalProperties":false}},"securitySchemes":{"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"Chave de API da equipe, no formato mg_\u003cclientId\u003e_\u003ctoken\u003e, criada em Configurações, Chaves de API."}}},"tags":[{"name":"Domínios","description":"Os domínios de envio da equipe, os registros DNS deles e a verificação."},{"name":"E-mails","description":"Enviar, agendar, listar, atualizar e cancelar e-mails."},{"name":"Contatos","description":"As listas de contatos e os contatos dentro delas."},{"name":"Campanhas","description":"Criar, agendar, pausar e retomar campanhas."},{"name":"Análises","description":"Séries temporais e métricas de reputação."}]}