API reference
Adding contacts, sending transactional email and pushing products from your own systems.
The API lets your own systems add contacts, push products and send transactional email. Available on Starter and above.
Authentication
Create a key under Settings → Integrations → API keys. Keys belong to one brand, so the key you use decides which brand the data lands in. Send it as a bearer token:
Authorization: Bearer YOUR_API_KEY
The header x-api-key is accepted as an alternative. Keys are shown once at creation and stored only as a hash, so a lost key must be replaced rather than recovered.
Add or update a contact
curl -X POST https://www.nectazo.com/v1/contacts \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "person@example.com",
"firstName": "Jordan",
"lastName": "Reyes",
"source": "website-signup",
"listId": "YOUR-LIST-UUID",
"customFields": { "plan": "trial" }
}'| Field | Required | Notes |
|---|---|---|
| Yes | Matched against existing contacts in the brand — an existing address is updated, not duplicated. | |
| firstName, lastName | No | Used by {{first_name}} personalisation. |
| source | No | Free text recording where the signup came from. |
| listId | No | Adds the contact to a list, which can trigger an automation. |
| subscribed | No | Set false to add someone without subscribing them. |
| customFields | No | Any keys and values you like. Merged into what the contact already has, so sending one key leaves the rest alone. |
| updateOnly | No | Set true to update an existing contact and never create one. An unknown address returns 200 with skipped, not an error. |
Suppression is respected: an address that previously unsubscribed is not resubscribed by an API call.
Add and remove tags on many contacts
Adds and removes tags on contacts you already have, up to 200 per request. The WordPress plugin uses it to keep membership tags in step.
curl -X POST https://www.nectazo.com/v1/contacts/tags -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"contacts": [
{ "email": "jordan@example.com", "add": ["membership: annual"], "remove": ["membership: monthly"] }
],
"triggers": true
}'
{ "updated": 1, "added": 1, "removed": 1, "notFound": 0, "notFoundEmails": [] }- A tag that is newly added starts any automation triggered by that tag being added, and a tag that is really removed starts any triggered by it being removed — unless you send "triggers": false. Use that for a backfill, so people tagged in bulk are not all enrolled at once.
- Removing a tag the contact does not have, or adding one they already have, does nothing and starts nothing.
- It never creates a contact. Addresses that are not contacts are counted in notFound, and the first 20 are listed.
- Up to 50 tags to add and 50 to remove per contact, each at most 80 characters. Tags are lower-cased.
Enrich many contacts at once
Sets custom fields on contacts you already have — up to 500 per request, in one round trip. For anything annotating an existing list this is the endpoint to use: doing the same job one address at a time turns a few milliseconds of work into a minute and a half of latency.
curl -X POST https://www.nectazo.com/v1/contacts/enrich -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{
"contacts": [
{ "email": "ada@example.com", "customFields": { "plan": "annual" } },
{ "email": "grace@example.com", "customFields": { "plan": "monthly" } }
]
}'It answers with how many were updated and how many of the addresses are not contacts, with the first fifty of those named:
{ "updated": 1, "notFound": 1, "notFoundEmails": ["grace@example.com"] }- Custom fields are merged, so sending one key leaves every other field on the contact alone.
- It never creates anybody. An address that is not a contact is counted and named, not added — which also means it can never trigger an opt-in email.
- It cannot change a subscription status, add anyone to a list, or unsubscribe anyone. Use the single-contact endpoint for those.
- A duplicated address within one request is applied once, and the last one wins.
Send a transactional email
curl -X POST https://www.nectazo.com/v1/transactional \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "person@example.com",
"type": "password_reset",
"subject": "Reset your password",
"html": "<p>Click <a href=\"https://example.com/reset\">here</a> to reset.</p>"
}'type is your own label — it groups messages on the Transactional page, so keep it consistent.
Links are left exactly as you wrote them, so one-time links such as password resets keep working. The exception is a new account we have not reviewed yet: until then, links in its transactional email go through Nectazo, and it can send 50 transactional emails a day.
Push products
POST /v1/products accepts batches of products and is what the WordPress plugin uses. Unless you are building your own integration, use the plugin instead.
Push orders
POST /v1/orders accepts up to 100 orders per request, and is also what the WordPress plugin uses. Same advice: unless you are writing your own integration, use the plugin.
curl -X POST https://www.nectazo.com/v1/orders -H "Authorization: Bearer nk_live_..." -H "Content-Type: application/json" -d '{
"storeUrl": "https://shop.example.com",
"orders": [
{
"externalId": "1042",
"email": "person@example.com",
"status": "paid",
"total": "129.50",
"currency": "AUD",
"placedAt": "2026-08-20T04:15:00Z",
"items": [
{ "externalProductId": "88", "title": "Piping set", "price": "99.50", "quantity": 1 }
]
}
]
}'- status is one of paid, pending, cancelled, refunded or failed. Only paid counts toward revenue and purchase segments — map your platform's own vocabulary before sending.
- externalId identifies the order in your system. Pushing the same one again updates it rather than making a second, so a refund is just another push.
- email is matched against existing contacts. It never creates one — an order from a stranger is stored and counted, with no contact attached.
- externalProductId matches the id you sent to /v1/products, which is how "bought this product" works. Line items without one still record a title and a price.
- Orders are never deleted. A catalogue is a current state; an order book is a history.
List your forms
GET /v1/forms returns the published forms in the key's brand — enough to name one and to know how it opens. Drafts are left out, since a draft renders nothing.
curl https://www.nectazo.com/v1/forms -H "Authorization: Bearer nk_live_..."
{
"forms": [
{
"id": "9a8cddd7-...",
"name": "Free guide popup",
"type": "popup",
"trigger": "click",
"clickSelector": "[data-nectazo-open]"
}
]
}It exists so an integration can offer a list to choose from rather than a box to paste an id into — the WordPress plugin uses it for exactly that. trigger is included because a caller offering several forms at once needs to know which of them open on their own: two of those on one page is two things covering the screen.
Who has opted out
GET /v1/opt-outs returns every address in the key's brand that has said no to marketing — unsubscribed, marked a complaint, or suppressed by hand. Read-only, and addresses only: nothing about the people behind them.
curl https://www.nectazo.com/v1/opt-outs -H "Authorization: Bearer nk_live_..."
{
"emails": ["former.subscriber@example.com", "someone@example.com"],
"total": 2
}It exists so you can leave those people out of what you do elsewhere with your own customer list — an advertising audience, for instance. Both the contact's status and the suppression list are read, because either can hold the answer on its own, and the result is lowercased and de-duplicated.
A bounced address is left out. A mailbox that no longer exists has not asked you for anything — it is a delivery problem, not a decision — and treating the two the same would quietly turn one into the other.
The answer is a whole list, not a page. Above 100,000 opt-outs it refuses with a 413 rather than returning a silently short list.
Form entries
GET /v1/form-submissions returns the brand's form entries made after since, oldest first, across every form. limit is 1–500 and defaults to 200.
curl "https://www.nectazo.com/v1/form-submissions?since=2026-10-01T00:00:00Z&limit=200" -H "Authorization: Bearer nk_live_..."
{
"submissions": [
{
"event": "form.submitted",
"id": "b1f0c2d4-...",
"createdAt": "2026-10-12T13:55:10.609714Z",
"form": { "id": "9a8cddd7-...", "name": "Free guide popup" },
"contact": {
"email": "jordan@example.com",
"firstName": "Jordan",
"lastName": null,
"status": "subscribed"
},
"eventId": "0123456789abcdef0123456789abcdef",
"attribution": {
"utmSource": "facebook",
"utmMedium": "paid",
"utmCampaign": "Autumn launch",
"fbclid": "IwAR...",
"pageUrl": "https://www.example.com/guide?utm_source=facebook"
}
}
],
"next": "2026-10-12T13:55:10.609714Z"
}To read the next page, call again with since set to next. next is null on the last page. createdAt has six decimal places on purpose: pass it back exactly as you received it, because rounding it to milliseconds would return the last entry again. Any ISO 8601 offset is accepted (Z or +00:00), but URL-encode it: a raw + in a query string arrives as a space.
Each entry has the same shape as the form.submitted webhook below, minus client. contact.status is the contact's status now, and can be any contact status. It is null if the contact has since been deleted; the entry still has the email address it was made with. attribution holds only the keys the page sent: utmSource, utmMedium, utmCampaign, utmTerm, utmContent, fbclid, gclid, epik, referrer and pageUrl. eventId is the id the form announced in its browser event (see Signup forms), or null.
This is the safety net under webhooks: poll it on a schedule and anything a delivery missed is picked up. De-duplicate on id, because the webhook and this endpoint describe the same entries.
Webhooks
A webhook sends each new form entry to an address you choose, as it happens. Register one with your API key:
curl -X POST https://www.nectazo.com/v1/webhooks -H "Authorization: Bearer nk_live_..." -H "Content-Type: application/json" -d '{ "url": "https://www.example.com/hooks/nectazo", "events": ["form.submitted"] }'
{
"id": "5c1e...",
"url": "https://www.example.com/hooks/nectazo",
"events": ["form.submitted"],
"secret": "8f3a...64 hex characters"
}- The secret is shown once, here. Keep it: it is how you check that a delivery came from Nectazo.
- Registering the same address again replaces the webhook with a new secret. A site that has lost its secret can always register again.
- The address must be https and must not resolve to a private or internal network address. A brand can have up to 10 webhooks.
- form.submitted is the only event so far. Anything else is refused with a 422.
- GET /v1/webhooks lists them, without secrets, with the last delivery's time, status and error, and the number of failures in a row. DELETE /v1/webhooks/{id} removes one.
What arrives
Content-Type: application/json
User-Agent: Nectazo-Webhooks/1
Nectazo-Event: form.submitted
Nectazo-Delivery: 2f7c... (unique per delivery)
Nectazo-Signature: t=1760277310,v1=5d41...
{ ...the same object as a form entry above...,
"client": { "ip": "203.0.113.7", "userAgent": "Mozilla/5.0 ..." } }client is the IP address and browser of whoever submitted the form. It is sent so an ad tool can match the signup to an ad, and Nectazo does not store it.
Checking the signature
v1 is an HMAC-SHA256, keyed with your secret, of t, a full stop, and the raw request body. Compute it over the body exactly as received, before parsing it. Compare in constant time, and refuse a t more than a few minutes old so a captured delivery cannot be replayed.
$body = file_get_contents('php://input');
preg_match('/t=(\d+)/', $_SERVER['HTTP_NECTAZO_SIGNATURE'], $t);
preg_match('/v1=([0-9a-f]{64})/', $_SERVER['HTTP_NECTAZO_SIGNATURE'], $v);
$ok = $t && $v
&& abs(time() - (int) $t[1]) <= 600
&& hash_equals(hash_hmac('sha256', $t[1] . '.' . $body, $secret), $v[1]);Failures
Each entry is sent once, with a 5-second timeout, and never retried. Anything other than a 2xx counts as a failure, and so does a redirect: a delivery that gets redirected has not been delivered. After 100 failures in a row the webhook is switched off, and GET /v1/webhooks shows it as disabled; register it again to switch it back on. Use GET /v1/form-submissions to catch up on anything missed. Revoking the API key that registered a webhook also stops it.
Responses and errors
| Status | Meaning |
|---|---|
| 200 | Success. |
| 201 | Created — a webhook was registered. |
| 401 | Missing, invalid or revoked API key — or the account has been suspended. |
| 404 | No such resource in this key's brand — a webhook id from another brand is answered the same as one that does not exist. |
| 413 | The answer would be too large to return in one piece — only /v1/opt-outs does this. |
| 402 | A plan limit was reached, or the account's plan does not include the API. The body names the limit and the tier that covers it. |
| 422 | The request body failed validation. The body says which field. |
| 429 | A new account's daily sending allowance is used up — see New accounts in Plans and limits. Try again later; the allowance is a rolling 24 hours. |
| 500 / 502 | Something failed on our side. Safe to retry. |
Keeping keys safe
- Server-side only. A key in browser JavaScript is a public key.
- One key per system, so you can revoke one without breaking the others.
- Revoke immediately if a key is exposed — revocation takes effect at once.
Something unclear or wrong? Tell us and we'll fix it.