---
title: "Custom Events"
method: POST
path: "/events/custom"
tags: ["Custom Events"]
---

# Custom Events

`POST /events/custom`

Make a call to this endpoint for any event-based data representing user actions.

## Request body

- CustomEventsRequest
  - `type` string, required — The type of event. This name is case sensitive. "Order shipped" and "Order Shipped" would be considered different event types. The Custom Event type cannot any of the following special characters: * double quote " * single quote ' * parentheses ( ) * curly braces { } * square brackets [ ] * backslash \ * vertical bar | * commas ,
  - `properties` object — Any metadata associated with the event. Object keys are expected to be strings, and cannot contain any of the following special characters: * double quote " * curly braces { } * square brackets [ ] * backslash \ * vertical bar | Object values can be any type. Note that both object keys and object values are case sensitive. For example, "deliverydate" and "DeliveryDate" would be considered different event properties. Notes: * When you’re creating journeys that use custom events data, you can only use lists and nested objects can only be used with email messages. Lists and nested objects are not currently supported for SMS. * For URLs that are provided as a value, Attentive will automatically shorten the link with your brand's link shortener. For example, https://mysite.com/. Note that Attentive can only shorten URLs that are 1,024 characters or fewer. * Custom events must be triggered using the same custom app that originally created them. * There is a maximum of 200 object keys per custom event type. While payloads larger than this will be saved, not all keys will be available for use in Journeys and macros.
    - `mediaUrl` string — URL of the image that accompanies MMS. Be sure to add a dynamic product image in the message composer in the Attentive UI when adding a text message step to a journey triggered by the custom event.
  - `externalEventId` string — A unique identifier representing this specific event. A UUID is recommended.
  - `occurredAt` string, date-time — Timestamp of when the action occurred in [RFC 3339 format](https://datatracker.ietf.org/doc/html/rfc3339#section-5.8) with required UTC offset. If the timestamp is older than 12 hours, it will not trigger any relevant Journeys. If no timestamp is provided, it is assumed the event occurred when the endpoint is called.
  - `user` EventUser, required — User associated with the action. Note that this is a visitor to the site and does not need to be actively subscribed to Attentive. Phone, email, or an external identifier (clientUserId or another custom identifier) are required
    - `phone` string — Phone number of the user associated with the action. [E.164 format](https://en.wikipedia.org/wiki/E.164) is required. This field is required if either email or an externalIdentifier is not provided.
    - `email` string — Email of the user associated with the action. This field is required if either phone or an externalIdentifier is not provided.
    - `externalIdentifiers` ExternalIdentifiers — clientUserId or another custom identifier. This field is required if either phone or email is not provided. If using an external identifier instead of phone or email, the external identifier must first be associated with a phone or email using the Identity API.
      - `clientUserId` string — (optional) Your primary ID for a user
      - `customIdentifiers` object[] — (optional) Namespaced custom identifiers and their values.
        - `name` string
        - `value` string

## Response `200`

Ok

## Other responses

- `400` — Invalid parameter in request query or body
- `401` — Unauthorized
- `403` — Access Denied
- `404` — The specified resource was not found
- `429` — The user has sent too many requests in a given amount of time
- `500` — Internal Server Error

---

[API](https://skmtc.net/attentive/apis/attentive-api-v2.md) · [All operations](https://skmtc.net/attentive/apis/attentive-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/attentive/attentive-api-v2/revisions/be387e501197/schema)
