The Cordial platform,
over plain HTTPS.
106 endpoints across 24 resources. HTTPS, HTTP Basic auth, JSON in and out. Build in any language — curl, Go, Python, Ruby, Java, anything that speaks HTTP works on day one.
# HTTP Basic over HTTPS — your API key as the username, blank password.
curl -u "$CORDIAL_API_KEY:" https://api.cordial.io/v2/contacts/jane@brand.com
# Or use the Authorization header directly:
curl https://api.cordial.io/v2/contacts/jane@brand.com \
-H "Authorization: Basic $(echo -n "$CORDIAL_API_KEY:" | base64)"Live in any stack on day one.
There's nothing to install and nothing to learn. Generate an API key, drop it in the header, and you're talking to the platform from curl, Go, Python, Ruby, Java, or whatever your team already ships — no SDK to vendor, no client library to keep in sync, no version lock-in.
- Base URL:
https://api.cordial.io - All paths versioned:
/v2/… - HTTPS only. HTTP requests are rejected.
- Keys scope to a single account. Rotate any time from the dashboard.
# HTTP Basic over HTTPS — your API key as the username, blank password.
curl -u "$CORDIAL_API_KEY:" https://api.cordial.io/v2/contacts/jane@brand.com
# Or use the Authorization header directly:
curl https://api.cordial.io/v2/contacts/jane@brand.com \
-H "Authorization: Basic $(echo -n "$CORDIAL_API_KEY:" | base64)"Three patterns power most integrations.
Upsert a contact, log an event, send a message. Every Cordial integration eventually maps to some combination of these three calls.
Upsert a contact
Your source of truth pushes a contact in. Cordial merges by primary key.
// Upsert a contact and trigger downstream automations
const resp = await fetch("https://api.cordial.io/v2/contacts", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${btoa(`${process.env.CORDIAL_API_KEY}:`)}`,
},
body: JSON.stringify({
channels: { email: { address: "jane@brand.com", subscribeStatus: "subscribed" } },
attributes: {
first_name: "Jane",
lifetime_val: 2480.5,
loyalty_tier: "gold",
},
}),
});
const contact = await resp.json();
// → { cID: "65a2…", channels: { … }, attributes: { … } }Log a custom event
Behavioral signals flow into the contact's activity stream, where they drive audiences and triggers.
// Log a custom event — used as orchestration triggers and audience criteria
await fetch("https://api.cordial.io/v2/contactactivities", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${btoa(`${process.env.CORDIAL_API_KEY}:`)}`,
},
body: JSON.stringify({
email: "jane@brand.com",
action: "browse",
properties: {
product_id: "p_8421",
category: "denim",
price: 78.0,
},
}),
});Send a message
Trigger an automation template with per-contact merge data. Cordial handles delivery, tracking, and analytics.
// Trigger a send from an automation template
await fetch(
"https://api.cordial.io/v2/automationtemplates/welcome_series/send",
{
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Basic ${btoa(`${process.env.CORDIAL_API_KEY}:`)}`,
},
body: JSON.stringify({
to: { email: "jane@brand.com" },
mergeData: { firstName: "Jane", couponCode: "WELCOME10" },
}),
}
);Every concept in your Cordial account.
Each resource maps to a tag in the OpenAPI spec. Click through to the Swagger reference for the full payload shape, query params, and error responses.
Contacts
14 endpointsCreate, update, lookup, unsubscribe, and search contacts.
- POST
/v2/contactsCreate or upsert a contact - GET
/v2/contacts/{primary_key}Fetch a single contact by primary key - PUT
/v2/contacts/{primary_key}Update a contact - PUT
/v2/contacts/{primary_key}/unsubscribe/{channel}Unsubscribe from a channel - GET
/v2/contactsList or search contacts
Batch Messages
13 endpointsCampaign send lifecycle — create, schedule, send, cancel.
- POST
/v2/batchmessagesCreate a batch message - GET
/v2/batchmessagesList batch messages - PUT
/v2/batchmessages/{id}Update a batch message draft - PUT
/v2/batchmessages/{id}/sendSend or schedule - GET
/v2/batchmessages/{id}Get a single batch message
Automation Templates
11 endpointsSend transactional and lifecycle messages from saved templates.
- GET
/v2/automationtemplatesList automation templates - POST
/v2/automationtemplatesCreate an automation template - PUT
/v2/automationtemplates/{key}Update an automation template - POST
/v2/automationtemplates/{key}/sendSend from a template
Orchestrations
4 endpointsList, inspect, and trigger journey orchestrations.
- GET
/v2/orchestrationsList orchestrations - GET
/v2/orchestrations/{orchestrationID}Get a single orchestration - GET
/v2/orchestrations/{orchestrationID}/actionsInspect action nodes - POST
/v2/orchestrations/{orchestrationID}/triggerTrigger an orchestration for a contact
Audiences
1 endpointCount contacts matching a criteria object on demand.
- POST
/v2/audiencecountCount contacts matching an audience
Contact Activities
2 endpointsCapture and read event-stream activity for contacts.
- POST
/v2/contactactivitiesLog a custom event - GET
/v2/contactactivitiesRead events
Contact Lists
7 endpointsManage saved subscriber lists.
- GET
/v2/accountlists/{id}Get a list - POST
/v2/accountlistsCreate a list - GET
/v2/accountlists/{id}/countGet current member count - PUT
/v2/accountlists/{id}/clearClear all members
Contact Attributes
5 endpointsDefine the schema of your contact records.
- GET
/v2/accountcontactattributesList attribute definitions - POST
/v2/accountcontactattributesAdd an attribute - PUT
/v2/accountcontactattributes/{key}Update an attribute - DELETE
/v2/accountcontactattributes/{key}Delete an attribute
Orders
5 endpointsSync transactional commerce data to drive lifecycle messaging.
- POST
/v2/ordersAdd an order - GET
/v2/ordersList orders - GET
/v2/orders/{id}Get a single order - PUT
/v2/orders/{id}Update an order
Products
5 endpointsMaintain the catalog that powers product blocks in messages.
- POST
/v2/productsAdd products - GET
/v2/productsList products - GET
/v2/products/{productID}Get a single product - PUT
/v2/products/{productID}Update a product
Supplements
12 endpointsCustom data tables linked to contacts.
- GET
/v2/supplementsList supplement tables - POST
/v2/supplementsCreate a supplement - GET
/v2/supplements/{key}Get a single supplement - PUT
/v2/supplements/{key}Update a supplement - PUT
/v2/supplements/{key}/clearClear all records
Includes
5 endpointsReusable HTML content snippets shared across messages.
- GET
/v2/includesList content includes - POST
/v2/includesCreate an include - GET
/v2/includes/{key}Get an include - PUT
/v2/includes/{key}Update an include
Data Jobs
5 endpointsTransform and trigger imports/exports as data jobs.
- POST
/v2/datajobs/{key}/transformRun a transformation - POST
/v2/datajobs/{key}/triggerTrigger a transformation - GET
/v2/datajobs/{key}/runsList runs of a recurring job - GET
/v2/datajobs/{key}/runs/{runMarker}/statsPer-run statistics
Imports & Exports
6 endpointsBulk operations on contacts, events, orders, and products.
- POST
/v2/contactimportsBulk contact import - POST
/v2/contactexportsContact export job - POST
/v2/contactactivityexportEvent export job - POST
/v2/ordersimportOrder import job - POST
/v2/productimportsProduct import job - POST
/v2/accountmonitorexportAccount log export
Analytics & Reports
2 endpointsAsync export jobs for audience and message analytics.
- POST
/v2/audiencetrendsexportAudience trends export - POST
/v2/messageanalyticsexportMessage report export
Programs
2 endpointsInspect program-level message performance.
- GET
/v2/programs/{id}/summaryProgram summary stats - GET
/v2/programs/{id}/statsTime-series message stats
Jobs
2 endpointsTrack the status of async background work.
- GET
/v2/jobsList jobs - GET
/v2/jobs/{id}Get a single job status
Alerts
5 endpointsConfigure and manage account-level alerts.
- GET
/v2/alertsList alerts - POST
/v2/alertsCreate an alert - GET
/v2/alerts/{id}Get a single alert - PUT
/v2/alerts/{id}Update an alert
What every endpoint shares.
- 1
JSON in, JSON out
Send
Content-Type: application/json; responses are JSON. Errors return a structured body with a code and message. - 2
Stable resource names
Resources are keyed by intuitive identifiers — contacts by primary key (often email), supplements and includes by key, audiences and orchestrations by ID.
- 3
Async jobs for bulk
Imports, exports, and analytics extracts are job-based: POST to kick off, then poll
/v2/jobs/{id}for status.
Direct HTTP, when you want it.
Production integrations
Sync contacts from your data warehouse, log commerce events from your storefront, or pipe sends from your transactional service — language-agnostic.
Webhooks & receivers
Wire a webhook from any system into Cordial via POST /v2/contactactivities
to turn external signals into events that drive your journeys.
No-runtime environments
Edge functions, iPaaS connectors, Zapier-style platforms, or simple cron-driven scripts — if it speaks HTTP, it speaks Cordial.
Need something more conversational for your team? The CLI → wraps the API for terminals. Need agent access? Plug into the MCP server → for AI assistants.
Start building on the API.
Generate an API key from your Cordial account, open the Swagger reference, and your first request is one curl away.