---
title: "Update a segment"
method: PATCH
path: "/v1/segments/{id}"
tags: ["Contacts"]
---

# Update a segment

`PATCH /v1/segments/{id}`

## Request

- Base URL: `https://smtpfa.st/api`
- URL: `https://smtpfa.st/api/v1/segments/{id}`
- Auth: HTTP bearer

Change the name, description or color of a segment. Only the fields sent change.

## Path parameters

- `id` string, required

## Request body

- UpdateSegmentRequest
  - `name` string
  - `description` string, nullable
  - `color` string, nullable

## Response `200`

Segment updated

- Segment
  - `id` string, required
  - `name` string, required
  - `description` string, nullable
  - `color` string, nullable
  - `contact_count` integer
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `object` string

## Other responses

- `400`: Bad request - check your payload
- `401`: Invalid or missing API key
- `403`: Forbidden - domain not verified or insufficient permissions
- `404`: Resource not found
- `409`: Conflict - the resource already exists or changed meanwhile
- `429`: Rate limit exceeded - retry after the period indicated in the Retry-After header
- `500`: Internal server error

---

[API](https://skmtc.dev/smtpfa/apis/smtpfast-api.md) · [All operations](https://skmtc.dev/smtpfa/apis/smtpfast-api/llms.txt) · [OpenAPI document](https://skmtc.dev/smtpfa/apis/smtpfast-api/revisions/79dda742f53e?raw)
