Find readers and inspect their memberships

Find a reader by email, browse your audience or inspect a reader’s memberships. The resource header selects the publication. To decide whether to show a particular article, use the content access guide.

Choose a lookup

TaskOperationAllowed credentials
Find a reader by email from a server integrationGET /api/v1/admin/users/dataAuthorized service account; root also permitted
Find a reader by email from an Admin integrationPOST /api/v1/admin/users/get-by-emailAdmin read roles; root also permitted
Browse or filter an audienceGET /api/v1/admin/usersAdmin read roles or authorized service account; root also permitted
Page through a reader’s membershipsGET /api/v1/admin/users/{user_id}/subscriptions/listAdmin read roles or authorized service account; root also permitted

Start with the email lookup for your credential type. Keep the returned reader id for later calls. Use the audience list to browse several readers. An audience text filter is not an exact email lookup.

Credentials and examples

Use the credentials and publication public key supplied by your integration operator. Keep privileged credentials in trusted server code.

InputLocation / typeUse
resourceRequired header, public-key stringSelects the publication for every call. It is not the publication secret or a numeric resource ID.
tokenHeader, existing authorized session-token stringUse for the permitted Admin/root context. ADMIN_TOKEN in examples is that existing token.
service-api-keyHeader, existing service-account key stringUse only for the three operations marked service-account eligible above, together with resource. Requires an active, non-suspended account, an active attached user and permission for the specific action.

Admin read roles are readonly, manager, support, admin and partner. Choose one credential type from the table. A service account’s full_access covers only service-account-eligible routes; it does not enable POST email lookup. The caller must be active; their current publication relationship, when present, must not be locked or suspended.

Examples use fictional IDs and illustrative response excerpts. Requests use cURL, Node.js 18+ fetch in an ES module (.mjs), and Python 3 urllib. Set the environment variables from your existing configuration; WALLKIT_API_BASE is the scheme and host, without /api/v1.

Find a reader by email from a server integration

GET /api/v1/admin/users/data

Find a reader’s ID and membership summary by email within the selected publication. Use this route with an authorized service account or root context.

Before you call

Use the service account described above, or root. An ordinary Admin token is not eligible. The reader must already have a relationship with this publication.

Request

Send the resource header and the credential for your caller type.

NameLocationType / requirementMeaning
emailQueryValid email string; required for a useful lookupTrimmed and converted to lowercase before an exact email lookup within the publication. Email filtering also applies.

No body is needed. Results can be cached for 60 seconds, so a recent change may not appear yet.

Response

HTTP 200 returns the reader and subscriptions at the top level, without a user or data wrapper. See returned objects for the fields.

Example

