---
title: "Create or update contacts in bulk"
method: POST
path: "/contacts/batch"
tags: ["contacts"]
---

# Create or update contacts in bulk

`POST /contacts/batch`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/contacts/batch`
- Auth: HTTP bearer

body is an array of contacts or {contacts: [...]}, 1-1000 items; returns a result per item, and 207 overall if any fail.

## Request body

- object
  - `contacts` object[]
    - `email` string
    - `externalId` string
    - `name` string
    - `attributes` object
    - `tags` string[]

## Response `200`

All succeeded

- object
  - `success` boolean, required
  - `received` number, required
  - `succeeded` number, required
  - `failed` number, required
  - `results` object[], required

## Other responses

- `207`: Partially failed
- `400`: Invalid parameters
- `401`: Missing or invalid API key

---

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