Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create customer approve batch

POST/workspaces/{organizationId}/customers/approve-batch
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
customerIdsstring[]
channelstring
default: "call"
Allowed:emailcallvisitsms
limitinteger
min 1 · max 100 · default: 25
mailboxIdstring
dailyCapinteger
min 1 · max 500
domainHealthobject
Show properties
domainstringrequired
spfOkbooleanrequired
dkimOkbooleanrequired
dmarcOkbooleanrequired
mxOkbooleanrequired
checkedAtstring
unsubscribeBaseUrlstring
physicalAddressstring
Responses
200

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

approvedCountnumberrequired
blockedCountnumberrequired
approvedobject[]required
Show properties
Array of object
customerIdstringrequired
namestringrequired
channelstringrequired
recipientstring | nullrequired
optOutFooterstring | null
enrollmentStatusstring
mailboxSentTodaynumber
blockedobject[]required
Show properties
Array of object
customerIdstringrequired
namestringrequired
reasonsstring[]required
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/customers/approve-batch' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "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"
}'
Response
{
  "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"
      ]
    }
  ]
}

Was this page helpful?