v1

latestOpenAPI 3.0.32026-07-24235275.4 KB
Custom Attributes

Custom Attributes

Make a call to this endpoint for any attribute-based data. There are no limits to the amount of custom attributes that can be created. Note that you can create net-new properties with this API, however, it cannot be used to create new values for an existing UI-created property name. If a property name is created through the Attentive platform, all possible property values must also be defined in the platform. For example, if a property has possible values of "Adult, Teen, Children's", those are the only values that will be accepted through the API. This does not apply for properties with the type "Custom input", for example: Full Name. Also, please note that the API does not support arrays. For example, attempting to pass an array such as '["chicago", "new york"]' for an attribute like 'favorite_city' will result in a 400 error.

Note : The maximum length for an attribute name is 200 characters.

post/attributes/custom

Request body

propertiesobject required

Any metadata associated with the attribute. Object keys are expected to be strings. Object values can be any type. The key will be assigned a type corresponding to the type seen of the first value. For example, if 'Age' is passed with the first value of '24', 'Age' will be typed as a 'Number'. There is no need to pass strings in double quotes. Both object keys and object values are case sensitive. "Favorite color" and "Favorite Color" would be considered different custom attributes.

Example request

{
  "properties": {
    "age": "24",
    "birthday": "1986-11-16",
    "sign up": "2021-04-23T16:04:33Z",
    "favorite team": "Minnesota Vikings",
    "Gift card balance": "50.89",
    "VIP": "TRUE"
  },
  "user": {
    "phone": "+13115552368",
    "email": "test@gmail.com"
  }
}

Response

Ok