Listing Custom Attributes

❗️

Note that listing custom attributes requires an elevated scope.

This is currently provided with the all_read_contacts scope (available under Contact scopes via the dev.drift app portal).

To use this API, your app must explicitly enable this scope.

The list custom attribute endpoint returns a description of all the created/enabled custom contact fields in the organization's account (corresponding with the access token used). Uses the following endpoint:

GET https://driftapi.com/contacts/attributes

Example Response:

{
    "data": {
        "properties": [
            {
                "type": "NUMERIC",
                "displayName": "age",
                "name": "age"
            },
            {
                "type": "STRING",
                "displayName": "Alias",
                "name": "alias"
            },
            {
                "type": "STRING",
                "displayName": "avatar_url",
                "name": "avatar_url"
            },
            {
                "type": "STRING",
                "displayName": "bio",
                "name": "bio"
            },
            {
                "type": "STRING",
                "displayName": "button_clicked",
                "name": "button_clicked"
            },
            {
                "type": "STRING",
                "displayName": "City",
                "name": "city"
            },
            {
                "type": "STRING",
                "displayName": "Country",
                "name": "country"
            }...
        ]
    }
}

Property Definition

field

type

description

type

string

One of {
STRING, NUMERIC, BOOLEAN, DATETIME, DATE}. Type of the field

displayName

string

The display name of the field in Drift visually.

name

string

The internal name representation of the field. This is used for setting/getting the value.


Did this page help you?