Add campaign audience members
curl --request POST \
--url https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience"
payload = { "customerIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"added": 123,
"removed": 123,
"audience": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"currentStepOrder": 123,
"nextStepAt": "2023-11-07T05:31:56Z",
"joinedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"unsubscribedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}Campaigns
Add campaign audience members
Requires write:campaigns. Body { customerIds }. On an active campaign, only newly added members are scheduled.
POST
/
api
/
v1
/
marketing
/
campaigns
/
{id}
/
audience
Add campaign audience members
curl --request POST \
--url https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customerIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({customerIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.carstoragesoftware.com/api/v1/marketing/campaigns/{id}/audience"
payload = { "customerIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"added": 123,
"removed": 123,
"audience": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"campaignId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"currentStepOrder": 123,
"nextStepAt": "2023-11-07T05:31:56Z",
"joinedAt": "2023-11-07T05:31:56Z",
"completedAt": "2023-11-07T05:31:56Z",
"unsubscribedAt": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}{
"error": "<string>",
"code": "<string>",
"details": null
}Authorizations
Team API key from Settings → Integrations. Use Authorization: Bearer <key> or x-api-key.
Path Parameters
Body
application/json
Minimum array length:
1Response
Add campaign audience members
Show child attributes
Show child attributes
Was this page helpful?
⌘I