Check whether a campaign can be approved
curl --request GET \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaignId": "6a8da7718707dbcfb4448b96",
"ready": false,
"reason": "NO_ACTIVE_EMAIL_ACCOUNTS",
"contacts": {
"total": 1200,
"withEmail": 1080,
"withoutEmail": 120,
"withLinkedin": 950
},
"dueNow": {
"queuedSends": 46,
"steps": [
{
"stepId": "6a8da7718707dbcfb4448b9a",
"queuedSends": 40
},
{
"stepId": "6a8da7718707dbcfb4448b9b",
"queuedSends": 6
}
],
"leadsToStart": 12
}
}{
"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>"
}
}Campaigns
Check whether a campaign can be approved
Runs approve's checks without approving: whether POST /business/campaigns/{campaignId}/approve would start the campaign now and, if not, `reason`, the first check it fails in the order approve runs them, the same code approve would answer with. An active campaign is ready, as approve answers it with 202; one paused by hand is not (`CAMPAIGN_NOT_APPROVABLE`). `contacts` counts the people on the campaign's source lists as the app's list picker does before launch: `withEmail` those with a professional email, `withoutEmail` the rest, who are skipped on an email-only campaign unless an email is found first, and `withLinkedin` those with a LinkedIn profile. `withEmail` and `withLinkedin` come from each list's counters, which are recomputed in the background after a list changes, so each is capped at its list's size; a source list that is gone, archived or private to a teammate counts as empty. `dueNow` is what goes out as soon as the campaign runs: `queuedSends` whose scheduled time has already come (on a stopped campaign, everything that came due while it was stopped), split by step in `steps`, plus `leadsToStart`, leads that have not started and get their first step once it runs, over as many sending days as the campaign's sending accounts' daily limits need. A campaign that has never run (`initializing` or `initialization_failed`) has no leads enrolled until approval enrolls its source lists, so for it `leadsToStart` is `contacts.total`, some of whom enrollment may skip. The sender takes due sends oldest first within each sending account's daily limits and the campaign's sending days, so a large number goes out over the next sending windows rather than in one burst. List the sends themselves with GET .../scheduled-sends?status=scheduled&scheduledBefore=<now>. Nothing is written. Ownership is required, as on approve. Rate limit: 30 requests/minute and 1,000/day per token owner, shared by every campaign, scheduled-send, campaign-template and knowledge-hub endpoint.
Errors:
- `404` `CAMPAIGN_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.
- `422` `VALIDATION_FAILED` — campaignId is not a 24-character hex id.
- `429` `RATE_LIMITED` — More than 30 campaign requests in a minute, or 1,000 in a day, for this token owner (the bucket is shared by every /business/campaigns, /business/scheduled-sends, /business/campaign-templates and /business/knowledge-hubs call).
- `500` `UNEXPECTED_ERROR` — An unhandled failure; the detail stays in our logs and is never returned.
Requires one of the following token scopes: campaigns.
GET
/
business
/
campaigns
/
{campaignId}
/
readiness
Check whether a campaign can be approved
curl --request GET \
--url https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.tryfuse.ai/api/v1/business/campaigns/{campaignId}/readiness', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"campaignId": "6a8da7718707dbcfb4448b96",
"ready": false,
"reason": "NO_ACTIVE_EMAIL_ACCOUNTS",
"contacts": {
"total": 1200,
"withEmail": 1080,
"withoutEmail": 120,
"withLinkedin": 950
},
"dueNow": {
"queuedSends": 46,
"steps": [
{
"stepId": "6a8da7718707dbcfb4448b9a",
"queuedSends": 40
},
{
"stepId": "6a8da7718707dbcfb4448b9b",
"queuedSends": 6
}
],
"leadsToStart": 12
}
}{
"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>"
}
}Authorizations
Path Parameters
Response
Success
The first check the campaign fails, as approve's refusal names it; null when it is ready.
Available options:
CAMPAIGN_NOT_APPROVABLE, CAMPAIGN_HAS_NO_LIST, CAMPAIGN_HAS_NO_STEPS, STEP_BODY_MISSING, STEP_SUBJECT_MISSING, STEP_TOPIC_MISSING, CONDITION_BRANCH_EMPTY, SEQUENCE_STRUCTURE_INVALID, CLICK_TRACKING_REQUIRED, CAMPAIGN_MAILBOX_NOT_PERMITTED, NO_ACTIVE_EMAIL_ACCOUNTS, NO_ACTIVE_LINKEDIN_ACCOUNTS, null