NightmailDocs
Docs

List list members

get/v1/lists/{id}/members

Active list members with current list IDs. Pages are also bounded by response size and may return fewer than limit contacts; follow nextCursor while non-null. Each statement stops after 5 seconds: a request that needs longer is refused with 422 READ_TOO_LARGE. Narrow the dates or filters.

Needs Audience & content: read on the whole workspace.

Example

import { createClient } from '@nightmail/sdk/client';
import { listListMembers } from '@nightmail/sdk';

const client = createClient({
  baseUrl: 'https://nightmail.dev',
  auth: scheme => scheme.scheme === 'bearer'
    ? process.env.NIGHTMAIL_API_KEY
    : undefined,
});

const result = await listListMembers({
  client,
  path: {
    "id": "resource_123"
  },
  throwOnError: true,
});

console.log(result.data);
curl --request GET \
  --url 'https://nightmail.dev/v1/lists/resource_123/members' \
  --header "Authorization: Bearer $NIGHTMAIL_API_KEY"

Parameters

idrequiredpath · string
cursorquery · string
limitquery · integer
searchquery · string
emailquery · string

Exact, case-insensitive email match. Uses the unique email index; prefer it over search for one address.

consentquery · string
suppressedquery · string
riskyquery · string

true: only contacts campaigns skip as risky (risk set and not allowed).

Responses

200Success
datarequiredobject[]
data[].idrequiredstring
data[].workspaceIdrequiredstring
data[].emailrequiredstring
data[].namerequiredstring or null
data[].propertiesrequiredobject
data[].marketingConsentrequiredstring
data[].suppressedrequiredboolean
data[].suppressionReasonrequiredstring or null
data[].riskrequiredobject or null

Why campaigns and marketing sends skip this contact, or null when nothing is wrong with the address. Flagged when the contact is created or imported, and again hourly for every contact. Transactional mail is never refused.

data[].lastOpenAtrequiredstring or null
data[].lastClickAtrequiredstring or null
data[].observedSincerequiredstring or null
data[].openObservedSincerequiredstring or null
data[].clickObservedSincerequiredstring or null
data[].deletedAtrequiredstring or null
data[].createdAtrequiredstring
data[].updatedAtrequiredstring
data[].listIdsrequiredstring[]

Up to 50 list IDs on paginated contact reads (200 on getContact), sorted by ID.

nextCursorrequiredstring or null
400, 401, 403, 404, 409, 413, 422, 429, 500, 503Request failed; use error.code and requestId to diagnose.
ApiError
errorrequiredobject
error.coderequiredstring
error.messagerequiredstring
error.requestIdrequiredstring
error.fieldstring
error.retryablerequiredboolean
error.resetAtstring

Next capacity change for a Hosted rolling send limit.

error.detailsobject[]

Every problem found, when there is more than one part, such as rule diagnostics with rule, line, column, message and hint, or a measurement, such as CONTENT_TOO_LARGE_TO_SCREEN with screenedBytes and limitBytes (and index in a batch).

error.requiredobject

On a 403 permission refusal: what the request needs that this credential lacks. The Nightmail-Required-Permission header says the same.