Quickstart
You need three requests: check your credentials, create a contact, then find it.
The Flownally API is for server-side systems such as CRM syncs, internal tools and background jobs. Keep the key on your server: every API key can call every operation in its workspace.
If you're new to Flownally, start with the feature overview.
Before you start
You need:
- The Owner or Admin role in your Flownally workspace.
- A terminal with
curl, or any HTTP client that can send JSON.
Create an API key in the Flownally app:
- Go to Settings > API access.
- Select Create service account, enter a Name, and select Create service account.
- Copy the key from the API key created dialog. Flownally shows it once.
For screenshots of these steps, see How to create a service account.
Store the key in your shell:
export FLOWNALLY_API_TOKEN="flw_replace_with_your_api_key"API keys start with flw_. Every request goes to the base URL https://api.flownally.com/v1.
1. Check your credentials
Call GET /contacts:count. It's a cheap read that only succeeds with a valid key.
curl "https://api.flownally.com/v1/contacts:count" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN"A 200 response returns the number of contacts that aren't archived:
{ "totalSize": 0 }A 401 response means the key is missing, mistyped or unknown. Check the Authorization header and the value of FLOWNALLY_API_TOKEN.
For the full operation, see Count contacts.
2. Create a contact
Send POST /contacts with a JSON body. Write phone numbers in E.164 format, for example +15551234567.
curl -X POST "https://api.flownally.com/v1/contacts" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Ada Lovelace",
"phone": "+15551234567",
"customFields": {
"cf_email": "ada@example.com"
}
}'A 201 response returns the new contact. Save its id, which starts with con_.
customFields is keyed by custom field ID, not by field name. Email and phone have fixed IDs in every workspace: cf_email and cf_phone. The top-level phone field is stored as cf_phone.
Fields you create get generated IDs such as cf_d7pgooc1v8t53cs68k5g. To find them, call GET /contacts/custom-fields.
For the full request and response, see Create contact.
3. Find the contact
List and filter contacts with POST /contacts:search. A searchText condition matches a contact's name, email or phone number.
curl -X POST "https://api.flownally.com/v1/contacts:search" \
-H "Authorization: Bearer $FLOWNALLY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": {
"match": "all",
"conditions": [{ "type": "searchText", "text": "Ada" }]
}
}'The response lists matching contacts in contacts. To list every contact, send an empty conditions array.
Archived contacts are left out unless you add an archiveStatus condition. For all conditions, see Search contacts.
FAQ
Why does GET /contacts:count return 401?
GET /contacts:count return 401?Flownally didn't recognize the key. Send it as Authorization: Bearer flw_…, and print FLOWNALLY_API_TOKEN to make sure it isn't empty or cut short.
Should I use a field's name or its ID in customFields?
customFields?Use its ID. Email and phone have fixed IDs in every workspace, cf_email and cf_phone. To find the generated IDs of fields you created, call GET /contacts/custom-fields.
Why doesn't my search return archived contacts?
Search leaves archived contacts out unless you add an archiveStatus condition. To list every contact that isn't archived, send an empty conditions array.
What if I lose the API key?
Flownally shows each key once, and listing keys returns metadata only. Create a new key on the same service account, deploy it, then revoke the old one, as described in Rotate safely.
Next steps
- Authentication: store, rotate and revoke API keys.
- Pagination: read every page of a list.
- Errors: handle failed requests and retry safely.
- Webhooks: get contact, conversation and message changes as they happen.
- API reference: every operation, grouped by resource.