Creating a Contact

POST https://driftapi.com/contacts

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.

Example Creation

The following example shows how to make a Contact. The code leverages HTTPie for request generation, note the nifty alias for https.

This is the most basic Contact that one can create.

Simply POST to the /contacts end point

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 externalId attribute directly on this POST contact API as this is a reserved field. You can set it via drift.identify on 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 POST to https://driftapi.com/contacts/identify with your externalId set 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.

Important: Treat externalId as an identifier and ensure this value is unique for each user.

🚧

NOTE:

Updated 4 days ago

Creating a Contact


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.