When creating a contact, the only field that is required is email. Please note, if the contact is already present will will respond with an error.
The following example shows how to make a Contact. The code leverages HTTPie for request generation, note the nifty alias for https.
Validate the Contact creation by checking the UI!
Advanced: If you're using externalId (external identifiers) for tracking
You can't update or set the
externalIdattribute directly on this
POSTcontact API as this is a reserved field. You can set it via
drift.identifyon the client side however (this external identifier is the value you provide in the first argument of
drift.identify) or using the endpoint below.
If you want to override with your identifier you can instead
externalIdset in the attributes body. Identify is non-blocking so you may need to wait for contact creation to complete or else you may get a contact not found error (peak delay usually around 30s).
externalIdas an identifier and ensure this value is unique for each user.
Updated 11 months ago