# Update a contact property's fallback (/docs/api-reference/contacts/update-contact-property)

Changes the value used when a contact has none for this property. Its key and type can't change.

`PATCH https://api.coss.com/v1/contact_properties/{id}`

Authenticate with your API key as a bearer token (`Authorization: Bearer coss_test_…`). Responses are JSON with snake_case fields; errors are `{ error: { type, code, message, param?, issues?, request_id } }` (https://coss.com/docs/api-reference/errors.md).

## Path parameters

- `id` (string, required): The property's id.

## Request body

- `fallback` (string | number | boolean | null, required, at most 2000 characters): Used in templates for contacts without a value. `null` removes it.

## Example request

TypeScript (the `coss` package):

```ts
import { Coss } from "coss";

const coss = new Coss({
  apiKey: process.env.COSS_API_KEY,
  baseUrl: "https://api.coss.com",
});

const { data, error } = await coss.email.contacts.properties.update("cprop_01k7c8m4q2f3e9v6t5r1n0p8yz", {
  fallback: "starter",
});
```

HTTP:

```sh
curl -X PATCH "https://api.coss.com/v1/contact_properties/cprop_01k7c8m4q2f3e9v6t5r1n0p8yz" \
  -H "Authorization: Bearer $COSS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "fallback": "starter"
}'
```

Python:

```python
from coss import Coss

client = Coss()  # api_key= or COSS_API_KEY

client.email.contacts.properties.update(
    id="cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
    fallback="starter",
)
```

Go:

```go
import (
	"context"

	contacts "github.com/cosscom/coss-go/email/contacts"
	cossclient "github.com/cosscom/coss-go/client"
)

client := cossclient.NewClient() // option.WithAPIKey(…) or COSS_API_KEY

request := &contacts.UpdateContactPropertyRequest{
    ID: "cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
    Fallback: &contacts.UpdateContactPropertyRequestFallback{
        String: "starter",
    },
}
client.Email.Contacts.Properties.Update(
    context.TODO(),
    request,
)
```

Ruby:

```ruby
require "coss"

client = Coss::Client.new # api_key: or COSS_API_KEY

client.email.contacts.properties.update(
  id: "cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
  fallback: "starter"
)
```

PHP:

```php
<?php

use Coss\Coss;
use Coss\Email\Contacts\Properties\Requests\UpdateContactPropertyRequest;

$client = new Coss(); // apiKey: or COSS_API_KEY

$client->email->contacts->properties->update(
    'cprop_01k7c8m4q2f3e9v6t5r1n0p8yz',
    new UpdateContactPropertyRequest([
        'fallback' => 'starter',
    ]),
);
```

Java:

```java
import com.coss.Coss;
import com.coss.resources.email.contacts.properties.requests.UpdateContactPropertyRequest;
import com.coss.resources.email.contacts.properties.types.UpdateContactPropertyRequestFallback;

Coss client = Coss.builder().build(); // .apiKey(…) or COSS_API_KEY

client.email().contacts().properties().update(
    "cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
    UpdateContactPropertyRequest
        .builder()
        .fallback(
            OptionalNullable.of(
                UpdateContactPropertyRequestFallback.of("starter")
            )
        )
        .build()
);
```

.NET:

```csharp
using Coss;
using Coss.Email.Contacts;

var client = new CossClient(); // apiKey: or COSS_API_KEY

await client.Email.Contacts.Properties.UpdateAsync(
    new UpdateContactPropertyRequest
    {
        Id = "cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
        Fallback = "starter",
    }
);
```

## Response 200

The property.

- `object` ("contact_property", required)
- `id` (string, required)
- `key` (string, required): How contacts and templates name it (`{{{contact.<key>}}}`). Can't change.
- `type` ("string" | "number" | "boolean" | "date", required): `date` values are ISO 8601 strings.
- `fallback` (string | number | boolean | null, required): Used in templates for contacts without a value.
- `created_at` (string, required, date-time)
- `updated_at` (string, required, date-time)

Example:

```json
{
  "object": "contact_property",
  "id": "cprop_01k7c8m4q2f3e9v6t5r1n0p8yz",
  "key": "plan",
  "type": "string",
  "fallback": "free",
  "created_at": "2026-10-10T12:00:00.000Z",
  "updated_at": "2026-10-10T12:00:00.000Z"
}
```

## Errors

- `400`: The body is not valid JSON (`invalid_json`). Also when the `Coss-Version` header names an unknown API version (`invalid_api_version`).
- `401`: The API key is missing, invalid, revoked or expired (`authentication_error`).
- `403`: The API key lacks the permission this endpoint needs (`permission_error`), or its organization is suspended (`organization_suspended`).
- `404`: No property with this id exists in the API key's environment (`not_found`).
- `413`: The request body is larger than 5 MB (`payload_too_large`).
- `415`: The body is not sent as `application/json` (`unsupported_media_type`).
- `422`: The fallback doesn't fit the property's type (`invalid_property`).
- `429`: Too many requests with this API key (`rate_limited`), or too many requests with invalid keys from this address (`too_many_failed_authentications`). Retry after `Retry-After` seconds. Successful responses carry `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the limit is fully restored).
- `500`: Unexpected server error (`api_error` / `internal_error`).
- `503`: The API key could not be verified right now; retry (`service_unavailable`).