Saltar al contenido principal
POST
Link an account to a pooled account

Autorizaciones

Authorization
string
header
requerido

JWT bearer token issued by the identity provider.

Encabezados

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
requerido

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.

Cuerpo

application/json
accountId
string<uuid>
requerido

Midaz account of the final customer.

Ejemplo:

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

agreementId
string<uuid>
requerido

ACTIVE agreement of the pooled account.

Ejemplo:

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

reason
string
requerido

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

Required string length: 10 - 500
Ejemplo:

"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.

Ejemplo:

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

Respuesta

Created. The account is linked to the pooled account.

accountId
string<uuid>
requerido

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

Ejemplo:

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

agreementId
string<uuid>
requerido

Agreement of the pooled account the account issues under.

Ejemplo:

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

enabledAt
string<date-time>
requerido

When the account was linked, RFC 3339 in UTC.

Ejemplo:

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

enabledBy
object
requerido

Who linked the account.

id
string<uuid>
requerido

Identifier of the link.

Ejemplo:

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

organizationId
string<uuid>
requerido
read-only

Midaz organization of the linked account.

Ejemplo:

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

pooledAccountId
string<uuid>
requerido

Pooled account that owns the agreement.

Ejemplo:

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

state
enum<string>
requerido

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

Opciones disponibles:
ACTIVE,
REMOVED
Ejemplo:

"ACTIVE"

removedAt
string<date-time> | null

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

Ejemplo:

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