Skip to main content
POST
Send bulk template

Authorizations

Authorization
string
header
required

Token JWT de autenticação

Headers

x-company-id
string

Target company identifier. Required only for global API keys (type=global). Ignored for company API keys and human users.

Body

multipart/form-data
inboxId
string
required

ID of the inbox/WhatsApp connection to use for sending

Minimum string length: 1
templateName
string
required

Name of the template registered on WhatsApp Business

Minimum string length: 1
languageCode
string
default:pt_BR

Template language code (format: pt_BR, en_US, en, etc.)

components
object[]

List of the template's components with their parameters/variables. Use it to customize header, body, and buttons with dynamic data.

contacts
object[]

List of contacts that will receive the template. Optional if you send a CSV/Excel file with the contacts.

who_will_answer
enum<string>
default:AGENT

Defines who will answer after the template is sent. Values: AGENT (AI agent), HUMAN (human attendant). Default: AGENT

Available options:
AGENT,
HUMAN,
UNASSIGNED
agentToActivate
string

ID of the AI agent that will be activated to answer. Used together with who_will_answer=AGENT

keep_existing_assignment
boolean
default:false

If true, preserves the conversation's current assignment: nothing is written to owner/agent and who_will_answer is NOT applied (the AI does not take over). Default false so as not to change the behavior of existing integrations via API key — the support front end sends true.

owner_user_id
string | null

ID of the user who owns the conversation. null is the explicit choice of "Unassigned" (authorizes clearing the current owner); absent means the caller did not weigh in on the assignment.

attendant_user_id
string | null

ID of the attendant user. Applies when who_will_answer=HUMAN. null is an explicit "Unassigned"; absent means the caller did not weigh in. The owner takes precedence: conversation.user = owner ?? attendant.

Response

Bulk send executed successfully (returns detailed statistics)

totalProcessed
number
required

Total contacts processed

sentCount
number
required

Number of messages sent successfully

errorCount
number
required

Number of errors during the send

errors
object[]
required

Detailed list of errors that occurred

sentContacts
object[]
required

List of contacts that received the message successfully