> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Segment

> Update the name or criteria of an existing segment.

Update segment metadata or dynamic filter rules.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the segment.
</ParamField>

### Body Parameters

<ParamField body="name" type="string">
  The new segment name.
</ParamField>

<ParamField body="criteria" type="object">
  Updated query conditions for dynamic segmenting.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">The segment ID.</ResponseField>
  <ResponseField name="name" type="string">Updated segment name.</ResponseField>
  <ResponseField name="type" type="string">Segment type.</ResponseField>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.mailofly.com/api/v1/segments/seg_123 \
    -H "Authorization: Bearer mf_live_your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Enterprise Customers (Active)"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "id": "seg_123",
      "name": "Enterprise Customers (Active)",
      "type": "dynamic"
    }
  }
  ```
</ResponseExample>


## Related topics

- [Segments](/audience/segments.md)
- [MCP Tools Reference](/mcp-server/tools.md)
- [Delete Segment](/api/segments/delete-segment.md)
- [Retrieve Segment](/api/segments/retrieve-segment.md)
- [Create Segment](/api/segments/create-segment.md)
