> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a MED value recovery

> Opens a value recovery as the creator PSP. The creator ISPB is derived from configuration. grafoRastreamento.vlrMinTransacaoCents is a graph-traversal FILTER threshold, never a posting amount.



## OpenAPI

````yaml en/openapi/v3-current/pix.yaml POST /v1/med/recoveries
openapi: 3.0.3
info:
  title: Plugin BR Pix Direct - Complete API
  description: |
    Complete API for Brazilian Pix instant payment system including
    Pix key dictionary operations, QR code generation/decoding, transactions and
    transaction limits.
  version: 1.0.0
servers:
  - url: https://plugin-pix-direct.api.lerian.net
  - url: https://plugin-pix-direct-qrcode.api.lerian.net
security:
  - bearerAuth: []
paths:
  /v1/med/recoveries:
    post:
      tags:
        - MED API
      summary: Create a MED value recovery
      description: >-
        Opens a value recovery as the creator PSP. The creator ISPB is derived
        from configuration. grafoRastreamento.vlrMinTransacaoCents is a
        graph-traversal FILTER threshold, never a posting amount.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRecoveryRequestBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RecoveryView'
          description: Accepted
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    CreateRecoveryRequestBody:
      additionalProperties: false
      properties:
        contatoEmail:
          description: Creator-contact email (required).
          type: string
        contatoTelefone:
          description: Creator-contact phone (required).
          type: string
        detalhes:
          description: Free-text detail; required when tpSituacao=4 (Outros).
          type: string
        grafoRastreamento:
          $ref: '#/components/schemas/GrafoRastreamentoBody'
        idTransacaoRaiz:
          description: EndToEndId of the root transaction being recovered.
          type: string
        idempotencyKey:
          description: Business-derived idempotency key (Chave-Idempotencia).
          type: string
        tpSituacao:
          description: >-
            Situation code (0=Golpe, 1=Nao autorizada, 2=Coercao, 3=Acesso
            fraudulento, 4=Outros, 5=Desconhecida).
          format: int64
          type: integer
      required:
        - idTransacaoRaiz
        - tpSituacao
        - contatoEmail
        - contatoTelefone
        - idempotencyKey
      type: object
    RecoveryView:
      additionalProperties: false
      properties:
        breached:
          description: >-
            True when the devolver deadline has been reached or passed (computed
            at read time); false when no deadline is set.
          type: boolean
        contatoEmail:
          description: Creator-contact email.
          type: string
        contatoTelefone:
          description: Creator-contact phone.
          type: string
        detalhes:
          description: Free-text detail (required when tpSituacao=4 Outros).
          type: string
        devolverDeadline:
          description: >-
            Creator-side 72h devolver deadline, from the Analise stage close;
            null unless this institution is the pspCriador on an Analisada
            recovery.
          type: string
        dtHrCriacao:
          description: Upstream creation timestamp (RFC 3339 UTC).
          type: string
        dtHrUltModificacao:
          description: Upstream last-modification timestamp (RFC 3339 UTC) — the watermark.
          type: string
        idRecValores:
          description: Value-recovery GUID (the natural key).
          type: string
        idTransacaoRaiz:
          description: EndToEndId of the root transaction being recovered.
          type: string
        pspCriador:
          description: ISPB of the recovery creator.
          type: string
        status:
          description: stRecValores lifecycle code (0=Criada.. 6=Cancelada).
          format: int64
          type: integer
        statusDescription:
          description: Human-readable stRecValores label.
          type: string
        tpSituacao:
          description: Situation code (0..5).
          format: int64
          type: integer
        tpSituacaoDescription:
          description: Human-readable tpSituacao label.
          type: string
      required:
        - idRecValores
        - idTransacaoRaiz
        - tpSituacao
        - tpSituacaoDescription
        - contatoEmail
        - contatoTelefone
        - pspCriador
        - status
        - statusDescription
        - dtHrCriacao
        - dtHrUltModificacao
        - breached
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
          nullable: true
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          format: uri
          type: string
        status:
          description: HTTP status code
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          format: uri
          type: string
      type: object
    GrafoRastreamentoBody:
      additionalProperties: false
      properties:
        janelaTempo:
          description: Traversal time-window (ISO-8601 duration, max PT2H).
          type: string
        maxProfundidade:
          description: Traversal max depth (max 10).
          format: int64
          type: integer
        maxTransacoes:
          description: Max transactions to trace (max 5).
          format: int64
          type: integer
        vlrMinTransacaoCents:
          description: >-
            Traversal floor (trace only downstream txns >= this), in centavos. A
            FILTER threshold, never a posting amount.
          format: int64
          type: integer
      required:
        - vlrMinTransacaoCents
        - maxTransacoes
        - janelaTempo
        - maxProfundidade
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        JWT Bearer token authentication. Obtain token from
        `/v1/login/oauth/access_token` endpoint

        using client credentials (clientId and clientSecret).


        Include token in Authorization header:

        `Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...`


        Token expires after 3600 seconds (1 hour).

````