---
title: "Add a new subscriber"
method: POST
path: "/subscribers"
tags: ["subscribers"]
---

# Add a new subscriber

`POST /subscribers`

Add a new subscriber to the list.

## Request body

- object
  - `email` string, required — The subscriber's email address.
  - `name` string — The subscriber's name.
  - `segments` integer[] — Groups to place the subscriber in.
  - `metadata` object — Metadata (key=value pairs) for the subscriber. These values can be used in the campaign templates to personalize the e-mail, used in a form of tags e.g. {{phone_number}}

## Response `201`

OK

- Subscriber
  - `id` integer — The ID of the resource.
  - `created_at` string, date-time — The date and time when the resource was created.
  - `updated_at` string, date-time — The date and time when the resource was last updated.
  - `name` string — The name of the subscriber.
  - `email` string — The email of the subscriber.
  - `metadata` object — Metadata associated with the subscriber.
  - `blacklisted` boolean — Flag that indicates if the subscriber has been blacklisted (unsubscribed, marked email as spam, bounced).
  - `active` boolean — Flag that indicates if the subscriber is active or not (we send e-mails only to active subscribers).
  - `segments` Group[]
    - `id` integer — The ID of the resource.
    - `created_at` string, date-time — The date and time when the resource was created.
    - `updated_at` string, date-time — The date and time when the resource was last updated.
    - `name` string — The name of the group.
    - `subscribers_in_segment` integer — Number of subscribers inside the group.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `422` — Unprocessable entity
- `default` — Unexpected error

## Changes

- **2021-11-27** `75b3657b756c` — 1 breaking, 1 info
  - removed the media type `application/x-www-form-urlencoded` from the request body
  - added the media type `application/json` to the request body
- **2021-06-20** `e9157e76a1b7` — 1 warning, 3 info
  - removed the optional property `allOf[subschema #2]/segments/items/allOf[subschema #2]/name` from the response with the `201` status
  - added the optional property `allOf[subschema #2]/segments/items/allOf[subschema #2]/subscribers_in_segment` to the response with the `201` status
  - added `#/components/schemas/BaseGroup` to the `allOf[subschema #2]/segments/items/` response property `allOf` list for the response status `201`
  - removed `#/components/schemas/BaseModel` from the `allOf[subschema #2]/segments/items/` response property `allOf` list for the response status `201`
- **2021-06-19** `bf7e392ed09b` — 5 warning, 3 info
  - removed the optional property `allOf[subschema #2]/active` from the response with the `201` status
  - removed the optional property `allOf[subschema #2]/blacklisted` from the response with the `201` status
  - removed the optional property `allOf[subschema #2]/email` from the response with the `201` status
  - removed the optional property `allOf[subschema #2]/metadata` from the response with the `201` status
  - …4 more
- **2021-06-19** `d928368b88a9` — 1 info
  - endpoint added
- **2021-05-18** `c686bd33a4a5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/mailbadger/apis/mailbadger-api/changes/subscribers/post.md)

---

[API](https://skmtc.dev/mailbadger/apis/mailbadger-api.md) · [All operations](https://skmtc.dev/mailbadger/apis/mailbadger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mailbadger/mailbadger-api/revisions/3a7ef49250a1/schema)
