# Set custom field value

Sets a custom field value.

```http
PUT https://api.pozy.ai/v1/contacts/{contactId}/fields/{slug}
```

- Area: Automations / Custom Fields
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `contactId` (string, required)
- `slug` (string, required)

## Request body

Content type: `application/json`

- `value`, any, required

## Example request

```bash
curl -X PUT "https://api.pozy.ai/v1/contacts/642d31f43531ce7d44aa5013/fields/string" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "value": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/contacts/642d31f43531ce7d44aa5013/fields/string", {
  method: "PUT",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    value: "string"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.put(
    "https://api.pozy.ai/v1/contacts/642d31f43531ce7d44aa5013/fields/string",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "value": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 200
