---
title: "Batch Customers"
method: POST
path: "/v2/tms-api/batch/customers"
tags: ["TMS API", "TMS API - Batch Operations"]
---

# Batch Customers

`POST /v2/tms-api/batch/customers`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v2/tms-api/batch/customers`
- Auth: none declared

Process batch customer operations (create, update, upsert, delete).

- For 'create' or 'upsert': 'name' is required
- For 'update': only fields to update need to be provided
- For 'delete': no data needed

## Headers

- `X-API-Key` string, nullable: API key for authentication

## Request body

- BatchCustomerRequest: Request schema for batch customer operations.
  - `items` BatchCustomerItem[], required: Batch items (max 100)
    - `operation` 'create' | 'update' | 'upsert' | 'delete', required: Batch operation types.
    - `external_reference_id` string, required: External reference ID of the customer
    - `customer` union: Customer data (CustomerCreate for create/upsert, CustomerUpdate for update)
      - CustomerCreate: Schema for creating a customer.
        - `external_reference_id` string, required: Unique identifier from your system
        - `name` string, required: Customer name
        - `reference_number` string, nullable: Additional reference number
        - `domain` string, nullable: Customer domain/website
        - `phone` string, nullable: Phone number
        - `is_active` boolean, nullable: Is the customer active
        - `customer_type` string, nullable: Customer type/category
      - CustomerUpdate: Schema for updating a customer. All fields are optional.
        - `name` string, nullable: Customer name
        - `reference_number` string, nullable: Additional reference number
        - `domain` string, nullable: Customer domain/website
        - `phone` string, nullable: Phone number
        - `is_active` boolean, nullable: Is the customer active
        - `customer_type` string, nullable: Customer type/category

## Response `200`

Successful Response

- BatchResponse: Response for batch operations.
  - `success_count` integer, required: Number of successful operations
  - `error_count` integer, required: Number of failed operations
  - `results` BatchResultItem[], required: Results for each item
    - `external_reference_id` string, required: External reference ID of the item
    - `operation` 'create' | 'update' | 'upsert' | 'delete', required: Batch operation types.
    - `success` boolean, required: Whether the operation succeeded
    - `id` string, nullable: ID of created/updated entity
    - `error` string, nullable: Error message if failed
    - `error_code` string, nullable: Error code (e.g., DUPLICATE, NOT_FOUND)

## Other responses

- `422`: Validation Error

---

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