Creating a Contact


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.

    "attributes": {
    "email": "[email protected]"
    "data": {
    "attributes": {
        "email": "[email protected]",
      "events": {},
      "socialProfiles": {},
      "start_date": 1511336276540
     "createdAt": 1511336276540,
     "id": 444406191

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 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.

Did this page help you?