Getting started
The GetsetNews API lets your website, app or backend add subscribers, tag contacts, record what they do and read your lists, tags and campaigns. It speaks JSON over HTTPS.
| Base address | https://api.getsetnews.com/v1 (the older https://app.getsetnews.com/api/v1 keeps working) |
|---|---|
| Format | JSON in, JSON out. Send Content-Type: application/json with a body. |
| Sign-in | An API key in the Authorization header |
API keys
- In GetsetNews, open Integrations and go to API keys.
- Give the key a name (for example “Website” or “Zapier”) and create it.
- Copy the key straight away. It starts with
emk_and is shown only once.
Send it with every request:
Authorization: Bearer emk_your_key
You can also send it as X-API-Key: emk_your_key.
- A key belongs to one brand. Everything you read or change through it (contacts, lists, tags, events) is in that brand. Make a key in each brand you want to reach.
- Keep keys on your server. Never put a key in a web page or a mobile app; anyone could read it there.
- Revoking a key under Integrations stops it at once, and ends every webhook subscription made with it.
- Keys of a suspended account stop working until the account is active again.
Check a key:
curl https://api.getsetnews.com/v1 \
-H "Authorization: Bearer emk_your_key"
{
"status": "success",
"data": {
"app": "GetsetNews",
"version": "v1",
"key": { "name": "Website", "prefix": "emk_3f9a1c2b" },
"brand": { "id": 4, "name": "Acme Plants" }
}
}
Responses and errors
Every answer has the same shape. Success:
{ "status": "success", "data": { ... } }
Error, with an HTTP status code to match:
{
"status": "error",
"message": "Validation failed.",
"code": "VALIDATION_ERROR",
"errors": { "email": "A valid email is required." }
}
| HTTP | code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | The key is missing, wrong or revoked. |
| 404 | NOT_FOUND | No such contact or campaign in this brand. |
| 405 | METHOD_NOT_ALLOWED | Wrong method for this address (for example GET instead of POST). |
| 422 | VALIDATION_ERROR | Something you sent is missing or invalid. errors says which field. |
Subscribers
Adds a subscriber, or updates the contact that already has this email. It respects consent: people who unsubscribed are never subscribed again unless you say so, and bounced or complaining addresses are left alone.
| Field | Type | |
|---|---|---|
email | string | Required. |
first_name, last_name, phone | string | Optional. |
lists | array of list IDs | Lists to add the contact to (see GET /lists). |
tags | array of names | Tags to add. New tags are created. |
fields | object | Custom fields by key, for example {"city": "Pune"} (see GET /fields). |
double_optin | "list", true or false | Whether a new subscriber must confirm by email first. Default "list": follow each list’s own setting. |
resubscribe | boolean | Subscribe someone again who unsubscribed. Only when they have just asked to hear from you again. |
consent_text | string | What the person agreed to. Kept in their consent history. |
ip | string | The person’s IP address, for the consent history. |
curl -X POST https://api.getsetnews.com/v1/subscribe \
-H "Authorization: Bearer emk_your_key" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"first_name": "Jane",
"lists": [3],
"tags": ["webinar"],
"fields": { "city": "Pune" },
"consent_text": "Ticked: send me the monthly newsletter"
}'
{ "status": "success", "data": { "state": "subscribed", "contact_id": 1024 } }
state | Meaning |
|---|---|
subscribed | The contact is subscribed now. |
pending | A confirmation email was sent; they are subscribed once they click it. |
unchanged | Nothing was subscribed. reason is unsubscribed (they opted out; tags were still added) or suppressed (the address bounced or complained). |
Stops all marketing emails to a contact. Send email or contact_id, and optionally a reason for the consent history.
{ "status": "success", "data": { "contact_id": 1024, "status": "unsubscribed" } }
Events
Records something a contact did. Automations that wait for it start straight away.
| Field | |
|---|---|
email | Required. |
event | Required. purchase starts Purchase automations, page_visit starts Page visit automations. Any other name (up to 100 characters, for example trial_started) starts Custom event automations with that name. Every event also starts matching Custom event automations. |
amount, product | For purchases. |
url | For page visits. |
first_name, last_name | Used when the contact is new. |
create_contact | Default true: add the contact if they are new. With false, an unknown email gives 404. |
curl -X POST https://api.getsetnews.com/v1/events \
-H "Authorization: Bearer emk_your_key" \
-H "Content-Type: application/json" \
-d '{ "email": "[email protected]", "event": "purchase", "amount": 49, "product": "Monstera" }'
{ "status": "success", "data": { "contact_id": 1024, "event": "purchase", "enrolled": 1 } }
enrolled is the number of automations the contact entered.
A contact added by an event is not subscribed to your emails. Use /subscribe when they have agreed to hear from you.
Contacts
Finds one contact by email. The answer is a list with the contact, or an empty list.
Lists contacts, newest first. Query: page (from 1), per_page (default 50, at most 100), search (email or name) and status.
{
"status": "success",
"data": {
"items": [ { "id": 1024, "email": "[email protected]", "first_name": "Jane", "last_name": "Doe",
"phone": "", "status": "subscribed", "source": "api", "created_at": "2026-11-20 10:15:00" } ],
"total": 1, "page": 1, "per_page": 50, "last_page": 1
}
}
Contact statuses: subscribed, pending (waiting to confirm), unsubscribed, bounced, complained.
One contact with its tags, custom fields and lists (each with its own status).
Changes first_name, last_name, phone and custom fields. Nothing is saved if any field is invalid. Answers with the updated contact.
{ "first_name": "Jane", "fields": { "city": "Mumbai", "plan": "pro" } }
Deletes the contact and their history (for example for a GDPR erasure request). This cannot be undone.
Adds and removes tags in one call. Answers with the contact’s tags afterwards.
{ "add": ["customer", "vip"], "remove": ["trial"] }
{ "status": "success", "data": { "contact_id": 1024, "tags": ["customer", "vip"] } }
Lists, tags, fields and more
| Request | Gives |
|---|---|
GET /lists | id, name, description, double_optin, public, subscribers |
GET /tags | id, name, contacts |
GET /fields | Custom fields: key, label, type, options (for choice fields) |
GET /segments | id, name, contacts |
GET /automations | id, name, trigger, status |
GET /campaigns?limit=50 | Newest campaigns (at most 100): id, name, subject, status, scheduled_at, sent_at, created_at |
GET /campaigns/{id} | One campaign with its sending stats |
Webhook subscriptions
Apps can ask GetsetNews to call them the moment something happens. This is how the Zapier app gets instant triggers, and you can use it from your own code too. The events and what is sent are described in Webhooks.
{ "event": "contact.created", "target_url": "https://example.com/getsetnews-hook" }
{ "status": "success", "data": { "id": 12, "event": "contact.created", "target_url": "https://example.com/getsetnews-hook", "created_at": "2026-11-21 10:15:00" } }
The address must be public and start with https://. Asking twice for the same event and address gives the same subscription. A key can hold up to 200 subscriptions.
The subscriptions made with this key.
Stops a subscription. Deleting one that is already gone also succeeds ("existed": false).
Up to three examples in exactly the shape a delivery has, built from your newest contacts. Useful for mapping fields before anything has happened.
Good to know
- All times are in the GetsetNews server’s time, as
YYYY-MM-DD HH:MM:SS; webhooksent_atvalues carry their offset. - Emails are matched case-insensitively and stored in lower case.
- The API answers browsers too (CORS is open), but a key must never be in a web page. To collect signups in a browser, use a signup form.
- Questions or something missing? Write to [email protected].