Audience

Create a property

Create a new property that contacts can store. The name and type fields are immutable after creation — to change them, delete the property and create a new one. Requires the audience:write scope and is blocked for sandbox API keys.

post/audience/properties

Request

  • Base URL: https://app.lettr.com/api
  • URL: https://app.lettr.com/api/audience/properties
  • Auth: HTTP bearer

Request body

namestring required

Property name. Must start with a lowercase letter and contain only lowercase letters, numbers, and underscores.

type'string' | 'number' | 'boolean' | 'date' | 'json' required

Data type of the property

fallback_valuestring nullable
purpose'communication_language' | 'null' nullable

Designate this property as the team's communication language. Assigning it takes the role away from whichever property held it before.

Example request

{
  "name": "first_name",
  "type": "string",
  "fallback_value": "Friend"
}

Response

Property created

messagestring required

Example response

{
  "message": "Property retrieved successfully.",
  "data": {
    "name": "first_name",
    "type": "string",
    "fallback_value": "Friend"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.