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

# Cancel a PIX key claim

> Abandons a claim. Either side may call it - the claimer giving up, or the holder refusing to hand the key over (§8.2.11). claimId is in the path; the body carries key and accountId. The claim must resolve to a local row for the pair (claimId, your account), else 404 PIX-0020.

What reaches DICT depends on how far the claim got, and the counterparty can tell the difference. A row at status 5, 6 or 7 is live at DICT and is cancelled there. Anything else - notably status 4, recognised as claimable but never opened at DICT - is cancelled locally with NO DICT call, which is the fail-closed direction, because a spurious DICT cancel is the step that has no undo. The motivo follows the §8.2.11 matrix for the side and the claim type: a claimer (status 5 or 7) sends 0 = Solicitação do Usuário; a DONOR (status 6) sends 0 for a portability claim but 4 = Fraude for a possession claim, because 4 is the only value the Posse-Doador column accepts - so a possession refusal is recorded at Bacen as fraud rather than as a preference.

Either way the key row ends CANCELLED (-1) and soft-deleted. CANCELLED is terminal - the state machine has no edge out of it - so the claim cannot be revived; start over with POST /v1/entries followed by POST /v1/claims.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml delete /v1/claims/{claimId}
openapi: 3.1.0
info:
  description: Brazilian PIX Direct (DICT + SPI) plugin API.
  title: plugin-br-pix-jd
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
paths:
  /v1/claims/{claimId}:
    delete:
      tags:
        - Claims
      summary: Cancel a PIX key claim
      description: >-
        Abandons a claim. Either side may call it - the claimer giving up, or
        the holder refusing to hand the key over (§8.2.11). claimId is in the
        path; the body carries key and accountId. The claim must resolve to a
        local row for the pair (claimId, your account), else 404 PIX-0020.


        What reaches DICT depends on how far the claim got, and the counterparty
        can tell the difference. A row at status 5, 6 or 7 is live at DICT and
        is cancelled there. Anything else - notably status 4, recognised as
        claimable but never opened at DICT - is cancelled locally with NO DICT
        call, which is the fail-closed direction, because a spurious DICT cancel
        is the step that has no undo. The motivo follows the §8.2.11 matrix for
        the side and the claim type: a claimer (status 5 or 7) sends 0 =
        Solicitação do Usuário; a DONOR (status 6) sends 0 for a portability
        claim but 4 = Fraude for a possession claim, because 4 is the only value
        the Posse-Doador column accepts - so a possession refusal is recorded at
        Bacen as fraud rather than as a preference.


        Either way the key row ends CANCELLED (-1) and soft-deleted. CANCELLED
        is terminal - the state machine has no edge out of it - so the claim
        cannot be revived; start over with POST /v1/entries followed by POST
        /v1/claims.
      operationId: cancelClaim
      parameters:
        - description: The claim id.
          in: path
          name: claimId
          required: true
          schema:
            description: The claim id.
            examples:
              - claim-123
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClaimActionBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClaimStatusResponse'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
components:
  schemas:
    ClaimActionBody:
      additionalProperties: false
      properties:
        accountId:
          description: The CRM account id of the caller.
          examples:
            - acc-123
          type: string
        key:
          description: The PIX key the claim targets.
          examples:
            - '11122233300'
          type: string
      required:
        - key
        - accountId
      type: object
    ClaimStatusResponse:
      additionalProperties: false
      properties:
        claimId:
          description: The claim id.
          examples:
            - claim-123
          type: string
        status:
          description: Human-readable eKeyStatus label.
          examples:
            - DONATED
          type: string
      required:
        - claimId
        - status
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          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.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      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
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````