v1

latestOpenAPI 3.0.32026-07-24235275.4 KB
Custom Events

Custom Events

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

post/events/custom

Request body

typestring 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 ,
externalEventIdstring

A unique identifier representing this specific event. A UUID is recommended.

occurredAtstring date-time

Timestamp of when the action occurred in RFC 3339 format 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.

Example request

{
  "type": "Order Shipped",
  "properties": {
    "mediaUrl": "https://cdn.example.com/images/sample-image.jpg",
    "orderStatusURL": "https://example.com/orderstatus/54321",
    "delivery_date": "May 10",
    "Order Id": "54321",
    "products": [
      "productId1",
      "productId2"
    ],
    "shipment": {
      "carrier": "fedex",
      "trackingNumber": "12345"
    }
  },
  "externalEventId": "37fb97a9-6cfd-4983-bd65-68d104d53b70",
  "occurredAt": "2021-03-30T14:38:29.000Z",
  "user": {
    "phone": "+13115552368",
    "email": "test@gmail.com"
  }
}

Response

Ok