curl -X GET "${WALLKIT_API_BASE}/api/v1/admin/users/data" \
  --get \
  -H "resource: ${RESOURCE_KEY}" \
  -H "service-api-key: ${SERVICE_API_KEY}" \
  --data-urlencode email=reader@example.com
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/data`);
url.search = new URLSearchParams({"email": "reader@example.com"}).toString();
const response = await fetch(url, {
  method: "GET",
  headers: {"resource": process.env.RESOURCE_KEY, "service-api-key": process.env.SERVICE_API_KEY}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import urlencode

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/data"
url += "?" + urlencode({'email': 'reader@example.com'})
headers = {"resource": os.environ["RESOURCE_KEY"], "service-api-key": os.environ["SERVICE_API_KEY"]}
request = Request(url, headers=headers, method="GET")
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response excerpt:

{
  "id": 1001,
  "email": "reader@example.com",
  "subscriptions": [
    {
      "id": 2001,
      "title": "Monthly",
      "autorenew": true,
      "subscription_end_date": "2026-12-01 00:00:00"
    }
  ]
}

Keep reader ID 1001 for the membership list. Subscription ID 2001 identifies the catalog choice, not the reader or membership relationship.

If the reader is not found

A missing reader, missing publication relationship or unresolved attached user returns HTTP 409. Synthetic error excerpt:

{
  "error": "user_not_found",
  "error_description": "User not found"
}

Confirm the email and publication with your operator. This lookup does not create accounts.

Recovery

Use shared recovery for context failures, plus:

HTTP statusAPI code / shapeCauseNext action
409invalid_emailEmail validation failed.Send a valid email string.
409user_not_foundNo matching publication relationship or attached user.Confirm email and publication; handle a missing reader separately.
409resource_requiredThe local resource check fails; shared guards normally reject it earlier.Check the resource public key.
409incorrect_dataThis lookup can return the description Body must be json format even though it uses query parameters.Keep req_guid and ask the operator to inspect the lookup; adding a GET body is not the fix.

Next task

Use the returned reader ID to inspect memberships, with the same publication context.

Find a reader by email from an Admin integration

POST /api/v1/admin/users/get-by-email

Find an existing reader’s ID and membership summary using an Admin credential. Although this route uses POST, it only looks up the reader.

Before you call

Use a readonly-or-inherited Admin token, or root, with the publication public key. Service-account keys are not eligible. The reader must already have a relationship with this publication.

Request

Send the resource and token headers.

NameLocationType / requirementMeaning
emailJSON bodyRequired valid email stringValidated with trimming, then email-filtered for exact stored-email matching. This path does not explicitly lowercase the lookup value.

Send a JSON object containing email with Content-Type: application/json. Use the stored email spelling: this route does not explicitly lowercase the lookup value. Missing or invalid bodies are described under Recovery.

Response

HTTP 200 returns reader fields and subscriptions at the top level. It adds no teams, tags, last_action or session token. See returned objects.

Example

curl -X POST "${WALLKIT_API_BASE}/api/v1/admin/users/get-by-email" \
  -H "resource: ${RESOURCE_KEY}" \
  -H "token: ${ADMIN_TOKEN}" \
  -H "Content-Type: application/json" \
  --data-raw '{"email": "reader@example.com"}'
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/get-by-email`);
const response = await fetch(url, {
  method: "POST",
  headers: {"resource": process.env.RESOURCE_KEY, "token": process.env.ADMIN_TOKEN, "Content-Type": "application/json"},
  body: JSON.stringify({"email": "reader@example.com"})
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/get-by-email"
headers = {"resource": os.environ["RESOURCE_KEY"], "token": os.environ["ADMIN_TOKEN"], "Content-Type": "application/json"}
body = json.dumps({'email': 'reader@example.com'}).encode("utf-8")
request = Request(url, headers=headers, method="POST", data=body)
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response excerpt:

{
  "id": 1001,
  "email": "reader@example.com",
  "subscriptions": [
    {
      "id": 2001,
      "title": "Monthly",
      "autorenew": true,
      "subscription_end_date": "2026-12-01 00:00:00"
    }
  ]
}

Keep reader ID 1001 for later calls. The subscriptions describe existing memberships.

If the reader is not found

A missing reader and a reader without this publication relationship both return HTTP 404. Synthetic excerpt:

{
  "error": "user_not_exists",
  "error_description": "User not found"
}

Check the email spelling and selected publication. The account may exist elsewhere.

Recovery

Use shared recovery for context failures, plus:

HTTP statusAPI code / shapeCauseNext action
406incorrect_dataMissing JSON or a value treated as empty by the API.Send a JSON object containing email with the correct Content-Type.
409invalid_emailMissing/invalid email fails validation.Correct email before repeating the lookup.
404user_not_existsNo exact email with a selected-publication relationship.Confirm stored email spelling and publication context.

Next task

Keep id for the membership list.

Browse a publication’s audience

GET /api/v1/admin/users

Browse a filtered, paginated audience list. Every selected reader has a relationship with this publication, including readers whose relationship is inactive or locked.

Before you call

Use an eligible Admin/root credential or authorized service account. The example uses a service account. Send an explicit page and limit; see collection inputs for filters and sorting.

Request

Send resource and the credential for your caller type.

NameLocationType / requirementMeaning
filter[users.email]QueryOptional text stringCase-insensitive substring filter in this example; not an exact identity lookup.
page, limit, order, by, sort, filterQueryOptionalSee collection inputs.
downloadQueryOptional boolean; omitted by discovery examplesTrue changes this GET into an export request; see the caveat below.
emailQueryOptional email string; export branch onlyDestination passed to export processing, not the audience email filter.

No body is needed. Export changes the behavior: download=true selects all matching readers, checks separate download permission, and can queue an export task and emit an event. The response uses success: true for a new task or success: false for a matching recent unfinished task, rather than items and paginator. It is not a CSV file or delivery receipt. Service accounts cannot download, including those with full_access. The example omits download and export email. Check an uncertain export result before repeating it.

Response

HTTP 200 returns items containing readers with subscriptions and teams, plus paginator. Counts refer to readers. See returned objects for partner-scoped teams and other fields.

Example

curl -X GET "${WALLKIT_API_BASE}/api/v1/admin/users" \
  --get \
  -H "resource: ${RESOURCE_KEY}" \
  -H "service-api-key: ${SERVICE_API_KEY}" \
  --data-urlencode 'filter[users.email]=reader@example.com' \
  --data-urlencode page=1 \
  --data-urlencode limit=10 \
  --data-urlencode order=Users.id \
  --data-urlencode sort=ASC
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users`);
url.search = new URLSearchParams({"filter[users.email]": "reader@example.com", "page": "1", "limit": "10", "order": "Users.id", "sort": "ASC"}).toString();
const response = await fetch(url, {
  method: "GET",
  headers: {"resource": process.env.RESOURCE_KEY, "service-api-key": process.env.SERVICE_API_KEY}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import urlencode

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users"
url += "?" + urlencode({'filter[users.email]': 'reader@example.com', 'page': '1', 'limit': '10', 'order': 'Users.id', 'sort': 'ASC'})
headers = {"resource": os.environ["RESOURCE_KEY"], "service-api-key": os.environ["SERVICE_API_KEY"]}
request = Request(url, headers=headers, method="GET")
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response excerpt:

{
  "items": [
    {
      "id": 1001,
      "email": "reader@example.com",
      "subscriptions": [
        {
          "id": 2001,
          "title": "Monthly"
        }
      ],
      "teams": []
    }
  ],
  "paginator": {
    "current_page": 1,
    "page": 1,
    "total_pages": 1,
    "total_items": 1,
    "limit": 10
  }
}

This selection returned one reader. An email substring can match several readers; check each identity before choosing one.

If no readers match

HTTP 200 returns an empty items array with pagination. Synthetic excerpt:

{
  "items": []
}

Check the page and filter. Use an exact email lookup before concluding that a particular reader is missing.

Recovery

Use shared recovery for context failures, plus:

HTTP statusAPI code / shapeCauseNext action
406incorrect_filter_date / incorrect_filterA reported filter-validation error. Some invalid filters may instead be ignored.Correct known filter fields/values; a successful request alone does not validate every filter.
403access with download actionThe export branch lacks separate download permission.Use ordinary listing without download, or ask an authorized operator about export.
409invalid_emailExport destination email fails validation.Correct the export email; this is separate from filter[users.email].

Next task

Use a returned ID for memberships, with an eligible Admin context or authorized service account.

Page through a reader’s memberships

GET /api/v1/admin/users/{user_id}/subscriptions/list

Read a paginated membership list for a reader and the selected publication’s Plans. Use this when the reader summary is not enough.

Before you call

Use the reader ID from your intended audience records and an eligible Admin/root credential or authorized service account. The example uses a service account. The list selects memberships through Plans in the selected publication.

Request

Send resource and the credential for your caller type. See collection inputs for pagination and filters.

NameLocationType / requirementMeaning
user_idPathRequired digits-only reader IDSelects memberships by reader ID.
page, limit, order, by, sort, filterQueryOptionalSee collection inputs; membership filters use UserPlanRelationships, Subscriptions or Plans.

No body is needed. The list includes memberships linked to subscriptions and Plans in this publication, including inactive or expired memberships. Read dates and flags for display; check content access separately.

Response

HTTP 200 normally returns items of identity membership objects and paginator. Each item combines catalog fields with membership dates, flags and a nullable sponsored slot. items[].id is the catalog subscription ID; no membership relationship ID is added. Counts include matching rows before invalid mappings are skipped. If all rows are skipped, items can be absent. A caught failure returns items: [], with or without paginator.

Example

curl -X GET "${WALLKIT_API_BASE}/api/v1/admin/users/1001/subscriptions/list" \
  --get \
  -H "resource: ${RESOURCE_KEY}" \
  -H "service-api-key: ${SERVICE_API_KEY}" \
  --data-urlencode page=1 \
  --data-urlencode limit=10 \
  --data-urlencode order=UserPlanRelationships.id \
  --data-urlencode sort=ASC
const url = new URL(`${process.env.WALLKIT_API_BASE}/api/v1/admin/users/1001/subscriptions/list`);
url.search = new URLSearchParams({"page": "1", "limit": "10", "order": "UserPlanRelationships.id", "sort": "ASC"}).toString();
const response = await fetch(url, {
  method: "GET",
  headers: {"resource": process.env.RESOURCE_KEY, "service-api-key": process.env.SERVICE_API_KEY}
});
console.log(response.status, await response.json());
import os, json
from urllib.request import Request, urlopen
from urllib.error import HTTPError
from urllib.parse import urlencode

url = os.environ["WALLKIT_API_BASE"] + "/api/v1/admin/users/1001/subscriptions/list"
url += "?" + urlencode({'page': '1', 'limit': '10', 'order': 'UserPlanRelationships.id', 'sort': 'ASC'})
headers = {"resource": os.environ["RESOURCE_KEY"], "service-api-key": os.environ["SERVICE_API_KEY"]}
request = Request(url, headers=headers, method="GET")
try:
    with urlopen(request) as response:
        print(response.status, json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))

HTTP 200 response excerpt:

{
  "items": [
    {
      "id": 2001,
      "title": "Monthly",
      "plan": {
        "id": 3001,
        "title": "Subscriber"
      },
      "subscription_start_date": "2026-10-01 00:00:00",
      "subscription_end_date": "2026-12-01 00:00:00",
      "autorenew": true,
      "subscription_is_external": false,
      "sponsored_subscription_slot": null
    }
  ],
  "paginator": {
    "current_page": 1,
    "page": 1,
    "total_pages": 1,
    "total_items": 1,
    "limit": 10
  }
}

Reader 1001 has subscription 2001 under Plan 3001. The end date and autorenew choice describe that membership.

If the list is empty

An empty selection or another caught failure returns HTTP 200 with an empty array. Synthetic excerpt:

{
  "items": []
}

An empty response can mean no memberships or a query, filter or mapping failure. If memberships were expected, keep the reader, publication, page and filters for your operator to investigate. Do not delete or downgrade local records based on this result alone. Also handle an absent items field when every selected row was skipped.

Recovery

Use shared recovery for context failures, plus:

HTTP statusAPI code / shapeCauseNext action
200items: [], optional paginatorNo result or a caught failure; not an error envelope.Check known reader/context and filters; ask the operator to investigate unexpected emptiness.
200Some mapped rows missing, or items absentInvalid relationships can be skipped after pagination.Do not equate raw total_items with returned item count or infer all memberships were absent.

Next task

Use a content-access check before serving protected content. To find another reader, return to choose a lookup.

Read the returned objects

The top-level id identifies the reader. Inside subscriptions, id identifies a catalog subscription, not the membership relationship. None of these lookups returns a new authentication token.

Returned objectFields and meaning
ReaderFields from User, with publication-specific values for extra, uid, user_resource_created_at, language, locked, active, confirm and conditional settings/role. See Resource-aware user for these fields. Additional objects follow the endpoint table below, rather than the sign-in response.
Activitylast_activity_date uses this publication’s sessions and can be null. online indicates activity, not reliable live presence.
subscriptions[], or membership-list items[]Fields from Identity membership: the catalog subscription, compact Plan, next/downgrade choices, membership dates/flags and a nullable sponsored slot with sponsorship/sponsor details. The linked definition lists the fields in each nested object. subscription_end_date can be null. Membership autorenew differs from catalog is_allowed_autorenew. Parent-membership values are not a guaranteed fallback.
teams[]Fields from Identity team: active teams attached to the reader within the publication’s partner scope. This can include teams from other publications.
paginatorPagination fields: current_page, page, total_pages, total_items, limit. Counts include selected records before memberships with invalid relationships are skipped.
EndpointFields returned by each endpoint
GET email / POST emailReader fields plus subscriptions; no teams, tags or last_action.
Audience listReader fields plus subscriptions and teams in each item; no tags or last_action.
Membership listMemberships inside items, with pagination when available; no enclosing reader profile.

settings and role require an authorized Admin context and may be absent from service-account responses. extra and settings use your publication’s own keys. Memberships with missing or incompatible relationships may be skipped; returned memberships can be inactive or expired. Check content access separately. Date and money formats follow the linked definitions.

Collection inputs

These query inputs apply to audience and membership lists, not single-reader lookups.

NameType / requirementMeaning
pageOptional integerSend a positive page, such as 1; an omitted-page default is unspecified.
limitOptional integer; fallback 10Send a positive page size, such as 10. This reference does not specify a maximum.
order, byOptional field stringorder takes precedence over by. Default: creation time on Users for the audience list and UserPlanRelationships for memberships. Use a known field.
sortOptional direction string; default DESCUse ASC or DESC. Equal values have no guaranteed tie order.
filterOptional bracket query map or JSON-encoded objectPrefix fields with their model name. Matching depends on field type, as described below. Omission adds no filter. Unknown or invalid filters may be ignored even when the request succeeds.

For the audience list, filter[users.email]=reader@example.com matches an email substring, ignoring case. Use an email lookup for an exact match. filter[Users.id]=1001 selects a reader ID. Other available filters depend on model metadata and joins across reader/publication relationships, subscriptions, Plans, memberships, teams, purchases, history, content, tags, promotions, sessions, invitations and event tickets. Some related team and activity rows extend beyond the selected publication. Use documented fields rather than assuming any field can be filtered.

Membership filters use UserPlanRelationships, Subscriptions and Plans; for example, filter[UserPlanRelationships.subscription_id]=2001. Text matches ignore case and use substrings. Numeric arrays or comma-separated values select IDs; boolean fields use true/false conversion. Omission leaves a filter unrestricted; null, empty and false differ. See filter conventions. Lists can change between requests, and some selected records may be skipped when converted to response objects.

Shared recovery

Errors normally include error, error_description and req_guid. Keep req_guid when asking your integration operator for help. These shared failures can occur before the operation-specific work.

HTTP statusAPI code / shapeCauseNext action
401 / 403accessMissing permitted role/action or account grant; established non-guest callers normally receive 403.Check the operation’s caller column and ask the operator to confirm that exact permission. A service account cannot substitute for Admin context on every route.
401auth_failedRequired caller identity did not resolve.Check the existing credential and chosen header with your operator.
401auth_access_failCaller inactive, or current relationship locked/suspended.Ask the operator to inspect activation and relationship restrictions.
401token_expired / token_compromisedAn applicable session check rejects the credential.Use an existing current authorized credential; do not repeat the lookup with the same rejected token.
404resource_not_existsPublic resource key does not resolve.Confirm the publication public key; changing the reader ID does not repair it.
409initialize_failedContext initialization failed.Supply req_guid and the selected publication context to the operator.

Full diagram

Use the arrow keys to scroll. Escape closes this view.

Search documentation

Enter at least 2 characters.

    ↑ ↓ move through results · Enter opens · Escape closes