Skip to main content
POST
/
audience
/
properties
Create a property
curl --request POST \
  --url https://app.lettr.com/api/audience/properties \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "first_name",
  "type": "string",
  "fallback_value": "Friend"
}
'
{
  "message": "Property retrieved successfully.",
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "first_name",
    "type": "string",
    "fallback_value": "Friend",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.lettr.com/llms.txt

Use this file to discover all available pages before exploring further.

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.

Authorizations

Authorization
string
header
required

API key for authentication

Body

application/json
name
string
required

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

Maximum string length: 255
Pattern: ^[a-z][a-z0-9_]*$
Example:

"first_name"

type
enum<string>
required

Data type of the property

Available options:
string,
number,
boolean,
date,
json
Example:

"string"

fallback_value
string | null
Maximum string length: 255
Example:

"Friend"

Response

Property created

message
string
required
Example:

"Property retrieved successfully."

data
object
required