> ## Documentation index
> Fetch the complete documentation index at: https://workover.io/docs/llms.txt

# Change, archive or restore a segment

PATCH`/workspace/{orgId}/contact-segments/{id}`

Any of a new name, a dynamic segment’s new definition, or archived true or false. New rules and a restore recompute it, and the segments that read it. Owners and admins.

## Path Parameters

`orgId`

numberrequired

`id`

numberrequired

## Response

200

**cURL**

```bash
curl --request PATCH \
  --url 'https://api.workover.io/workspace/{orgId}/contact-segments/{id}'
```

**JavaScript**

```javascript
const options = {
  method: 'PATCH'
};

fetch('https://api.workover.io/workspace/{orgId}/contact-segments/{id}', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

**Python**

```python
import requests

url = "https://api.workover.io/workspace/{orgId}/contact-segments/{id}"

response = requests.patch(url)

print(response.text)
```
