Replace ISPB → organization bindings (editor; audited)
Replaces all ISPB → organization/ledger bindings of the institution. Each binding points an ISPB to the organization and the ledger (Midaz) where the TEDs received through it are credited. Among bindings of the same ISPB, the lowest priority wins, and a priority cannot repeat. Invalid bindings or a duplicate priority respond 422 TED-0002. A binding to an organization or ledger other than the ones where this installation credits incoming TEDs also responds 422 TED-0002.
Configure them before you receive the first TED. With the ledger and the CRM integrations on, TED Lerian refuses a binding with 422 TED-0002 when something a TED needs is missing, and the message names each item: the organization in Midaz, the BRL asset on the ledger (account @external/BRL), and the institution’s holder, found by the organization’s CNPJ, with an account in the CRM. If Midaz or the CRM does not answer, the response is 503 (TED-1000 or TED-1020) and nothing is written.
The change is audited. Editor operation. Requires X-Idempotency.
If the audit trail cannot record the change, TED Lerian refuses it with 503 TED-9002 and changes nothing: only the audit trail keeps the previous value. Reads stay available.
Authorizations
JWT token that the Lerian Access Manager issues for your institution. Send it in Authorization: Bearer <token> on every call (except the public health probes). The tenant never comes from the body, the query, or the path. Each operation requires a role with the matching permission (see the API overview). Without it, 403 TED-0071. Missing, invalid, or expired token: 401 TED-0070.
Headers
Replay window of the idempotency key, in seconds. Default 300 (5 minutes) when missing or invalid. Values outside 30 s to 7 days are adjusted to these limits. Only the value of the FIRST request for a key counts. A change to X-TTL on retries has no effect. Within the window, the original response is replayed byte for byte.
x >= 1Idempotency key of the change. Required: a request without it is refused with 400 TED-0011.
Correlation identifier of this request (UUID). Optional: when you omit it, or when the value is not a well-formed UUID, the platform creates a UUID and returns it in the X-Request-Id header of the response. The resolved identifier goes to the logs, spans, and audit events of this request. Keep it to open a support ticket.
Body
Bindings between the ISPBs the institution operates through and the organizations/ledgers that receive the TEDs addressed to each one.
Response
Configuration saved and audited; the body returns the current configuration.
Bindings between the ISPBs the institution operates through and the organizations/ledgers that receive the TEDs addressed to each one.

