Custom Events

Use the Custom Events API to send user actions to use in the Attentive Segment Builder and Journey Builder. This data cannot contain any sensitive or special categories of information as defined in applicable data protection and privacy laws, including the California Consumer Privacy Act (CCPA) and California Privacy Rights Act (CPRA). See a list of specific categories of data you cannot share with Attentive here.

Custom Events

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

Request
Security:
OAuthFlow (events:write)
Request Body schema: application/json
type
required
string

The type of event. This name is case sensitive. "Order shipped" and "Order Shipped" would be considered different event types.

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.

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.

externalEventId
string

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

occurredAt
string <date-time>

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

required
object (EventUser)

User associated with the action. Note that this is a visitor to the site and does not need to be actively subscribed to Attentive.

Responses
200

Ok

400

Invalid parameter in request query or body

401

Unauthorized

403

Access Denied

404

The specified resource was not found

500

Internal Server Error

post/events/custom
Request samples
application/json
{
  • "type": "Order Shipped",
  • "properties": {
    },
  • "externalEventId": "37fb97a9-6cfd-4983-bd65-68d104d53b70",
  • "occurredAt": "2021-03-30T14:38:29+0000",
  • "user": {
    }
}