Marketing Campaigns
Campaigns and broadcasts
GET/api/marketing-campaigns
Required scope: campaigns.read
| Parameter | In | Required |
|---|---|---|
search | query | no |
status | query | no |
channelId | query | no |
page | query | no |
limit | query | no |
bash
curl "https://api.zapyflow.com.br/api/marketing-campaigns" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK
POST/api/marketing-campaigns
Required scope: campaigns.write
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | yes | min 1, max 160 |
channelId | string | yes | min 1 |
channelTemplateId | string | yes | min 1 |
timezone | string | no | min 1, max 80 |
audienceSource | "CONTACTS" | "CSV" | yes | — |
stopOnReply | boolean | no | — |
sendIntervalMs | integer | no | ≥ 250, ≤ 60000 |
bash
curl -X POST "https://api.zapyflow.com.br/api/marketing-campaigns" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
201— Created
GET/api/marketing-campaigns/{id}
Required scope: campaigns.read
| Parameter | In | Required |
|---|---|---|
id | path | yes |
bash
curl "https://api.zapyflow.com.br/api/marketing-campaigns/{id}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK
PUT/api/marketing-campaigns/{id}
Required scope: campaigns.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
name | string | yes | min 1, max 160 |
channelId | string | yes | min 1 |
channelTemplateId | string | yes | min 1 |
timezone | string | no | min 1, max 80 |
audienceSource | "CONTACTS" | "CSV" | yes | — |
stopOnReply | boolean | no | — |
sendIntervalMs | integer | no | ≥ 250, ≤ 60000 |
bash
curl -X PUT "https://api.zapyflow.com.br/api/marketing-campaigns/{id}" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK
PUT/api/marketing-campaigns/{id}/audience
Required scope: campaigns.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
rows | object[] | yes | ≤ 10000 items |
bash
curl -X PUT "https://api.zapyflow.com.br/api/marketing-campaigns/{id}/audience" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK
POST/api/marketing-campaigns/{id}/duplicate
Required scope: campaigns.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
bash
curl -X POST "https://api.zapyflow.com.br/api/marketing-campaigns/{id}/duplicate" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
201— Created
GET/api/marketing-campaigns/{id}/recipients
Required scope: campaigns.read
| Parameter | In | Required |
|---|---|---|
search | query | no |
status | query | no |
page | query | no |
limit | query | no |
id | path | yes |
bash
curl "https://api.zapyflow.com.br/api/marketing-campaigns/{id}/recipients" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK
GET/api/marketing-campaigns/{id}/report
Required scope: campaigns.read
| Parameter | In | Required |
|---|---|---|
id | path | yes |
bash
curl "https://api.zapyflow.com.br/api/marketing-campaigns/{id}/report" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY"Responses
200— OK
PUT/api/marketing-campaigns/{id}/variables
Required scope: campaigns.write
| Parameter | In | Required |
|---|---|---|
id | path | yes |
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
mappings | object[] | yes | ≤ 50 items |
bash
curl -X PUT "https://api.zapyflow.com.br/api/marketing-campaigns/{id}/variables" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK
POST/api/marketing-campaigns/audience/contacts
Required scope: campaigns.write
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
search | string | no | max 120 |
channelId | string | no | min 1 |
tags | string[] | no | ≤ 20 items |
bash
curl -X POST "https://api.zapyflow.com.br/api/marketing-campaigns/audience/contacts" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK
POST/api/marketing-campaigns/audience/csv/validate
Required scope: campaigns.write
Request body
| Field | Type | Required | Constraints |
|---|---|---|---|
csv | string | yes | min 1, max 5242880 |
bash
curl -X POST "https://api.zapyflow.com.br/api/marketing-campaigns/audience/csv/validate" \
-H "Authorization: Bearer $ZAPYFLOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{ ... }'Responses
200— OK