Skip to main content
POST

Authorizations

X-API-Key
string
header
required

Body

application/json

Contains the properties of the custom event data to be sent. For events defined with objectType as CONTACT, provide one of objectId, contactPhoneNumber, or contactUsername to identify the contact. Only one identifier is used per event. If multiple identifiers are provided, a numeric objectId takes precedence, followed by a non-blank contactPhoneNumber, then contactUsername.

eventName
string
required

Name of the event. One of the custom event names you previously defined.

Example:

"unique_event_name"

objectId
string
required

ID of the object that the event is associated with. For events defined with objectType as CONTACT, provide the numeric ID of an existing contact in your account. A numeric objectId takes precedence over contactPhoneNumber and contactUsername. If that contact is not found, the request fails without trying another identifier.

occurTime
string<date-time>

The time at which the event occurred, formatted in RFC 3339. e.g., 2022-06-01T12:00:00.000Z, if not provided, the current time will be used.

Example:

"2022-06-01T12:00:00.000Z"

contactPhoneNumber
string

The contact's phone number in E.164 format for events defined with objectType as CONTACT. Used when no numeric objectId is provided. Looks up a contact in your account by phone number and creates one if no match exists. Takes precedence over contactUsername.

Example:

"+16315551111"

contactUsername
string

The Meta username of an existing contact in your account for events defined with objectType as CONTACT. Provide the username saved on the contact, without the leading @. Used when neither a numeric objectId nor a non-blank contactPhoneNumber is provided. If no matching contact exists, the request fails. A username does not automatically create a contact.

Example:

"customer_demo"

properties
object

The properties of the custom event.

Example:

Response

200

Successfully accepted the event. Returns an empty JSON object.