Record a contact event (Preview)
Preview · Available to selected organizations. Records a custom contact event. Identify the contact by exactly one ID, external ID, or email.
Records a custom contact event. Identify the contact by exactly one ID, external ID, or email. A missing email or external ID creates a contact; an unknown contact ID returns 404. An organization-scoped idempotency key replays the original event. Event names use letters, digits, underscores, hyphens, and dots, up to 255 characters; contact. and samva. prefixes are reserved. Properties allow at most 50 keys and 32 KiB of UTF-8 JSON. Events are retained for 90 days.
apiKeyx-api-key<token>idempotency-key?string1 <= length <= 255application/json- body
contact*||name*string1 <= length <= 255properties?|nulloccurredAt?string|nullContactEvent
application/json- response
id*stringcontactId*ContactId^contact_[0-9a-hjkmnp-tv-z]{16,24}$name*stringsource*string"api""samva"properties*occurredAt*stringrecordedAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.events.create({ "contact": { "id": "example" }, "name": "example"});{ "id": "string", "contactId": "string", "name": "string", "source": "api", "properties": { "property1": "string", "property2": "string" }, "occurredAt": "string", "recordedAt": "string"}Related documentation
Record contact events in a batch (Preview)
Preview · Available to selected organizations. Validates the full request shape, contact references, and event names before processing.
List contact events (Preview)
Preview · Available to selected organizations. Returns custom and Samva lifecycle events, newest occurrence first, within the 90-day retention window. Pass nextCursor back as cursor for the next page.