---
title: "Batch create program members"
method: POST
path: "/v2/loyalties/programs/{programId}/members/batch"
tags: ["Programs"]
---

# Batch create program members

`POST /v2/loyalties/programs/{programId}/members/batch`

Schedules asynchronous batch creation of program members. The request body is a JSON array of member entries (maximum body size is 10 MB). The request is processed asynchronously in batches of 100 entries.

The program must exist (otherwise, it returns a `404` error) and be in `ACTIVE` status (otherwise, it returns a `423` error). Supported member fields are validated during background processing using the same domain validation rules as single member creation. Entries that fail validation (missing/invalid `customer_id`, unknown customer, invalid `status`, duplicate `customer_id` within the same batch, member already exists) are reported per-entry  individually in the report linked from the async action result. The failed entries do not fail the whole batch (conflicting members are skipped).

Returns `202` status with the identifier of the scheduled async action. Use the [GET Async Action](/api-reference/async-actions/get-async-action) endpoint to check the status of the batch creation. You can also check the processing status and the result in the Audit log – [Background tasks](/analyze/audit-logs#background-tasks) in the Voucherify dashboard.

## Path parameters

- `programId` string, required

## Request body

- MemberCreate[] — Request body for batch member creation - a JSON array of member entries. The raw body is limited to 10485760 bytes (10 MB) and is processed asynchronously in batches of 100 entries. Each entry is validated like a single member creation request during background processing; per-entry failures (invalid customer_id format, unknown customer, invalid status, member already exists) are reported in the async action result.
  - `customer_identification` object
    - `type` 'customer_id' | 'customer_source_id', required — Defines how the customer is identified for the member creation. If `customer_id` is provided, the customer is identified by their unique Voucherify customer ID. Then, pass the required `customer_id` string. If `customer_source_id` is provided, the customer is identified by their source ID (e.g. from an external system). Then, pass the required `customer_source_id` string.
    - `customer_id` string — Unique Voucherify customer ID of an existing customer to enroll as a member. Required when `type` is `customer_id`.
    - `customer_source_id` string — Source ID from an external system of an existing customer to enroll as a member. Required when `type` is `customer_source_id`.
  - `status` 'ACTIVE' | 'INACTIVE', nullable — Initial member status. Defaults to `ACTIVE` when omitted or `null`.
  - `metadata` object, nullable — Free-form metadata attached to the member. Validated against the metadata schema defined for the `vl_member` related object (when one is configured). Defaults to an empty object.

## Response `202`

Batch creation has been scheduled.

- MemberBatchCreateResponse — Result of scheduling the members batch creation.
  - `async_action_id` string, required — ID of the scheduled async action processing the batch.

## Other responses

- `404` — Resource not found - the program ID could not be found.
- `413` — Payload too large - the request body exceeds the 10 MB limit.
- `423` — Resource locked - a related resource is in a state that prevents this operation.
- `500` — Internal server error.

---

[API](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api.md) · [All operations](https://skmtc.net/voucherifyio/apis/voucherify-loyalty-v2-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voucherifyio/voucherify-loyalty-v2-api/revisions/69be73b5cff0/schema)
