API · Contact properties
Create Contact Property
Create a string or number property for contacts (requires full access). Your team can have up to 100 properties, and property keys keep their original spelling.
POST
/contact-propertiesFull accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
Idempotency-Keyheader · optional | string1–256 characters | Makes the request safe to retry. See Idempotency. |
keybody · required | stringMatches /^[a-zA-Z0-9_]{1,50}$/ | Case-preserved key of 1–50 letters, numbers, or underscores, excluding email, first_name, last_name, and unsubscribed. |
typebody · required | "string" | "number" | Property value type: string or number. |
fallback_valuebody · optional | string | number | Default matching the property type, with strings up to 1000 characters preserved exactly, including whitespace and empty strings; null is rejected. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X POST "$OPENSEND_BASE_URL/contact-properties" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"key":"plan","type":"string","fallback_value":"starter"}'Response
201 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "contact_property",
"id": "YOUR_ID"
}Behavior and errors
At most 100 properties per team. Boolean values are unsupported. Deletion hides the property immediately and removes contact values in batches; the key stays reserved until cleanup finishes.
Use a full-access credential. Resource IDs belong to your team; an unknown or foreign resource returns 404. See authentication, errors, rate limits, and compatibility for the shared contract.