# Create contact property

`POST /v1/contact-properties`

Names a value every contact can hold, with its type and what to use when a contact has none. From then on a value of another type is refused, and a broadcast fills `{{key}}` with the value or the fallback.

Needs the scope: `audiences:write`

## Body parameters

- `key` (string, required): The name of the property, such as `plan`: letters, digits and underscores. Up to 48 characters.
- `type` (string): What its values are: `string`, `number` or `boolean`. Without it, `string`. One of: `string`, `number`, `boolean`.
- `fallback` (string | number | boolean | null): What fills `{{key}}` for a contact with no value. Without it, nothing. Default: `null`.

## Returns

- `object` ("contact_property"): Always `contact_property`.
- `id` (string): The id of the property.
- `key` (string): The name contacts hold a value under, and the name of its `{{slot}}`.
- `type` (string): What its values are: `string`, `number` or `boolean`. One of: `string`, `number`, `boolean`.
- `fallback` (string | number | boolean | null): What fills its slot for a contact with no value, or `null`.
- `createdAt` (string): When the property was made.

## Example

cURL:

```bash
curl -X POST "$OPENSEND_API_URL/v1/contact-properties" \
  -H "Authorization: Bearer $OPENSEND_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "key": "company",
  "type": "string",
  "fallback": "your company"
}'
```

TypeScript:

```ts
await opensend.contactProperties.create({
  key: 'company',
  type: 'string',
  fallback: 'your company',
})
```

CLI:

```bash
opensend contact-properties create \
  --key company \
  --type string \
  --fallback 'your company'
```

MCP:

```json
{
  "name": "contact_properties_create",
  "arguments": {
    "key": "company",
    "type": "string",
    "fallback": "your company"
  }
}
```

Answer:

```json
{
  "object": "contact_property",
  "id": "prop_company",
  "key": "company",
  "type": "string",
  "fallback": "your company",
  "createdAt": "2026-11-27T09:30:00.000Z"
}
```
