Skip to main content
POST
Link an account to a pooled account

Authorizations

Authorization
string
header
required

JWT bearer token issued by the identity provider.

Headers

X-Organization-Id
string

Midaz organization of the account named in the body. 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.

Body

application/json
accountId
string<uuid>
required

Midaz account of the final customer.

Example:

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

agreementId
string<uuid>
required

ACTIVE agreement of the pooled account.

Example:

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

reason
string
required

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

Required string length: 10 - 500
Example:

"Merchant account issues under the marketplace's pooled account."

ledgerId
string

Midaz ledger of the account. Required: absent, blank or not a canonical UUID is refused with 400 PBP-0026.

Example:

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

Response

Created. The account is linked to the pooled account.

accountId
string<uuid>
required

Midaz account of the final customer, which issues under the pooled account's agreement.

Example:

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

agreementId
string<uuid>
required

Agreement of the pooled account the account issues under.

Example:

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

enabledAt
string<date-time>
required

When the account was linked, RFC 3339 in UTC.

Example:

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

enabledBy
object
required

Who linked the account.

id
string<uuid>
required

Identifier of the link.

Example:

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

organizationId
string<uuid>
required
read-only

Midaz organization of the linked account.

Example:

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

pooledAccountId
string<uuid>
required

Pooled account that owns the agreement.

Example:

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

state
enum<string>
required

ACTIVE: the account issues under the agreement. REMOVED: the link was undone; it does not come back.

Available options:
ACTIVE,
REMOVED
Example:

"ACTIVE"

removedAt
string<date-time> | null

When the link was undone, RFC 3339 in UTC; null while it is ACTIVE.

Example:

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