curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"listId": "<string>"
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists"
payload = { "listId": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({listId: '<string>'})
};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"id": "6a8dce146dc0b3d9029c22d0",
"listIds": [
"6a8dce146dc0b3d9029c22a1",
"6a8dce146dc0b3d9029c22a2"
]
},
"alreadyPresent": false,
"enrollmentStarted": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}Add a list to a campaign
Adds one list to a campaign. Anyone on the list who opted out of your team’s email is never enrolled. On an active campaign the list’s contacts are enrolled in the background and enrollmentStarted is true. On a stopped campaign that has launched before, they are enrolled the same way (enrollmentStarted is true) and start their sequence when the campaign is approved again. On a campaign that has not launched yet, including one stopped before its first launch, the list is attached and its contacts are enrolled at launch. On a campaign paused by hand the list is only attached. Adding a list the campaign already holds changes nothing and starts nothing (alreadyPresent is true). Use this rather than PATCH listIds on a running campaign: PATCH changes the set without enrolling anyone. Only the token owner’s own campaigns resolve: a campaign delegated to you, one shared by your team’s visibility settings, and a deleted one all answer 404.
Errors:
404CAMPAIGN_NOT_FOUND— No campaign with this id exists, it belongs to another account (including a campaign delegated to you or shared by your team’s visibility settings), or it has been deleted.404LIST_NOT_FOUND— No list with this id exists on your team, or it is archived.409CAMPAIGN_LIST_BUSY— Another request was still adding this list to this campaign. Nothing changed; retry in a few seconds.422CAMPAIGN_LIST_CAP_REACHED— The campaign already holds 10 lists, the maximum.422VALIDATION_FAILED— campaignId or listId is not a 24-character hex id, or the body carries an unknown field.429RATE_LIMITED— Either this endpoint’s own cap (50 requests/minute, 500/day) or the shared campaigns bucket (30/minute, 1,000/day for this token owner, shared by every /business/campaigns, /business/scheduled-sends, /business/campaign-templates and /business/knowledge-hubs call) was exceeded. The RateLimit-* headers on the response describe the shared bucket, so a refusal from this endpoint’s own cap can still report requests remaining and carries no Retry-After.500UNEXPECTED_ERROR— An unhandled failure; the detail stays in our logs and is never returned.
Requires one of the following token scopes: campaigns.
curl --request POST \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"listId": "<string>"
}
'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists"
payload = { "listId": "<string>" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({listId: '<string>'})
};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/lists', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaign": {
"id": "6a8dce146dc0b3d9029c22d0",
"listIds": [
"6a8dce146dc0b3d9029c22a1",
"6a8dce146dc0b3d9029c22a2"
]
},
"alreadyPresent": false,
"enrollmentStarted": true
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"param": "<string>",
"doc_url": "<string>",
"request_id": "<string>"
}
}