Help docs / API

API

Add subscribers, tag contacts, record purchases and read your lists and campaigns from your own code.

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 addresshttps://api.getsetnews.com/v1 (the older https://app.getsetnews.com/api/v1 keeps working)
FormatJSON in, JSON out. Send Content-Type: application/json with a body.
Sign-inAn API key in the Authorization header

API keys

  1. In GetsetNews, open Integrations and go to API keys.
  2. Give the key a name (for example “Website” or “Zapier”) and create it.
  3. 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." }
}
HTTPcodeMeaning
401UNAUTHORIZEDThe key is missing, wrong or revoked.
404NOT_FOUNDNo such contact or campaign in this brand.
405METHOD_NOT_ALLOWEDWrong method for this address (for example GET instead of POST).
422VALIDATION_ERRORSomething you sent is missing or invalid. errors says which field.

Subscribers

POST/subscribe

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.

FieldType
emailstringRequired.
first_name, last_name, phonestringOptional.
listsarray of list IDsLists to add the contact to (see GET /lists).
tagsarray of namesTags to add. New tags are created.
fieldsobjectCustom fields by key, for example {"city": "Pune"} (see GET /fields).
double_optin"list", true or falseWhether a new subscriber must confirm by email first. Default "list": follow each list’s own setting.
resubscribebooleanSubscribe someone again who unsubscribed. Only when they have just asked to hear from you again.
consent_textstringWhat the person agreed to. Kept in their consent history.
ipstringThe 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 } }
stateMeaning
subscribedThe contact is subscribed now.
pendingA confirmation email was sent; they are subscribed once they click it.
unchangedNothing was subscribed. reason is unsubscribed (they opted out; tags were still added) or suppressed (the address bounced or complained).
POST/unsubscribe

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

POST/events

Records something a contact did. Automations that wait for it start straight away.

Field
emailRequired.
eventRequired. 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, productFor purchases.
urlFor page visits.
first_name, last_nameUsed when the contact is new.
create_contactDefault 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.

GET/contacts

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.

GET/contacts/{id}

One contact with its tags, custom fields and lists (each with its own status).

PATCH/contacts/{id}

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" } }
DELETE/contacts/{id}

Deletes the contact and their history (for example for a GDPR erasure request). This cannot be undone.

POST/contacts/{id}/tags

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

RequestGives
GET /listsid, name, description, double_optin, public, subscribers
GET /tagsid, name, contacts
GET /fieldsCustom fields: key, label, type, options (for choice fields)
GET /segmentsid, name, contacts
GET /automationsid, name, trigger, status
GET /campaigns?limit=50Newest 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.

POST/hooks
{ "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.

GET/hooks

The subscriptions made with this key.

DELETE/hooks/{id}

Stops a subscription. Deleting one that is already gone also succeeds ("existed": false).

GET/hooks/sample?event=contact.created

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; webhook sent_at values 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].