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

# Create or update contacts

`POST /contacts/`

## Request

- Base URL: `https://api.hive.co/v2`
- URL: `https://api.hive.co/v2/contacts/`
- Auth: HTTP bearer

Push contact data to Hive. Contacts are matched by `email` or `phone_number`; re-sending the same identifier updates the existing contact rather than duplicating it.

## Headers

- `X-Partner-Id` string, required

## Request body

- SaveContactsRequest
  - `contacts` ContactToSaveRequest[], required
    - `email` string, email
    - `phone_number` string
    - `first_name` string
    - `last_name` string
    - `gender` 'male' | 'female' | 'non_binary' | 'unknown'
    - `birthday` string, date-time
    - `address` AddressRequest
      - `address` string
      - `city` string
      - `state` string
      - `country` string
      - `zip` string
    - `is_email_opt_in` boolean
    - `is_sms_opt_in` boolean
    - `custom_properties` object
    - `updated_at` string, date-time, required

## Response `202`

Received and queued for background processing. Not yet applied.

- ContactsCreateResponse202: Empty response body

## Other responses

- `422`: Validation failed. For a batch write this is all-or-nothing. Field errors are keyed by resource name, then item index, then field path, query-parameter errors are keyed by parameter name, service-level rejections use a flat `errors` list.

---

[API](https://skmtc.dev/hive-co/apis/hive-api.md) - [All operations](https://skmtc.dev/hive-co/apis/hive-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hive-co/apis/hive-api/revisions/aa145f089347?raw)
