Pular para o conteúdo principal

Broadcast

idstring
namestring
phoneNumberIdstringnullable
wabaIdstringnullable
templateNamestringnullable
templateLanguagestringnullable
templateCategorystringnullable
variables objectnullable

De onde vem cada variável do template: header e body pelo nome do marcador ("1", "2"… ou o nome), buttons pelo índice do botão. Toda fonte de contato ou campo exige um fallback para quem não tem o dado. Um cabeçalho de mídia precisa de headerMedia.

header object
property name* VariableSource

contact (um dado do contato), attribute (um campo personalizado) ou static (um valor fixo).

sourcestringrequired

Possible values: [contact, attribute, static]

keystring
Example: first_name
fallbackstring

Possible values: non-empty and <= 200 characters

valuestring

Possible values: non-empty and <= 1000 characters

body object
property name* VariableSource

contact (um dado do contato), attribute (um campo personalizado) ou static (um valor fixo).

sourcestringrequired

Possible values: [contact, attribute, static]

keystring
Example: first_name
fallbackstring

Possible values: non-empty and <= 200 characters

valuestring

Possible values: non-empty and <= 1000 characters

buttons object
property name* VariableSource

contact (um dado do contato), attribute (um campo personalizado) ou static (um valor fixo).

sourcestringrequired

Possible values: [contact, attribute, static]

keystring
Example: first_name
fallbackstring

Possible values: non-empty and <= 200 characters

valuestring

Possible values: non-empty and <= 1000 characters

headerMedia object
typestring

Possible values: [image, video, document]

linkstring<uri>

Possible values: <= 2000 characters

idstring

Possible values: <= 100 characters

filenamestring

Possible values: <= 240 characters

audienceIdstringnullable
audienceFilter objectnullable

Árvore de condições de um público: grupos and/or com até 3 níveis e 30 condições no total. Os operadores válidos para cada tipo de campo vêm de GET /audiences/schema.

opstringrequired

Possible values: [and, or]

rulesobject[]required

Possible values: <= 30

flowIdstringnullable
statusstring

draftscheduledmaterializing (montando a lista) → runningcompleted. Também paused, canceled e failed.

Possible values: [draft, scheduled, materializing, running, paused, completed, canceled, failed]

failureReasonstringnullable
Example: no_reachable_recipients
scheduledAtstring<date-time>nullable
timezonestring
sendWindow objectnullable
property name*anynullable
throttlePerMinuteintegernullable
launchedAtstring<date-time>nullable
launchedBystringnullable
startedAtstring<date-time>nullable
finishedAtstring<date-time>nullable
pausedAtstring<date-time>nullable
canceledAtstring<date-time>nullable
archivedAtstring<date-time>nullable
pauseReasonstringnullable

Por que parou. Os valores estão no catálogo de eventos.

Possible values: [manual, quality, template, account, quota, billing, errors, throughput, send_window]

pauseDetailstringnullable
resumeAfterstring<date-time>nullable
totalRecipientsinteger
skippedCountinteger
sentCountinteger
deliveredCountinteger
readCountinteger
failedCountinteger
unknownCountinteger
clickedCountinteger
repliedCountinteger
optOutCountinteger
estimatedCostMicrosintegernullable
costCurrencystringnullable
qualityAtStartstringnullable
templateQualityAtStartstringnullable
createdBystringnullable
createdAtstring<date-time>
updatedAtstring<date-time>
Broadcast
{
"id": "string",
"name": "string",
"phoneNumberId": "string",
"wabaId": "string",
"templateName": "string",
"templateLanguage": "string",
"templateCategory": "string",
"variables": {
"body": {
"1": {
"source": "contact",
"key": "first_name",
"fallback": "cliente"
},
"2": {
"source": "static",
"value": "BLACK20"
}
}
},
"audienceId": "string",
"audienceFilter": {
"op": "and",
"rules": [
{
"type": "consent",
"op": "is",
"value": "opted_in"
},
{
"type": "field",
"key": "cidade",
"op": "eq",
"value": "Curitiba"
}
]
},
"flowId": "string",
"status": "draft",
"failureReason": "no_reachable_recipients",
"scheduledAt": "2024-07-29T15:51:28.071Z",
"timezone": "string",
"sendWindow": {},
"throttlePerMinute": 0,
"launchedAt": "2024-07-29T15:51:28.071Z",
"launchedBy": "string",
"startedAt": "2024-07-29T15:51:28.071Z",
"finishedAt": "2024-07-29T15:51:28.071Z",
"pausedAt": "2024-07-29T15:51:28.071Z",
"canceledAt": "2024-07-29T15:51:28.071Z",
"archivedAt": "2024-07-29T15:51:28.071Z",
"pauseReason": "manual",
"pauseDetail": "string",
"resumeAfter": "2024-07-29T15:51:28.071Z",
"totalRecipients": 0,
"skippedCount": 0,
"sentCount": 0,
"deliveredCount": 0,
"readCount": 0,
"failedCount": 0,
"unknownCount": 0,
"clickedCount": 0,
"repliedCount": 0,
"optOutCount": 0,
"estimatedCostMicros": 0,
"costCurrency": "string",
"qualityAtStart": "string",
"templateQualityAtStart": "string",
"createdBy": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z"
}