← Back to schema index

CreateBeneficiaryRequest

Body for `POST /v1/beneficiaries`. Accepts two shapes: a flat object with attributes at the root, or the JSON:API envelope `{ data: { attributes: {...} } }`. The server tries `data.attributes` first and falls back to the root object. The account type (`clabe`, `card`, `phone`) is auto-detected by digit length: 18 = CLABE, 13–19 (≠18) = card, 10 = phone (DiMo). When the detected type is `phone`, `bank_code` is **mandatory**; for CLABE and card the caller-supplied `bank_code` is ignored and derived from the CLABE prefix or BIN.

Properties

Field Type Description
account_number * string Account number. Accepted: 18-digit CLABE, 13–19 digit card (except 18, reserved for CLABE) or 10-digit DiMo phone. Separators (spaces, hyphens) are stripped before validation.
bank_code string 5-digit Banxico SPEI code. **Required when the detected type is `phone`**; ignored for CLABE and card (derived from prefix or BIN). When applicable the code is validated against the current SPEI participant catalog.
label string Optional free-form label. Sanitized with `strip_tags` + `trim` before persistence.

Used in operations

  • POST /v1/beneficiaries