Criar campanha
Changed onCria a campanha, valida template e variáveis, reserva a cota do plano e debita o custo total da carteira antes de enfileirar. Os envios rodam em segundo plano. Contatos bloqueados no envio (opt-out, número inválido, limite de frequência) são estornados um a um.
- Idempotency-Key é obrigatório. Repetir a chave devolve a campanha já criada, sem cobrar de novo. A unicidade da chave é global na Arara, não por organização: derive do identificador da campanha no seu sistema, com um prefixo só seu (ex. acme-campanha-8842).
- scheduledAt agenda o envio, entre 5 minutos e 30 dias à frente. A campanha nasce SCHEDULED, já cobrada. Fora da janela: 400 CAMPAIGN_SCHEDULE_TOO_SOON ou 400 CAMPAIGN_SCHEDULE_TOO_FAR.
- abTest cria o teste A/B junto com a campanha. templateName é a variante A.
Pré-requisitos: número dedicado conectado (403 NO_DEDICATED_NUMBER), saldo para o total (402 INSUFFICIENT_FUNDS) e cota do plano (403 PLAN_LIMIT_REACHED).
Permissão: CAMPAIGNS_SEND.
Request
- Base URLhttps://api.ararahq.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Headers
Identificador único da campanha. Derive do identificador da campanha no seu sistema (ex. acme-campanha-8842) e reuse a mesma chave nas retentativas. A unicidade é global na Arara.
Request body
Example request
{
"contacts": [
{
"to": "+5511999999999"
}
]
}Response
Campanha criada (ou existente, se a chave já foi usada)
Example response
{
"id": "7b3789fb-4c5d-6789-abcd-ef0123456789",
"name": "Black Friday 2026",
"status": "INGESTING",
"totalMessages": 2,
"totalCost": 0.767,
"scheduledAt": null
}Changes
- info
api tag
Campanhasadded - info
api tag
campaignsremoved - info
added the non-success response with the status
- info
- breaking
the response's body type changed from
objectto no type for status - breaking
the response property
/became nullable for the status - breaking
the response property
became optional for the status - breaking
the
response's property type changed fromobjecttostringfor status - breaking
the
response's property format changed fromfloatto no format for status - breaking
removed the required property
from the response with the status - breaking
removed the required property
/from the response with the status - breaking
removed the required property
/from the response with the status - warning
for the
headerrequest parameterIdempotency-Key, the maxLength was set to255 - warning
removed the optional property
/from the response with the status - warning
added the new
AB_TESTINGenum value to theresponse property for the response status - warning
added the new
CANCELEDenum value to theresponse property for the response status - warning
added the new
COMPLETEDenum value to theresponse property for the response status - warning
added the new
COMPLETED_WITH_ERRORSenum value to theresponse property for the response status - warning
added the new
FAILEDenum value to theresponse property for the response status - warning
added the new
INGESTINGenum value to theresponse property for the response status - warning
added the new
SCHEDULEDenum value to theresponse property for the response status - info
added the new optional request property
- info
added the new optional request property
- info
added to the response body
anyOflist for the response status - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
removed the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- breaking