Index:
- Introduction
- Summary of requests
- Entities
- Sending a campaign
- Fields of the campaign entity
- Individual campaign
- Mass campaign with single send
- Mass campaign with dynamic audience (Beta)
- Campaign creation
- Audience inclusion
- Sending the campaign
- Campaign summary
- Requirements
- Commands
- Get the summary of a specific campaign
- Campaign audience
- Fields of the audience entity
- Response fields
- Get campaign audience
- Campaign message
- Response fields
- Campaign report
- Examples of active messages via ActiveCampaign API (Blip)
- Frequently Asked Questions
Introduction
The Active Campaign API allows for the integration and automation of your marketing campaigns, contact management, activity tracking, and much more. With our API, you can access and manipulate real-time data, customize automated workflows, and optimize your digital marketing strategies.
In this guide, you'll find comprehensive documentation for all the available endpoints, request parameters, request examples, and expected responses. Learn how to explore resources and take full advantage of all the available features.
Summary of Requests
Create new campaign:
- /campaign/full
- /campaign/v2
- /audiences/v2/{CAMPAIGN_ID}
- /audiences/v2/{CAMPAIGN_ID}/file
- /dispatch/v2
Campaign summary
- /campaigns/summaries
- /campaigns/{CAMPAIGN_ID}/summaries
Campaign audience
- /audiences/{CAMPAIGN_ID}
Campaign messages
- /messages/{CAMPAIGN_ID}
Campaign report
- /campaigns/{CAMPAIGN_ID}/reports
Entities
Campaign
A campaign refers to an action of sending messages either individually or in bulk (CampaignType) to a specific group of users. It is a way to reach and communicate with a large number of users in an automated and efficient manner.
Through the BLiP platform, developers and marketers can create campaigns that send messages to WhatsApp and set up redirection for the customer to a specific step (StateId) in the bot flow (FlowId) when responding to a message.
Campaigns can be configured to send messages in real-time or scheduled for a specific time.
Audience
The audience is the specific target group for the marketing campaign. It consists of a list of individuals who will receive the message.
Each item contains a phone number (recipient) and parameters related to it that will be added to the message (messageParams).
Message
The "message" entity represents the message to be sent in the marketing campaign. It has the name of the template (messageTemplate) that contains the content of the message, and a list of parameters that will be used to personalize the message with the specific values for each recipient (messageParams).
Sending a Campaign
The Active Campaign API allows the creation of campaigns for sending messages either individually or in bulk.
Fields of the Campaign Entity
| Field | Description | Required |
| Id | Unique identifier of the campaign. |
|
| Name | The name of the campaign. | * |
| CampaignType | The campaign's sending strategy type. Individual or bulk. | * |
| Scheduled | The date for scheduling the campaign. The expected date format is UTF. |
|
| MasterState | The state of the child router for flow redirection. |
|
| FlowId | The bot flow identifier. It is unique to each bot and can be retrieved from the builder's settings. |
|
| StateId | The StateId is the identifier of the specific state the bot is in within the conversation flow. |
|
| ChannelType | It is the definition of the channel that will be used for sending. If not specified, the WhatsApp channel will be used by default. | WhatsApp or GoogleRcs |
| SourceApplication | Identifier of the campaign origin tool. In case the campaigns have multiple origins, this field can help mark where each one was created. | WhatsApp or GoogleRcs |
| Tags | Custom elements that allow groupings of the campaigns. Content must be passed as an array. | WhatsApp or GoogleRcs |
The audience information is:
| Field | Description | Required |
| Recipient |
Who will receive the campaign. It must include the country code (DDI), area code (DDD), and phone number. The MSISDN format will be applied to the number if not provided. |
* |
| MessageParams | Parameters that are part of the message personalization. If any, add them as a dictionary. | |
| ContextVariables | Parameters that are part of the customization of contact context variables. If there is a need to add context variables, include them as a dictionary. |
In the MessageParams field of the Audience entity, all values, except for the phone number, will be saved in the contact's extras. This means you can include additional and custom parameters in the MessageParams field, and these values will be stored in contact.extras.
"Contact extras" refer to additional information stored about each contact in a contact management system. These extra data can include custom fields that capture specific information about each contact, enabling more effective segmentation, personalization, and analysis of marketing campaigns.
In the ContextVariables field of the Audience entity, all values added will be saved in the contact as context variables. This means you can use them within your flow and customize their usage in a campaign send. These values can be referenced within a flow using {{context.variableName}} or simply {{variableName}}. If it is a complex object, you can use {{variableName@companyId}}. Learn more here.
For example, in addition to common data such as name and email, you can add extra fields to store information like age, geographical location, product preferences, purchase history, and more.
The message information is:
| Field | Description | Required |
| MessageTemplate | Message template name | There is no template if the channel is RCS. |
| MesssageParams |
Parameters that are part of the message personalization.
Note:The number of parameters must match the exact number of parameters in the selected message template.
Total characters: 250
Listed in array format |
|
| MessageContent | Field that contains the message content in case the channel is RCS. | |
| ChannelType | It is the definition of the channel that will be used for sending. If not specified, the WhatsApp channel will be used by default. | WhatsApp or GoogleRcs |
Automatically filled response fields of the request
| Field | Description |
| Status | The sending status of the campaign. |
| Created | The date and time of campaign creation. |
| FailedReason | Reason in case of sending failure. |
Individual campaign
To send a campaign to just one contact, you need to follow the example below, sending as the "resource" an object that contains the following properties: campaign, audience, and message.
Endpoint: /campaign/full
Request for WhatsApp
{
"id": "%commandId",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo e sem disparo",
"campaignType": "Individual",
"flowId": "{flowId}",
"stateId": "{stateId}",
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "WhatsApp",
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"
],
},
"audience": {
"recipient": "+5531999...",
"messageParams": {
"1": "Repasse do novo Broadcast"
},
"contextVariables": {
"cpf": "123456789001",
"cpf2": 1000111222,
"canUseTheseValues": false,
"specificContext": {
"foo": "111specififForFoo44431",
"bar": "222specififForBar55512"
}
},
"message": {
"messageTemplate": "email_commerce_resposta",
"messageParams": [
"1"
],
"channelType": "WhatsApp"
}
}
}
Request for Google RCS
{
"id": "%commandId",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo e sem disparo",
"campaignType": "Individual",
"flowId": "{flowId}",
"stateId": "{stateId}",
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "GoogleRcs"
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"
],
},
"audience": {
"recipient": "+5531999...",
"messageParams": {
"1": "Repasse do novo Broadcast"
},
},
"message": {
"messageContent": "Exemplo de mensagem",
"messageParams": [
"1"
],
"channelType": "GoogleRcs"
}
}
}Response
|
If there is a need to have extra information for each contact, it is possible to add parameters within the audience object in the messageParams property, named for example as "extras1", "extras2", and so on. They don’t necessarily need to be defined as "extra1" or "extra2"; the important thing is to follow the "key" and "value" pattern.
In this way:
|
Bulk campaign with a single send
To send a campaign to multiple contacts, the resource object must have the following properties: campaign, audiences, and message, where the audiences field must be of type array, and the information defined in “campaignType” must be “Batch”.
Endpoint: /campaign/full
Request for WhatsApp
{
"id": "%commandId",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha batch completo e sem disparo",
"campaignType": "Batch",
"flowId": "{flowId}",
"stateId": "{stateId}",
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "WhatsApp"
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"
],
},
"audiences": [
{
"recipient": "+55319...",
"messageParams": {
"1": "Repasse do novo Broadcast"
}
},
{
"recipient": "+55319..",
"messageParams": {
"1": "Repasse do novo Broadcast 2"
},
}
],
"message": {
"messageTemplate": "email_commerce_resposta",
"messageParams": [
"1"
],
"channelType": "WhatsApp"
}
}
}Request for Google RCS
{
"id": "%commandId",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha batch completo e sem disparo",
"campaignType": "Batch",
"flowId": "{flowId}",
"stateId": "{stateId}",
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "GoogleRcs",
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"
],
},
"audiences": [
{
"recipient": "+55319...",
"messageParams": {
"1": "Repasse do novo Broadcast"
}
},
{
"recipient": "+55319..",
"messageParams": {
"1": "Repasse do novo Broadcast 2"
},
}
],
"message": {
"messageContent": "Mensagem de teste",
"messageParams": [
"1"
],
"channelType": "GoogleRcs"
}
}
}Response
|
Bulk campaign with dynamic audience (Beta)
This approach involves the use of multiple requests: one to create the campaign, several to add the audience, and later, a final one to trigger the campaign. Unlike the bulk campaign with a single send, where everything is done in a single request, the dynamic flow offers more control and flexibility by separating the steps into different requests.
With the dynamic flow, you can have more granular control over each step of the campaign process.
Campaign creation
Endpoint: /campaign/v2
Request for WhatsApp
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/v2",
"type": "application/vnd.iris.activecampaign.campaign-dynamic+json",
"resource": {
"campaign": {
"name": "Campanha em Massa postman {{$guid}}",
"campaignType": "Batch",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}"
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "WhatsApp",
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"],
},
"message": {
"messageTemplate": "{{messageTemplate}}",
"channelType": "WhatsApp"
}
}
}Request for GoogleRcs
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/v2",
"type": "application/vnd.iris.activecampaign.campaign-dynamic+json",
"resource": {
"campaign": {
"name": "Campanha em Massa postman {{$guid}}",
"campaignType": "Batch",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}"
//only for router
"masterstate": "masterstate@msging.net",
"channelType": "GoogleRcs",
"sourceApplication": "Postman",
"tags": ["value1","valeu2","valeu3"],
},
"message": {
"messageContent": "Exemplo de mensagem",
"channelType": "GoogleRcs"
}
}
}Response
|
{ "type": "application/vnd.iris.activecampaign.campaign+json", "resource": { "id": "ffc99160-5182...", "name": "Campanha em Massa", "campaignType": "BATCH", "flowId": "f7bfd815-1327...", "stateId": "onboarding", "status": "new", "created": "2024-06-03T17:21:05.577Z" }, "method": "set", "status": "success", "id": "...", "from": "...", "to": "...", "metadata": { "traceparent": "...", "#command.uri": "..." } } |
Audience inclusion
The inclusion of the audience can be called as many times as necessary, limited only by the number of audiences accepted in the campaign.
Sending a list in the request
Endpoint: /audiences/v2/{{ID of the created campaign}}
Request
|
Response
|
Sending list via CSV file
Endpoint:/audiences/v2/{{ID of the created campaign}}
Request
|
Response
|
Notes
To provide context variables in the CSV, you can pass an escaped JSON, as shown in the example below, using the column header #contextvariables#.
Example:
{\"cpf\":\"123456789001\",\"cpf2\":1000111222,\"canUseTheseValues\":false,\"specificContext\":{\"foo\":\"111specififForFoo44431\",\"bar\":\"222specififForBar55512\"}
Sending the campaign
This refers to the action of sending the campaign that has been created and has its audience populated.
Note:
Once the campaign is sent, it is no longer possible to add new audiences.
Endpoint: /dispatch/v2
Request
|
Response
|
Campaign summary
Through this functionality, you will have access to important information about your campaigns, allowing for a detailed analysis of performance and the status of the target audience.
Note:
If no filter is provided, all campaigns created on the specified date or later will be returned.
The request can receive the following data as a filter:
| Field | Description |
| SourceApplication | Campaign source, e.g., Portal, Desk, Broadcast-Plugin, or API. |
| CampaignSender | Who sent the campaign. |
| Created | The date that determines which campaigns will be included in the request response. Only the campaigns created on that date will be considered. |
If the created filter is not provided, all campaigns created on the specified date or later will be returned.
The response of the request consists of:
| Field | Description |
| id | Campaign identifier |
| messageTemplate | Message template name |
| name | Campaign name |
| sendDate | Send date and target audience status |
| FlowId | Bot flow identifier |
| StateId | Sent block identifier |
| statusAudience | The audience status consists of a list with the processing status of the recipient and identity. |
Requirements
At least one campaign must be registered for the bot.
Commands
Get the campaign summary
By using this request, campaigns that meet the criteria of the provided filter will be returned.
Endpoint: /campaigns/summaries
Requisição
|
Response
|
Get the summary of a specific campaign
To get the summary of a specific campaign, you can use this request by providing the campaign ID. This will allow you to retrieve detailed information about that specific campaign, such as the template used, send date, and target audience status.
Endpoint: /campaigns/{Campaign ID}/summaries
Requirements
- The Campaign ID
Request
|
Response
|
Campaign Audience
The audience of a campaign is the specific target group for the marketing campaign. It consists of a group of individuals, and their selection can be based on demographic, behavioral, or other relevant criteria.
With our API, you can retrieve information about the audience of a campaign.
Fields of the audience entity
| Field | Description | Required |
| Recipient | The phone number of the message recipient. Only valid phone numbers will be considered. | * |
| MessageParams | The dictionary with the names and values of the message template parameters. |
Response fields
| Field | Description |
| Total | Total audience |
| Items | List specifying the audience |
The items are composed of:
| Field | Description |
| CampaignId | Campaign ID |
| Recipient | The message recipient |
| RecipientType | The type referring to what was sent in the recipient, for example, if it's a phone number |
| ChannelType | The channel through which the audience was reached |
| MessageParams |
Parameters that were sent in the message.
The maximum character limit is 250. |
| Status | The sending status |
| AudienceStatus | The sending status of the target audience |
| ValidatedAccount | The validated account of the target audience. |
| Received | The date and time when the message was received. |
| Read | The date and time when the message was read. |
| Failed | The date and time when the message failed. |
| ReasonCode | The failure reason code. |
| ReasonDescription | The description of the failure reason. |
Get campaign audience
Endpoint: /audiences/{Campaign ID}
We can use this endpoint to get the audience of a specific campaign.
Requirements
- The Campaign ID
Request
|
Response
|
Campaign message
Message template fields
| Field | Description | Required |
| ChannelType |
The channel type. "WhatsApp" = Default or "GoogleRcs" |
|
| MessageTemplate | The name of the message template. | Used with the WhatsApp channel |
| MessageContent | The content of the message. | Used with the RCS channel |
| MessageTemplateLanguage | The language of the message template. | |
| MessageParams | The list of parameter names. This value is used to validate the number of parameters for the target audience when the campaign is individual. |
Response Fields
The response is composed of:
| Field | Descrição |
| Total | Total number of messages |
| Items | List of sent messages |
The Items field is composed of:
| Field | Description |
| ChannelType | Channel type |
| MessageTemplate | Message template name |
| MessageParams | Parameters that were sent in the message |
Get the messages of a campaign
Endpoint: /messages/{campaignId}
Requirements
The Campaign ID
Request
|
Response
|
Campaign Report
To obtain a report on the status of a campaign, you can use this request. The report includes information about the message template used in the campaign and the redirection destination. This will provide you with a comprehensive view of the campaign's performance and results, helping you make decisions for future optimization.
Requirements
The Campaign ID
Request
The response is composed of:
| Field | Description |
| Id | Campaign ID |
| Name | Campaign name |
| MessageTemplate | Message template chosen for the campaign |
| MasterState | The main state of the campaign, if the bot is a router |
| FlowId | Campaign flow ID |
| StateId | Campaign state ID |
| StateName | Campaign state name |
| AttendanceRedirect | The email of the agent to whom the campaign will be redirected, if this option was chosen |
| CampaignSender | The email of the person who sent the campaign |
| SendDate | Date when the campaign was sent |
| StatusAudience | A list of the campaign numbers' statuses |
The StatusAudience property is a list where each item is composed of:
| Field | Description |
| RecipientIdentity | Contact number. If there was no error during the preprocessing of this number, the validated number provided by WhatsApp will be displayed. Otherwise, the number provided in the target audience file or in the request at the time of campaign creation will be displayed. |
| Status | Target audience status at the time of the request. |
| ReasonCode | The failure reason code of the target audience. |
| ReasonDescription | The failure reason description of the target audience. |
| Processed | The date and time when the target audience was sent to the end user. |
| Received | The date and time when the target audience was received by the end user. |
| Read | The date and time when the target audience was read by the end user. |
| Failed | The date and time when the target audience failed. |
| NumberStatus | The processing status of the target audience. |
Get the report of a specific campaign
Endpoint: /campaigns/{campaignId}/reports
Request
|
Response
|
Examples of active messages via ActiveCampaign API (Blip)
To facilitate the creation of payloads, below are some examples for creating campaigns:
Basic Template without variables
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Sem variavel 7",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audience": {
"recipient": "{{phonenumber1}}"
},
"message": {
"messageTemplate": "{{templateWIthoutVariable}}",
"channelType": "WhatsApp"
}
}
}Basic Template with variables
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Com variavel 10",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audience": {
"recipient": "{{phonenumber1}}",
"messageParams": {
"1": "{{username1}}"
}
},
"message": {
"messageTemplate": "{{templateWithVariable}}",
"messageParams": [
"1"
],
"channelType": "WhatsApp"
}
}
}Sending using "Reply with URL" type templates
In this example, we use an individual trigger (Individual) for a template that has a button with a dynamic URL.
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual - Quicky reply",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"masterstate": "{{stateId}}",
"channelType": "WhatsApp"
},
"audience": {
"recipient": "{{phonenumber1}}",
"messageParams": {
"1": "https://blipmediastore.blob.core.windows.net/public-medias/Media_4709f14b-55b4-474e-9e0c-75264349df82",
"2": "1234"
}
},
"message": {
"messageTemplate": "{{nomedotemplate}}",
"messageParams": [
"1",
"2"
],
"channelType": "WhatsApp"
}
}
}Template with Image
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Com Imagem 1",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audience": {
"recipient": "{{phonenumber1}}",
"messageParams": {
"image": "https://images3.alphacoders.com/107/thumb-1920-1070509.jpg",
"username": "{{username1}}"
}
},
"message": {
"messageTemplate": "{{templateWithImage}}",
"messageParams": [
"image", "username"
],
"channelType": "WhatsApp"
}
}
}Template with Video
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Com Video 10",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audience": {
"recipient": "{{phonenumber1}}",
"messageParams": {
"video": "https://v.ftcdn.net/17/86/49/30/240_F_1786493040_OGqTFtyomFdsGwkoRbYkUSsWKINLbirM_ST.mp4",
"username": "{{username1}}"
}
},
"message": {
"messageTemplate": "{{templateWithVideo}}",
"messageParams": [
"video", "username"
],
"channelType": "WhatsApp"
}
}
}Template with Video for bulk sending
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Com Video 2",
"campaignType": "Batch",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audiences": [
{
"recipient": "{{phonenumber1}}",
"messageParams": {
"video": "https://v.ftcdn.net/17/86/49/30/240_F_1786493040_OGqTFtyomFdsGwkoRbYkUSsWKINLbirM_ST.mp4",
"username": "{{username1}}"
}
},
{
"recipient": "{{phonenumber2}}",
"messageParams": {
"video": "https://v.ftcdn.net/17/86/49/30/240_F_1786493040_OGqTFtyomFdsGwkoRbYkUSsWKINLbirM_ST.mp4",
"username": "{{username2}}"
}
}
],
"message": {
"messageTemplate": "{{templateWithVideo}}",
"messageParams": [
"video",
"username"
],
"channelType": "WhatsApp"
}
}
}Template with Carousel
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha individual completo - Template Com Carousel 2",
"campaignType": "Individual",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audience": {
"recipient": "{{phonenumber1}}",
"messageParams": {
"url1": "https://images3.alphacoders.com/107/thumb-1920-1070509.jpg",
"name1": "Yoga Classes",
"url2": "https://images3.alphacoders.com/107/thumb-1920-1070509.jpg",
"name2": "Boxing Classes"
}
},
"message": {
"messageTemplate": "{{templateWithCarousel}}",
"messageParams": [
"url1",
"name1",
"url2",
"name2"
],
"channelType": "WhatsApp"
}
}
}Template with Carousel for bulk sending
{
"id": "{{$guid}}",
"to": "postmaster@activecampaign.msging.net",
"method": "set",
"uri": "/campaign/full",
"type": "application/vnd.iris.activecampaign.full-campaign+json",
"resource": {
"campaign": {
"name": "Campanha Batch completo - Template Com Carousel 3",
"campaignType": "Batch",
"flowId": "{{flowId}}",
"stateId": "{{stateId}}",
"channelType": "WhatsApp",
"sourceApplication": "Postman"
},
"audiences": [
{
"recipient": "{{phonenumber1}}",
"messageParams": {
"url1": "https://images3.alphacoders.com/107/thumb-1920-1070509.jpg",
"name1": "Yoga Classes",
"url2": "https://images3.alphacoders.com/107/thumb-1920-1070509.jpg",
"name2": "Boxing Classes"
}
},
{
"recipient": "{{phonenumber2}}",
"messageParams": {
"url1": "https://raw.githubusercontent.com/karuncodes/sample-files/refs/heads/main/sample%20image/progressive.jpg",
"name1": "Teste1",
"url2": "https://raw.githubusercontent.com/karuncodes/sample-files/refs/heads/main/sample%20image/progressive.jpg",
"name2": "teste2"
}
}
],
"message": {
"messageTemplate": "{{templateWithCarousel}}",
"messageParams": [
"url1",
"name1",
"url2",
"name2"
],
"channelType": "WhatsApp"
}
}
}Note: It is not possible to send active messages in templates that have Flows.
Frequently Asked Questions
Is it possible to schedule a send with v2?
Yes, this is possible. Just provide the ‘Scheduled’ field in the format ‘yyyy-MM-dd hh’ within the Campaign entity.
Is it possible to cancel a scheduled campaign?
You can cancel a scheduled campaign by sending a DELETE request. Replace {campaignId} with the campaign ID of the scheduled message you want to delete.
The campaign will be deleted and the schedule will be canceled.
Request Body:
|
After scheduling a campaign, is it possible to add more data to the schedule?
It is not possible to change (add or edit) values of a campaign once it is scheduled. To do so, you need to delete the scheduled campaign and create a new one.
Does manually sending campaigns generate evidence that the message was sent?
To perform a manual active message send, it is possible to schedule or trigger the sends via Growth, and all information will be recorded on the screen, including those that failed, were received, or were read.
Which access key should be used to trigger the request?
The access key (Authorization) used in the request headers must always correspond to the bot that has the channel connected.
If you're working with an architecture that involves multiple sub-bots linked to a router bot, the access key must always be that of the router bot. Otherwise, use the specific key of the sub-bot.
For more information, visit the discussion on the topic in our community or the videos on our channel.😃