List contacts

Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (`after`, `before`).

GET
/v1/contacts

Returns contact summaries for the organization, newest first, filterable by search term, status, and creation time (after, before). fields is a comma-separated list of defined custom field keys to return in each summary's customFields; omitted keys and unselected fields are not returned. Filter by one defined custom field with customField and a JSON-encoded scalar customFieldValue (for example, "creator", 42, or true). Both filter parameters are required together, and unknown keys or values of the wrong type are rejected. Pass nextCursor back as cursor for the next page; it is null on the last page. Read full identities, profile, and metadata with GET /v1/contacts/{id}.

Authorization

apiKey
headerx-api-key<token>

Query Parameters

limit?|null
cursor?string
namespaceId?string
Match^ns_[0-9a-hjkmnp-tv-z]{16,24}$
search?string
status?string
Value in"active""paused""blocked""archived"
fields?string
customField?string
customFieldValue?string
after?string
before?string

Response Body

ContactPage

application/json
  1. response
items*array<>
nextCursor*string|null
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.contacts.list({});
Example Response
{  "items": [    {      "id": "string",      "namespaceId": "string",      "name": "string",      "displayName": "string",      "status": "active",      "email": "string",      "channels": [        "sms"      ],      "tags": [        "string"      ],      "lists": [        {          "id": "string",          "name": "string",          "color": "clay"        }      ],      "customFields": {        "property1": "string",        "property2": "string"      },      "lastActiveAt": "string",      "createdAt": "string"    }  ],  "nextCursor": "string"}

Related documentation