The API lets your own scripts and tools work with your CallsFlow Plus account. Read your campaigns, calls and reports. Or, with a read & write key, create and change your setup. It is for things like a nightly report in your own sheet, a dashboard of your own, or a script that sets up a new campaign.
Everything the API shows or changes is the same data you see in the app. A key only ever reaches your own account.
This page covers the basics. Every endpoint, with its fields and an example, is in the API reference.
Get a key
Only account admins can make keys. Buyer and publisher logins cannot.
- Open API keys in the menu, under Account, then click New API key.
- Give the key a Name so you remember what it is for, such as "Nightly report".
- Choose its permission: - Read only can look at calls, reports and your setup. - Read & write can also change your setup.
- Click Create key. The full key appears once. Copy it, store it somewhere safe such as a password manager, then click Done.
We keep only a scrambled copy of the key, so we cannot show it to you again. If you lose it, make a new key.
The list shows each key's name, permission, its first characters, who made it, when it was made and when it was last used. An account can have up to 10 active keys.
Revoke a key
Click Revoke on the key in the list, then Revoke for good to confirm. The key stops working straight away. Revoking is final: a revoked key cannot be turned back on. Make a new one instead.
A key also stops working on its own if the admin who made it loses admin access or is removed, or if the account is suspended. Use a key made by a long-term admin for anything that has to keep running.
Send your first request
Send the key in an Authorization header on every request. The address is https://app.callsflowplus.com/api/v1/.
curl https://app.callsflowplus.com/api/v1/campaigns \
-H "Authorization: Bearer cfp_YOUR_KEY"
You get back JSON:
{
"data": [ { "id": "...", "name": "Medicare FL", "status": "active" } ],
"next_cursor": null
}
Treat the key like a password. Keep it out of web pages, shared documents and public code. If it leaks, revoke it.
Limits
Each key can make 120 requests a minute. Writes (anything that creates or changes something) have one more limit: up to 60 a minute per account across all keys. Go over either and you get a 429 error with a Retry-After header that says how many seconds to wait. Slow down, wait that long, then try again.
Errors
When something goes wrong, the answer is always JSON in the same shape:
{ "error": { "code": "not_found", "message": "campaign not found" } }
| Status | code |
What it means |
|---|---|---|
| 401 | unauthorized |
The key is missing, wrong or revoked. |
| 403 | forbidden |
A read-only key tried to make a change, or the account is suspended. |
| 404 | not_found |
That id does not exist in your account. |
| 409 | conflict |
Something with that name or key already exists. |
| 422 | invalid |
A value is missing or not allowed. The message says which. |
| 429 | rate_limited |
Too many requests. Wait for Retry-After seconds. |
| 500 | server_error |
Something went wrong on our side. Try again. If it keeps happening, contact support. |
Always check the status code first, then read message for the reason.
Paging
List endpoints return newest first, up to limit items at a time. limit is 1 to 100 and defaults to 50. The answer has a next_cursor. When it is not null, send it back as cursor to get the next page:
curl "https://app.callsflowplus.com/api/v1/campaigns?limit=100&cursor=NEXT_CURSOR" \
-H "Authorization: Bearer cfp_YOUR_KEY"
When next_cursor is null, you have everything. Do not try to read or build a cursor yourself; just pass it back unchanged.
When you page through calls, send the same from and to on every page. If you leave them out, the window is "the last 24 hours up to now", and that window moves between pages. The Calls section of the API reference has an example.
What you can change
A read & write key can create and change campaigns (and their routing), publishers, sources, buyers and targets. Changes go through the same checks as the app, so a value the app refuses is refused here too. Changes take effect the same way they do in the app.
Creating a campaign in RTB mode, or switching one to RTB, works exactly as in the app. If your account has no number pool yet and has credit, your first pool number is set up automatically. The API has no way to buy a number.
To turn something off, set its status to paused:
curl -X PATCH https://app.callsflowplus.com/api/v1/campaigns/CAMPAIGN_ID \
-H "Authorization: Bearer cfp_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "paused"}'
What the API cannot do
- Delete anything. Pause it instead.
- Buy or release numbers. You can list your numbers. Buying and releasing stay in the app.
- Touch billing or credits. No top-ups, charges, invoices or statements.
- Manage users or invites, or API keys. Those stay in the app.
Every change made with a key is logged against that key.
Make a client automatically
The API describes itself in a standard machine-readable file, OpenAPI:
https://app.callsflowplus.com/api/v1/openapi.json
Hand it to your developer, or to any tool that builds API clients, and it can generate code for you.
Related
Still stuck?
Ask the support chat inside your account, or send us a request.