---
title: "Create a segment"
method: POST
path: "/v1/segments"
tags: ["Contacts"]
---

# Create a segment

`POST /v1/segments`

## Request

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

Create a manual segment for organizing contacts and targeting broadcasts.

## Request body

- CreateSegmentRequest
  - `name` string, required
  - `description` string, nullable
  - `color` string, nullable

## Response `201`

Segment created

- 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
- `402`: Plan limit reached - upgrade the plan to add more
- `403`: Forbidden - domain not verified or insufficient permissions
- `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)
