Skip to Content

List contact events

Returns custom and Samva lifecycle events, newest occurrence first, within the 90-day retention window. Pass nextCursor back as cursor for the next page.

GET
/v1/contacts/{id}/events

Returns custom and Samva lifecycle events, newest occurrence first, within the 90-day retention window. Pass nextCursor back as cursor for the next page.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^contact_[0-9a-hjkmnp-tv-z]{16,24}$

Query Parameters

limit?|null
cursor?string

Response Body

ContactEventPage

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.listEvents({
  "id": "example"
});
Example Response
{
  "items": [
    {
      "id": "string",
      "contactId": "string",
      "name": "string",
      "source": "api",
      "properties": {
        "property1": "string",
        "property2": "string"
      },
      "occurredAt": "string",
      "recordedAt": "string"
    }
  ],
  "nextCursor": "string"
}

Related documentation