---
search:
  tags:
    - customers
    - POST
seo:
  description: >-
    Create customer approve batch. Reference for the POST
    /workspaces/{organizationId}/customers/approve-batch endpoint in the Pile
    API.
sidebar:
  label: Create customer approve batch
  badge: POST
title: Create customer approve batch
type: openapi-operation
---
`POST /workspaces/{organizationId}/customers/approve-batch`

**Request body** (`application/json`)

- `customerIds` (string[])
- `channel` (string)
- `limit` (integer)
- `mailboxId` (string)
- `dailyCap` (integer)
- `domainHealth` (object)
- `unsubscribeBaseUrl` (string)
- `physicalAddress` (string)

Request body example:

```json
{
  "customerIds": [
    "string"
  ],
  "channel": "email",
  "limit": 25,
  "mailboxId": "string",
  "dailyCap": 1,
  "domainHealth": {
    "domain": "string",
    "spfOk": true,
    "dkimOk": true,
    "dmarcOk": true,
    "mxOk": true,
    "checkedAt": "string"
  },
  "unsubscribeBaseUrl": "string",
  "physicalAddress": "string"
}
```

**Responses**

- `200` — Evaluated Send Gate across the batch using Effect.partition and separated approved vs blocked leads

Response example, 200:

```json
{
  "approvedCount": 0,
  "blockedCount": 0,
  "approved": [
    {
      "customerId": "string",
      "name": "string",
      "channel": "string",
      "recipient": "string",
      "optOutFooter": "string",
      "enrollmentStatus": "string",
      "mailboxSentToday": 0
    }
  ],
  "blocked": [
    {
      "customerId": "string",
      "name": "string",
      "reasons": [
        "string"
      ]
    }
  ]
}
```
