Skip to main content
POST
Enable accounts in a batch

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Organization-Id
string

Midaz organization of the accounts the body names. Required: a request without it, or with a value that is not a canonical UUID, is refused with 400 PBP-0025.

Idempotency-Key
string
required

Client-supplied idempotency key, a UUID. Required: a request without it, with a value that is not a UUID, or with the nil UUID (00000000-0000-0000-0000-000000000000) is refused with 400 PBP-0012. The same key and body under another organization is another request. The batch keeps the key for as long as it is kept (until the technical purge, 90 days after it completes by default): past the 48 hours the answer is stored, the same key and body are still answered 202 with the batch they created, and another body is still refused with 422 PBP-0013.

Body

application/json
items
object[]
required

Accounts to enable, 1 to 5,000. A larger list is split into several batches.

Required array length: 1 - 5000 elements
reason
string
required

Reason for the enablement, recorded in the audit trail. Must not carry personal data.

Required string length: 10 - 500
Example:

"Enablement of the accounts of the new portfolio."

Response

Accepted. The batch is PROCESSING and every item is pending. Follow it with getEnablementBatch and listEnablementBatchItems.

adopted
integer<int64>
required

Items whose registration change was accepted and whose agreement became ACTIVE (BULK_ADOPTION; 0 in an enablement).

Required range: x >= 0
Example:

0

createdAt
string<date-time>
required

When the batch was accepted, RFC 3339 in UTC.

Example:

"2026-11-11T10:00:00Z"

enabled
integer<int64>
required

Items whose holder was accepted (ENABLEMENT; 0 in a bulk adoption).

Required range: x >= 0
Example:

4900

failed
integer<int64>
required

Items that ended with an error.

Required range: x >= 0
Example:

20

id
string<uuid>
required

Identifier of the batch.

Example:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a21"

kind
enum<string>
required

ENABLEMENT: an enablement of accounts (createEnablementBatch). BULK_ADOPTION: a bulk adoption of the MISSING_LOCALLY divergences of an inventory.

Available options:
ENABLEMENT,
BULK_ADOPTION
Example:

"ENABLEMENT"

pending
integer<int64>
required

Items still in progress, including those HELD_BY_ALERT and the adoptions waiting for the NΓΊclea to accept the registration change (DDA0502).

Required range: x >= 0
Example:

80

state
enum<string>
required

PROCESSING while an item is in progress; then COMPLETED when every item succeeded, or COMPLETED_WITH_ERRORS when some item failed.

Available options:
PROCESSING,
COMPLETED,
COMPLETED_WITH_ERRORS
Example:

"PROCESSING"

totalItems
integer<int64>
required

Items of the batch.

Required range: 1 <= x <= 5000
Example:

5000

completedAt
string<date-time> | null

When the last item ended, RFC 3339 in UTC; null while the batch is PROCESSING.

Example:

"2026-11-11T10:30:00Z"

inventoryRunId
string<uuid> | null

Inventory the bulk adoption adopts from; null for an enablement.

Example:

"0192a3b4-5c6d-7e8f-9a0b-1c2d3e4f5a31"

productTypeFilter
string | null

Product type the bulk adoption is limited to; null for every product type, and for an enablement.

Pattern: ^[0-9]{2}$
Example:

"01"