Contact Properties
Create and manage Contact Properties
Retrieve a list of contact properties
GET /contact-properties
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Number of items to return. |
after | string | no | Return items after this cursor. |
before | string | no | Return items before this cursor. |
Example
curl -X GET "$SESAMESEND_URL/contact-properties" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Responses
| Status | Description |
|---|---|
200 | OK |
{
"object": "list",
"has_more": true,
"data": [
{
"id": "string",
"key": "string",
"type": "string",
"fallback_value": "string",
"created_at": "2023-10-06 23:47:56.678+00"
}
]
}Create a new contact property
POST /contact-properties
Body
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | The property key. Max length is 50 characters. Only alphanumeric characters and underscores are allowed. |
type | "string" | "number" | yes | The property type. |
fallback_value | string | number | no | The default value to use when the property is not set for a contact. Must match the type specified in the type field. |
Example
curl -X POST "$SESAMESEND_URL/contact-properties" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"key": "string",
"type": "string"
}'Responses
| Status | Description |
|---|---|
201 | OK |
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"object": "contact_property"
}Retrieve a single contact property
GET /contact-properties/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Contact Property ID. |
Example
curl -X GET "$SESAMESEND_URL/contact-properties/<id>" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Responses
| Status | Description |
|---|---|
200 | OK |
{
"object": "contact_property",
"id": "b6d24b8e-af0b-4c3c-be0c-359bbd97381e",
"key": "company_name",
"type": "string",
"fallback_value": "Acme Corp",
"created_at": "2023-10-06 23:47:56.678+00"
}Update an existing contact property
PATCH /contact-properties/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Contact Property ID. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
fallback_value | string | number | no | The default value to use when the property is not set for a contact. Must match the type of the property. |
Example
curl -X PATCH "$SESAMESEND_URL/contact-properties/<id>" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'Responses
| Status | Description |
|---|---|
200 | OK |
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"object": "contact_property"
}Remove an existing contact property
DELETE /contact-properties/{id}
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The Contact Property ID. |
Example
curl -X DELETE "$SESAMESEND_URL/contact-properties/<id>" \
-H "Authorization: Bearer $OPENSEND_API_KEY"Responses
| Status | Description |
|---|---|
200 | OK |
{
"id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
"object": "contact_property",
"deleted": true
}