A REST API for everything your app needs from its audience
Contact's REST API is plain JSON over HTTPS with a bearer key, described as OpenAPI 3.1 at /openapi.json and held to the routes by a test. Your app uses it to sync accounts, send events, ask for consent and record the answer, submit sign-ups, check whether an address may be mailed, and read contacts, campaigns, sequences, replies and reports.
Most apps use a handful of calls: a backfill once, an event on each account change and lifecycle moment, the consent prompt at sign-in, and a webhook endpoint to hear back. Everything else is there for when you want to build on it: your own sign-up form, tags and fields from your product, or a report in your own dashboard.
{
"id": "evt_91c4",
"type": "lifecycle.trial_ending",
"created_at": "2026-11-23T09:00:00Z",
"data": {
"account_ref": "acct_41",
"sub": "u_8k2…",
"once_key": "trial_2026_11"
}
}What it does
REST API in Programmable Contact
Accounts
PUT /api/v1/contacts/batch to backfill (idempotent, subscribes nobody); POST /api/v1/events for user.created, user.updated, plan.changed and user.deleted.
Lifecycle
POST /api/v1/events with lifecycle.<name> sends that app's template once to the account holder.
Consent
POST /api/v1/consents/prompt says whether to ask and returns the wording and its text_id; POST /api/v1/consents records the answer.
Sign-ups
POST /api/v1/leads with a publishable key, then double opt-in. GET /api/v1/forms lists forms with their version and fields.
Tags, fields, segments
List and set tags and fields on a contact, list and create segments, filter contacts by tag or segment.
Reads
Contacts, topics, campaigns, sequences, replies, the calendar, the report and the funnel. A key can also draft a campaign.
How it works
- 1
Make a key
pct_ secret keys with read, events:write or full scopes, optionally bound to one app; pcf_ publishable keys for forms.
- 2
Call it
Authorization: Bearer <key>. Errors are { error: { code, message } }.
- 3
Generate a client
Point any OpenAPI 3.1 generator at /openapi.json.
- 4
Listen for changes
Add a webhook endpoint for subscriptions, unsubscribes, bounces and replies.
Good to know
- No send, approve or erase
- No key can send, test, approve or schedule a campaign, subscribe anyone directly, lift a stop or erase a contact. A test fails if a route ever could.
- Imports are staged
- PUT /api/v1/subscribers/import keeps the list with its evidence and answers 202 pending; a person approves it.
- Rate limited
- Requests are rate limited; a 429 means wait and try again.
Questions
Is the batch import idempotent?
Yes. PUT /api/v1/contacts/batch takes up to 500 accounts; sending the same ones again changes nothing new. Each row is its own transaction, so one bad row is reported and the rest still land.
Can a key be limited to one app?
Yes. A key bound to an app reports accounts and events as that app, so one app's key can't speak for another.
Where is the reference?
The readable guide is at /docs/api and the machine-readable description at /openapi.json.
Can I send a campaign by API?
You can draft one. Testing, approving and sending are done by a person in Contact.
Is the API the same as MCP?
Everything MCP can read is also in the REST API. MCP adds a way for agents to call it as tools.
Read next
Checked against the product on .
Every plan has all of it.
Plans differ only in how many contacts you keep and how much email you send.