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).
If your Drift account was provisioned after October 6, 2020 -- by default you will also need to secure your identifiers with signed identities. Optionally, you may reconfigure your signed identity settings here. If you chose not to implement signed identities, you will need to ensure you are not using guessable IDs as externalId values. Drift strongly recommends the use of signed identities to add security to user identification.
externalIdas an identifier and ensure this value is unique for each user.
Updated 6 months ago