Track
Event payload schema and trigger documentation for the Morf Track API
The Morf Track API is used to send structured event and profile data to Morf. These events are used to trigger workflows which automatically update profile properties for your customers (Morf Profiles).
An example payload and description of the payload fields is given on the right hand side.
Events
Triggering Webhook Types
Any event_name
is supported as an event type. For example, join-button-clicked
is a valid event name. There are no limitations on the character set or length of the event name, however we recommend using a short, descriptive name which is easy to understand and identify.
Requests
Submit a POST request to the Morf Track API endpoint (ask your customer success liaison for details of the endpoint to use or navigate to the Connect
tab of a Track workflow’s trigger node in the graph).
The POST request should include a JSON body with the data defined in the schema below. See the example and a description of the payload on the right hand side for details. We recommend setting the Content-Type: application/json
header if you wish.
If a field is marked (Optional)
, you can either send that field in the payload or not. Eliding the key is tolerated as is submitting null
as the value. These are treated equivalently.
Special Object Fields
Profile Properties (profile_properties
)
Profile properties are used to store data on a Morf Profile. Any field matching an existing Morf Profile Property type will be updated on the Morf Profile. For example, if the payload’s profile properties object contains a date_of_birth
field, the Morf Profile’s date_of_birth
property will be updated.
New scalar field values inside this object will be added to the Morf Profile as new properties. For example, if you sent a new field like favorite_color
with a value of blue
, the new Property type will be created and updated on the Morf Profile.
Event Data (event_data
)
Event data is used to store data associated with the event. This data is not automatically stored on the Morf Profile but is available to be accessed within a Morf Workflow.
Profile Ids (profile_ids
)
This object is used to store IDs from third party systems. The customer
field is used to store a unique identifier in your organization. The other fields are used to store IDs from other third party systems.