Get a segment
const url = 'https://digize.com/api/v1/newsletter/segments/example';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://digize.com/api/v1/newsletter/segments/example \ --header 'x-api-key: <x-api-key>'One segment with its contacts and subscribers now.
Needs the newsletter:read permission.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Responses
Section titled “Responses”Done
object
Smart: whoever matches its filter now; static: the contacts added to it.
object
Whether a contact needs any of the tags (the default) or all of them.
Leaves out contacts with any of these tags.
Dropdown fields’ options to match, by field key.
object
Lead score at least this.
Lead score at most this.
Something happened with them in the last this many days.
Nothing has happened with them for at least this many days.
Only the contacts in this list.
Newsletter conditions, all of which must hold: subscription state, engagement stars, opened or clicked lately, signup source, form, UTM tag, country.
object
Their subscription is in one of these states; none for contacts never on the list.
object
object
How many of the workspace’s latest posts that went out (more than 50 counts as 50), or days.
posts: the latest posts that went out; days: days.
object
How many of the workspace’s latest posts that went out (more than 50 counts as 50), or days.
posts: the latest posts that went out; days: days.
object
How many of the workspace’s latest posts that went out (more than 50 counts as 50), or days.
posts: the latest posts that went out; days: days.
object
object
Form ids, as a subscriber’s formId names them.
object
Their signup’s UTM tag is one of these, ignoring case.
object
ISO 3166-1 alpha-2 codes, such as US.
object
Subscribed in the last this many days.
Subscribed more than this many days ago.
object
object
free for free readers, paid for any paid tier, or a tier’s id (nlt_…): they read at one of these now.
object
The poll, nlp_….
The answer they picked, by its place (0 first); left out, any answer.
The poll’s question, kept for the segment’s summary.
The answer’s words, kept for the summary.
How many contacts it holds now.
Of its contacts, those subscribed now: who a post to it goes to, before suppressions.
Example
{ "kind": "smart", "filter": { "stage": [ "lead" ], "source": [ "checkout" ], "tagMode": "any", "conditions": [ { "op": "is" } ], "newsletter": [ { "kind": "status", "in": [ "pending" ] } ] }}What was sent isn’t valid (invalid).
object
object
object
Example
{ "error": { "code": "invalid" }}No key, or one that’s unknown, off or expired.
object
object
object
Example
{ "error": { "code": "invalid" }}The key doesn’t have the permission this needs.
object
object
object
Example
{ "error": { "code": "invalid" }}Nothing has that id (not_found).
object
object
object
Example
{ "error": { "code": "invalid" }}Over the rate limit; see retry-after.
object
object
object
Example
{ "error": { "code": "invalid" }}