events

Create an event

Changed on

email and phone create a profile when none matches. Platform identifiers such as external_id and shopify_customer_id must already match a profile. Send any event type; the event catalog lists the canonical types, the shape each is validated against, and what each field powers.

post/events

Request

  • Base URL
    https://api.pscrpt.com/v1
  • URL
    https://api.pscrpt.com/v1/events
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization code: https://api.pscrpt.com/oauth/authorize
      Token URL: https://api.pscrpt.com/oauth/token scopes: events:write

Headers

Idempotency-Keystring

Deduplicates retries for 24 hours: the same key returns the original response with Idempotency-Replayed: true; the same key with a different body returns 409 idempotency_key_reused.

Postscript-Versionstring date
Example:2026-07-23

Overrides the key's pinned API revision for this request.

Request body

currencystring
dedupe_idstring

Deduplicates the event for 48 hours. See Idempotency.

occurred_atstring date-time

Defaults to received_at.

profile_idstring
propertiesobject required

Validated against the type's schema when type is a canonical event. See the event catalog for every canonical type, its fields, and what each one powers. Unknown properties are accepted on every type. Keys set to null or {} are dropped at every depth; null array elements are kept. A . in a key nests it: {"a.b": 1} is stored as {"a": {"b": 1}}.

typestring required

Lowercase dot notation, e.g. order.completed. Underscores are rewritten as dots. Platform namespaces such as sms.* and profile.* are reserved.

valuestring

Positive decimal string, never a JSON number — "139.97". No sign, exponent or separators. Sent with currency; one without the other is refused. Canonical order types read properties.total_price instead.

Example request

{
  "identifier": {
    "type": "email"
  }
}

Response

The created event.

Example response

{
  "data": {
    "event_type": {
      "first_seen_at": "2026-07-23T17:32:01.123456Z"
    },
    "occurred_at": "2026-07-23T17:32:01.123456Z",
    "profile": {
      "consents": [
        {
          "channel": "sms",
          "consented_at": "2026-07-23T17:32:01.123456Z",
          "identifier": {
            "created_at": "2026-07-23T17:32:01.123456Z",
            "type": "email",
            "updated_at": "2026-07-23T17:32:01.123456Z",
            "verified_at": "2026-07-23T17:32:01.123456Z"
          },
          "method": "checkout",
          "updated_at": "2026-07-23T17:32:01.123456Z"
        }
      ],
      "created_at": "2026-07-23T17:32:01.123456Z",
      "identifiers": [
        {
          "created_at": "2026-07-23T17:32:01.123456Z",
          "type": "email",
          "updated_at": "2026-07-23T17:32:01.123456Z",
          "verified_at": "2026-07-23T17:32:01.123456Z"
        }
      ],
      "updated_at": "2026-07-23T17:32:01.123456Z"
    },
    "received_at": "2026-07-23T17:32:01.123456Z",
    "source": "api"
  }
}

Changes

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status