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

# Register a MED fraud marker

> Opens a fraud marker as the creator PSP (JDPI marcacao-fraude/incluir, contract 2.15). The creator ISPB is derived from configuration. tpFraude is validated against the create domain {0..3} before any JDPI call.



## OpenAPI

````yaml /en/openapi/v3-current/pix.yaml post /v1/med/fraud-markers
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/med/fraud-markers:
    post:
      tags:
        - MED Fraud Markers
      summary: Register a MED fraud marker
      description: >-
        Opens a fraud marker as the creator PSP (JDPI marcacao-fraude/incluir,
        contract 2.15). The creator ISPB is derived from configuration. tpFraude
        is validated against the create domain {0..3} before any JDPI call.
      operationId: registerMedFraudMarker
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterFraudMarkerRequestBody'
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FraudMarkerView'
          description: Accepted
        '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:
    RegisterFraudMarkerRequestBody:
      additionalProperties: false
      properties:
        chave:
          description: The flagged Pix key, if known.
          examples:
            - user@example.com
          type: string
        cpfCnpj:
          description: The flagged document.
          examples:
            - '12345678901'
          type: string
        idempotencyKey:
          description: >-
            Client-supplied idempotency key: any stable business string. The
            plugin projects it deterministically into the GUID form JDPI
            requires (contract 6), so the same value always dedups against the
            same JDPI request and the raw value is never sent verbatim.
          examples:
            - med-fraud-2024-0001
          type: string
        tpFraude:
          description: >-
            Fraud-type code on create (0=Falsidade ideologica, 1=Conta laranja,
            2=Conta do fraudador, 3=Outra; 4 Desconhecida is read-only).
          examples:
            - 1
          format: int64
          type: integer
        tpPessoa:
          description: Person-type code (0=Pessoa Fisica, 1=Pessoa Juridica).
          examples:
            - 0
          format: int64
          type: integer
      required:
        - tpPessoa
        - cpfCnpj
        - tpFraude
        - idempotencyKey
      type: object
    FraudMarkerView:
      additionalProperties: false
      properties:
        chave:
          description: The flagged Pix key, when known.
          examples:
            - user@example.com
          type: string
        cpfCnpj:
          description: The flagged document.
          examples:
            - '12345678901'
          type: string
        dictCorrelationId:
          description: >-
            idCorrelacao — the DICT support identifier for this consultar call;
            quote it to JD when disputing whether the read happened.
          examples:
            - a7f12465e19f5ca51329479a5bae60c2
          type: string
        dictReturnedAt:
          description: dtHrRetornoDict — when DICT answered this consultar (contract 2.16).
          examples:
            - '2023-08-16T10:30:05.025Z'
          type: string
        dtHrCriacao:
          description: JDPI creation timestamp (RFC 3339 UTC).
          examples:
            - '2024-01-01T12:00:00.000Z'
          type: string
        dtHrUltModificacao:
          description: JDPI last-modification timestamp (RFC 3339 UTC) — the watermark.
          examples:
            - '2024-01-01T12:05:00.000Z'
          type: string
        idMarcacaoFraude:
          description: Fraud-marker GUID (the natural key).
          examples:
            - c3d4e5f6-a7b8-9012-cdef-345678901234
          type: string
        idRelatoInfracao:
          description: >-
            Linked infraction GUID, when the marker was auto-created from a
            closed infraction.
          examples:
            - a1b2c3d4-e5f6-7890-abcd-ef1234567890
          type: string
        ispb:
          description: ISPB of the creator PSP.
          examples:
            - '12345678'
          type: string
        ispbRelatoInfracao:
          description: Linked infraction's PSP ISPB, when infraction-originated.
          examples:
            - '87654321'
          type: string
        status:
          description: stMarcacaoFraude lifecycle code (0=Registrada, 1=Cancelada).
          examples:
            - 0
          format: int64
          type: integer
        statusDescription:
          description: Human-readable stMarcacaoFraude label.
          examples:
            - Registrada
          type: string
        tpFraude:
          description: Fraud-type code (0..4; 4=Desconhecida is read-only).
          examples:
            - 1
          format: int64
          type: integer
        tpFraudeDescription:
          description: Human-readable tpFraude label.
          examples:
            - Conta laranja
          type: string
        tpPessoa:
          description: Person-type code (0=Pessoa Fisica, 1=Pessoa Juridica).
          examples:
            - 0
          format: int64
          type: integer
        tpPessoaDescription:
          description: Human-readable tpPessoa label.
          examples:
            - Pessoa Fisica
          type: string
      required:
        - idMarcacaoFraude
        - ispb
        - tpPessoa
        - tpPessoaDescription
        - cpfCnpj
        - tpFraude
        - tpFraudeDescription
        - status
        - statusDescription
        - dtHrCriacao
        - dtHrUltModificacao
      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

````