Create a campaign
Prepare a campaign with up to 10000 recipients, each a phone address with an optional contactId and variables. A call campaign (the default) has a voice Agent call each one. With channelType: whatsapp and an approved template, each one is sent the template, its parameters filled from their variables ({{name}}) and, when its header is a document, image or video, their own header file; its text Agent answers whoever replies. Nobody is reached until it is started. A list adds nobody to the organization's contacts: a recipient becomes the contact it names, or the owner of its number (created when none exists), when the campaign first reaches them. A longer list continues with updateCampaign and addRecipients. Nothing happens outside contactHours (in timeZone, the organization's by default) or outside scheduledStartAt and scheduledEndAt; each recipient gets up to maxAttempts attempts, retryAfterMinutes apart, after the results in retryOn. Read it with expand=readiness to see whether it can start. Starting it (REST POST /v1/campaigns/{campaignId}/start) is not an AI tool.
- Scope:
raiz:campaigns:write - Credentials: an API key, a client-credentials token or a person's access token
- Effect: writes; not idempotent: check the outcome before you retry
- Limits: request body up to 2 MB, response up to 1 MB
- CLI:
arbol raiz campaigns create· MCP tool:raiz_campaigns_create
https://api.getarbol.com/v1/raiz/campaignsAuthorization
Request body JSON required
One of the following:
- object
- object
Returns
200
Successful operation.
400
INVALID_INPUT: The request does not match the published schema.INVALID_CURSOR: The cursor is malformed or belongs to a different list.
404
NOT_FOUND: The requested resource does not exist.RESOURCE_NOT_FOUND: The requested resource does not exist in this organization.
409
CAMPAIGN_AGENT_NOT_READY: The campaign's Agent must be an active text Agent: it answers whoever replies to the message.CAMPAIGN_NO_RECIPIENTS: The campaign has nobody left to reach. Add recipients first.CHANNEL_TYPE_MISMATCH: This operation or field does not apply to this channel's type.VOICE_AGENT_NOT_READY: The Agent cannot take calls yet: it must be an active voice Agent with instructions, published for calls.INVALID_STATE: The resource is not in a state that allows this operation.VERSION_CONFLICT: The resource changed after it was read. Read it again and retry with the new version.
422
TIME_ZONE_UNKNOWN: The time zone is not in the IANA time zone database.CAMPAIGN_VARIABLE_MISSING: A recipient has no value for a variable the template's parameters use. An empty value cannot be sent on WhatsApp.CHANNEL_AGENT_MISMATCH: This Agent cannot serve this channel: voice channels need a voice Agent; WhatsApp and web channels need a text Agent.
502
OUTCOME_UNKNOWN: The operation may have been applied; check its result before repeating it.
503
UPSTREAM_UNAVAILABLE: The upstream service could not complete the request.CAMPAIGN_HEADER_NOT_STORED: The campaign and its recipients were saved, but some recipients' files were not. Send those recipients again withaddRecipientson this campaign: their numbers are kept and their files stored. Do not create the campaign again.INTEGRATIONS_UNAVAILABLE: The organization's integrations cannot be read right now. Try again shortly.