Sending data server-side to the Embeddables API
Generate an Embeddables API key
rk_
- for example: rk_myexampleapikey
.Prepare your event data
embeddable_id
: The ID of your Embeddabletimestamp
: The time the event occurred (in ISO 8601 format)custom_event_name
: A name for your custom event (must be snake_case)custom_event_props
: Any custom properties as a JSON stringidentifiers
: A list of key-value pairs to identify the user (e.g., email)identifiers
field is an array of objects, each containing a key
and value
. Currently, we only support one identifier per request (i.e. one object in the array).value
field must be a stringified JSON value. E.g. for email addresses, the value must be "\"test@test.com\""
(note the double quotes).Send the event to the API
/projects/{projectId}/events
X-Api-Key
headerENTRY_NOT_FOUND
responseidentifiers
you provided, for the embeddable_id
you provided, but couldn’t find one.
Things to look out for:
embeddable_id
- this should be the ID of the Embeddable that matches the user you’re trying to add an event for.key
inside identifiers
- this should be the key in the User Data that matches the input component that the user typed in, such as email
or user_email
.value
inside identifiers
- make sure that this matches the user that you’re trying to track, and matches the key and embeddable ID that you’re using.identifiers
correctly - the value must be a stringified JSON value. E.g. for email addresses, the value must be "\"test@test.com\""
(note the double quotes). This can become double-escaped (e.g. "\\"test@test.com\\""
) in certain code environments.