---
title: "Create a contact"
method: POST
path: "/contacts"
tags: ["Contacts"]
---

# Create a contact

`POST /contacts`

## Request

- Base URL: `https://api.mepmail.dev`
- URL: `https://api.mepmail.dev/contacts`
- Auth: HTTP bearer

Creates a contact with its properties, topic subscriptions and segments.

## Request body

- CreateContactRequest
  - `email` string, email, required: Bare email address (no display name); unique per team
  - `first_name` string: First name
  - `last_name` string: Last name
  - `unsubscribed` boolean: Global opt-out from all marketing sends
  - `properties` object: Flat map of custom properties (string or number values)
  - `segments` object[]: Segments to add the contact to on creation
    - `id` string, uuid, required
  - `topics` object[]: Initial per-topic subscription choices
    - `id` string, uuid, required
    - `subscription` 'opt_in' | 'opt_out', required

## Response `200`

Contact created

- ContactIdResponse
  - `object` 'contact', required
  - `id` string, uuid, required

## Other responses

- `401`: Missing, malformed or invalid API key
- `403`: Plan limit reached
- `404`: Unknown segment or topic
- `409`: Contact already exists
- `422`: Validation error
- `429`: Rate limit exceeded: 600 requests per minute per API key and 3,000 per team; wait for Retry-After

---

[API](https://skmtc.dev/mepmail/apis/mepmail-api.md) · [All operations](https://skmtc.dev/mepmail/apis/mepmail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mepmail/apis/mepmail-api/revisions/262a89f73730?raw)
