Referência / Quadra Command API
Pix
22 operações em Quadra Command API 0.2.0.
/v1/pix/keysRegister a Pix key via the sponsor's DICT access
Register a Pix key (EMAIL/PHONE/CPF/CNPJ, or sponsor-minted EVP) for a CUSTOMER account. A sponsor rejection still returns 201 with the key row in REGISTRATION_FAILED — portability starts from that row.
Requires an Idempotency-Key header.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
PixKeyRegisterRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/{key_id}Exclude a Pix key from the DICT
Exclude an ACTIVE key (idempotent: re-DELETE of an EXCLUDED key returns 200). The ledger identity row is released — the same normalized key can be registered again on a fresh key row.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| key_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/{key_id}/portability/cancelCancel the key's active claim
Cancel the active claim on this key (either role).
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| key_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/{key_id}/portability/claimOpen a portability claim (we are the claimer)
Start portability for a key whose registration failed because the key is owned elsewhere (REGISTRATION_FAILED row). Requires Idempotency-Key.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| key_id | string | pathobrigatório |
| Idempotency-Key | string | headerobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/{key_id}/portability/confirmConfirm the key's active claim
Confirm the active claim on this key. Serves both roles — as DONOR it lets the claim proceed; the record's role field disambiguates.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| key_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/eventsDescontinuadoSponsor DICT key-event ingest (deprecated alias)
**Deprecated — use `POST /v1/pix/keys/events/{provider_id}`.**
Kept live through the LaaS-39 rollout; resolves the incumbent provider (`PIX_SPONSOR_ID`). Removed when LaaS-43 lands. Note that the *signature scheme* changed here even on this path. The old `X-Sim-Signature` header is no longer accepted; it carried no timestamp, so it bounded replay by nothing at all.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
/v1/pix/keys/events/{provider_id}Sponsor DICT key-event ingest
Ingest provider key events (KEY_* / CLAIM_*). Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret (LaaS-39 D4 — this route previously used a static body HMAC with no timestamp and therefore no replay bound at all). Redelivery-idempotent via a DEDUPE# row; out-of-order events no-op on the state guards (AC4).
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| provider_id | string | pathobrigatório |
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/keys/lookupPre-payment DICT lookup
Look up a Pix key in the DICT via the sponsor: recipient display name, masked tax id, participant, and fraud markers (D8). Persists nothing — no database dependency at all; sponsor unreachable or unset → 503 (a directory read has no meaningful stub).
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| key | string | queryobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/mandates/{mandate_id}/authorizeAuthorize a Pix Automático mandate (relayed to the sponsor)
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| mandate_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/mandates/{mandate_id}/charges/{charge_id}/cancelCancel a pending mandate charge pre-debit (relayed to the sponsor)
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| mandate_id | string | pathobrigatório |
| charge_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/mandates/{mandate_id}/rejectReject a pending Pix Automático mandate
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| mandate_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/mandates/{mandate_id}/revokeRevoke an ACTIVE mandate (releases holds, cancels pending charges)
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| mandate_id | string | pathobrigatório |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/mandates/eventsDescontinuadoSponsor Pix Automático event ingest (deprecated alias)
**Deprecated — use `POST /v1/pix/mandates/events/{provider_id}`.**
Kept live through the LaaS-39 rollout; resolves the incumbent provider (`PIX_SPONSOR_ID`). Removed when LaaS-43 lands. As with the key-event receiver, the *signature scheme* changed here too. The old `X-Sim-Signature` header is no longer accepted; it carried no timestamp and therefore no replay window.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
/v1/pix/mandates/events/{provider_id}Sponsor Pix Automático mandate/charge event ingest
Ingest provider mandate events (MANDATE_* / CHARGE_*). Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret (LaaS-39 D4 — this route previously used a static body HMAC with no timestamp and therefore no replay bound at all). Redelivery-idempotent via a DEDUPE# row; out-of-order events no-op on the state guards.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| provider_id | string | pathobrigatório |
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/med/casesFile a MED infraction with the sponsor
Open an OUTBOUND MED case for our customer's claim and file it with the sponsor synchronously (LaaS-16 D10). A sponsor timeout leaves the case FILING and returns 503 — the Idempotency-Key retry re-files the same case_id, which the sponsor dedupes.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
MedCaseCreateRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/med/cases/{case_id}/resolveResolve a MED case (RETURN or RELEASE)
RETURN executes the devolução: the block is captured to the clearing account and the capture obligation rides the deferred-dispatch lifecycle to the sponsor's return API (D8). RELEASE answers the sponsor and lifts the block. Single-shot per block — concurrent resolvers lose with 409.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| case_id | string | pathobrigatório |
Corpo da requisição
MedCaseResolveRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/med/eventsDescontinuadoSponsor MED case-event receiver (deprecated alias)
**Deprecated — use `POST /v1/pix/med/events/{provider_id}`.**
Kept live through the LaaS-39 rollout so a provider already posting here is not cut off mid-flight. It resolves the incumbent provider (`PIX_SPONSOR_ID`) and behaves identically in every other respect. Removed when LaaS-43 lands.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
/v1/pix/med/events/{provider_id}Sponsor MED case-event receiver (infractions)
Authenticated receiver for provider MED infraction/case notifications (LaaS-16 D2; per-provider since LaaS-39). Case events are NOT evidence — an infraction moves nothing at ingest — so they land here instead of the evidence pipe. Authenticated by the verification strategy the `{provider_id}` binding selects, against that provider's own secret; 2xx-on-applied.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| provider_id | string | pathobrigatório |
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/qr/{account_id}/dynamicCreate a dynamic Pix QR (sponsor-hosted single-use charge)
Create a single-use dynamic charge: Core mints the txid, the sponsor creates + hosts the JWS location document, Core persists the PIXQR# row and composes the EMV envelope locally (D3). Requires an ACTIVE Ticket-14 key owned by the account (defaulted when there is exactly one).
Requires an Idempotency-Key header.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| account_id | string | pathobrigatório |
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
PixQrDynamicCreateRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/qr/decodeDecode a scanned BR Code payload
Parse + validate any scanned BR Code locally (TLV + CRC); dynamic payloads are resolved through the sponsor — Core never fetches scanned URLs (D7). Persists nothing; malformed input -> 422 INVALID_BRCODE with a structured reason.
Corpo da requisição
PixQrDecodeRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/returnInitiate a devolução of a received Pix credit
Return (part of) a Pix credit this account received (LaaS-16 D4): a new counter-obligation on the deferred-dispatch lifecycle, referencing the original's E2EID. Partial and multiple returns are allowed, cumulatively capped at the original amount. Requires an Idempotency-Key header.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| Idempotency-Key | string | headerobrigatório |
Corpo da requisição
PixReturnRequest — obrigatório. Os campos estão listados em Esquemas, abaixo.
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 201 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
/v1/pix/webhooks/{provider_id}Sponsor Pix inbound webhook receiver
Authenticated receiver for provider Pix webhooks (LaaS-12; per-provider since LaaS-39).
Unauthenticated at the API Gateway (authorization_type=NONE — providers cannot do Cognito client-credentials); authenticated in-handler by the verification strategy the `{provider_id}` binding selects, against that provider's own secret. The default strategy is `timestamped_hmac_v1` — LaaS-12's D6 contract, unchanged — inside a ±300 s freshness window. Routes the raw provider payload through the same in-process pipeline as ``POST /v1/evidence`` and returns a minimal ack; obligation internals never leak to the provider, and a rejection never says which check failed.
Parâmetros
| Nome | Tipo | Detalhe |
|---|---|---|
| provider_id | string | pathobrigatório |
| X-Webhook-Timestamp | string | headerobrigatório Unix epoch seconds, integer string. Sent by providers bound to the `timestamped_hmac_v1` strategy (the default). |
| X-Webhook-Signature | string | headerobrigatório `v1=<hex(HMAC_SHA256(secret, timestamp + '.' + raw_body))>`, verified inside a freshness window. This is the `timestamped_hmac_v1` strategy; a provider bound to another strategy sends that strategy's headers instead, and the binding for `{provider_id}` decides which applies. |
| X-Webhook-Delivery-Id | string | header Provider delivery handle; becomes the derived idempotency key when present, else the key is derived from the body bytes. |
Respostas
| Status | Corpo | Detalhe |
|---|---|---|
| 200 | — | Resposta bem-sucedidaO contrato não declara um modelo para esta resposta, então a forma dela não está documentada aqui. Um roteiro de demonstração mostra a forma que ela realmente devolve. |
| 422 | HTTPValidationError | Erro de validação |
Esquemas
Os modelos que as operações acima aceitam e devolvem. Campos opcionais estão marcados como tal; um campo tipado como outro modelo está documentado sob o nome dele.
HTTPValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| detail | array de ValidationError |
MedAmountModel
| Campo | Tipo | Detalhe |
|---|---|---|
| currency | string | obrigatórioISO 4217 currency code (BRL only) |
| value | integer | obrigatórioAmount in centavos |
MedCaseCreateRequest
POST /v1/pix/med/cases — file an infraction with the sponsor for our customer's claim about a payment they SENT (direction=OUTBOUND).
| Campo | Tipo | Detalhe |
|---|---|---|
| actor | string | obrigatórioOperator identity |
| amount | MedAmountModel, opcional | Disputed amount (defaults to the original amount) |
| original_end_to_end_id | string, opcional | E2EID of the disputed outbound payment |
| original_obligation_id | string, opcional | Logical obligation id (obl_*) of the disputed outbound payment |
| reason_code | string, opcional | Infraction reason code |
MedCaseResolveRequest
POST /v1/pix/med/cases/{case_id}/resolve.
| Campo | Tipo | Detalhe |
|---|---|---|
| action | string | obrigatórioRETURN | RELEASE |
| actor | string | obrigatórioOperator identity |
| amount | MedAmountModel, opcional | RETURN only: partial capture amount (defaults to the full block) |
| reason | string, opcional | Free-text resolution reason |
PixKeyRegisterRequest
| Campo | Tipo | Detalhe |
|---|---|---|
| account_id | string | obrigatório |
| key_type | "EMAIL" | "PHONE" | "CPF" | "CNPJ" | "EVP" | obrigatório |
| key_value | string, opcional | Required for EMAIL/PHONE/CPF/CNPJ; must be absent for EVP — the sponsor mints the value |
PixQrDecodeRequest
| Campo | Tipo | Detalhe |
|---|---|---|
| brcode | string | obrigatórioScanned BR Code (EMV-MPM) payload |
PixQrDynamicCreateRequest
| Campo | Tipo | Detalhe |
|---|---|---|
| amount_cents | integer | obrigatórioCharge amount in centavos |
| description | string, opcional | |
| expires_in_seconds | integer | Charge validity window; expiry is enforced at payment time sponsor-side (D8) — stored here as data, never a timerPadrão 3600 |
| key_id | string, opcional | Receiving key (must be ACTIVE and owned by the account). Defaulted when the account has exactly one ACTIVE key; ambiguous -> 422 KEY_AMBIGUOUS |
| payer_request | string, opcional | Optional free-text prompt shown to the payer (rides the sponsor's JWS location document, not the EMV envelope) |
PixReturnAmount
| Campo | Tipo | Detalhe |
|---|---|---|
| currency | string | obrigatórioISO 4217 currency code (BRL only) |
| value | integer | obrigatórioAmount in centavos |
PixReturnRequest
POST /v1/pix/return body. One of original_obligation_id / original_end_to_end_id identifies the credit being returned.
| Campo | Tipo | Detalhe |
|---|---|---|
| account_id | string | obrigatórioThe account that received the original credit |
| amount | PixReturnAmount | obrigatório |
| original_end_to_end_id | string, opcional | E2EID of the original credit |
| original_obligation_id | string, opcional | Logical obligation id (obl_*) of the original credit |
| reason_code | string, opcional | Pix return reason code (e.g. MD06) |
ValidationError
| Campo | Tipo | Detalhe |
|---|---|---|
| ctx | object | |
| input | não declarado | |
| loc | array de string ou integer | obrigatório |
| msg | string | obrigatório |
| type | string | obrigatório |