Skip to main content
GET/all-attributes/:model/

Get all attributes

You can get a list of all attribute names and their types for each model: the standard fields and your custom attributes.

AttributesTypeRequiredDescription
modelstringyes

Specific model with its own list of attributes.
It can be:

  • activity
  • company
  • deal
  • product
  • ticket
  • user

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/all-attributes/:model/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

[
{
"name": "key",
"type": "string"
},
{
"name": "user_id",
"type": "string"
},
{
"name": "assigned_to",
"type": "integer"
},
{
"name": "last_contacted",
"type": "datetime"
},
{
"name": "last_heard_from",
"type": "datetime"
},
{
"name": "email",
"type": "string"
},
{
"name": "gender",
"type": "fixed",
"choices": [
,1 field
,1 field
1 field
],
"allow_multiple_choices": false
},
{
"name": "status",
"type": "fixed",
"choices": [
,1 field
1 field
],
"allow_multiple_choices": false
},
{
"name": "first_name",
"type": "string"
},
{
"name": "last_name",
"type": "string"
},
{
"name": "phone_number",
"type": "string"
},
{
"name": "first_seen",
"type": "datetime"
},
{
"name": "last_seen",
"type": "datetime"
},
{
"name": "page_views",
"type": "integer"
},
{
"name": "last_ip",
"type": "string"
},
{
"name": "hostname",
"type": "string"
},
{
"name": "referrer",
"type": "string"
},
{
"name": "country",
"type": "string"
},
{
"name": "region",
"type": "string"
},
{
"name": "city",
"type": "string"
},
{
"name": "geofencing_location",
"type": "json"
},
{
"name": "unsubscribed_from_sms",
"type": "boolean"
},
{
"name": "device",
"type": "fixed",
"choices": [
,1 field
,1 field
1 field
],
"allow_multiple_choices": false
},
{
"name": "os_type",
"type": "string"
},
{
"name": "browser",
"type": "string"
},
{
"name": "browser_language",
"type": "string"
},
{
"name": "widget_language",
"type": "string"
},
{
"name": "browser_version",
"type": "integer"
},
{
"name": "resolution",
"type": "string"
},
{
"name": "current_url",
"type": "string"
},
{
"name": "score",
"type": "integer"
},
{
"name": "facebook_url",
"type": "string"
},
{
"name": "linkedin_url",
"type": "string"
},
{
"name": "twitter_url",
"type": "string"
},
{
"name": "google_url",
"type": "string"
},
{
"name": "unsubscribed",
"type": "boolean"
},
{
"name": "whatsapp_unsubscribed",
"type": "boolean"
},
{
"name": "spambounced",
"type": "boolean"
},
{
"name": "softbounced",
"type": "boolean"
},
{
"name": "hardbounced",
"type": "boolean"
},
{
"name": "notifications",
"type": "boolean"
},
{
"name": "email_mx_valid",
"type": "boolean"
},
{
"name": "created_at",
"type": "datetime"
},
{
"name": "updated_at",
"type": "datetime"
},
{
"name": "lt_opened_email",
"type": "datetime"
},
{
"name": "lt_clicked_email",
"type": "datetime"
},
{
"name": "most_active_time",
"type": "datetime"
},
{
"name": "is_active",
"type": "boolean"
},
{
"name": "widget_visibility",
"type": "fixed",
"choices": [
,1 field
1 field
],
"allow_multiple_choices": false
},
{
"name": "Boolean attribute",
"type": "boolean"
},
{
"name": "Date attribute",
"type": "date"
},
{
"name": "Datetime attribute",
"type": "datetime"
},
{
"name": "Fixed choices attribute",
"type": "fixed",
"choices": [
,1 field
1 field
],
"allow_multiple_choices": true
},
{
"name": "Floating-point number attribute",
"type": "float"
},
{
"name": "Integer attribute",
"type": "integer"
},
{
"name": "JSON attribute",
"type": "json"
},
{
"name": "String attribute",
"type": "string"
}
]

The 404 with "detail": "Unknown model." comes back for any other model, including clientuser, which Create attribute uses for contacts. The list has no IDs and no name_std: for a custom attribute's name_std, keep the Create attribute response.

Response fields​

The 200 OK response body is an array. Each item has these fields.

namestring
For a standard field, its name in the API (email). For a custom attribute, its display name as created (Loyalty tier), not name_std.
typestring
Value type of the attribute: boolean, date, datetime, fixed, float, integer, json or string.
choicesarray of objects (map)
Options, each as {"<value>": "<label>"}. On fixed attributes that have options, and on any attribute created with choices. Missing otherwise.
allow_multiple_choicesboolean
Whether more than one option can be selected. Present together with choices.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.