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

> Registers a new direct or indirect participant.



## OpenAPI

````yaml en/openapi/v3-current/spi-core.yaml post /api/v1/core/participants/
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian Studio
    url: https://lerian.studio
  description: >-
    Core service of Lerian SPI: MED (Mecanismo Especial de Devolução) dispute
    cases, PIX participant lifecycle by ISPB, payment routing resolution, and
    cross-context Core operation orchestration over the Brazilian Instant
    Payment System (SPI/Pix).
  license:
    name: Lerian Studio General License
  title: Lerian SPI — Core API
  version: 1.0.0
servers:
  - url: https://spi.sandbox.lerian.net
security: []
tags:
  - description: >-
      MED (Mecanismo Especial de Devolução) dispute cases: open, list, retrieve,
      analyze, resolve, close, cancel, and attach evidence.
    name: MED
  - description: >-
      PIX participant lifecycle: register, list, retrieve, suspend, activate,
      and offboard by ISPB.
    name: Participants
  - description: Payment routing resolution across participants.
    name: Routing
  - description: Core operation orchestration across the rail's bounded contexts.
    name: Operations
paths:
  /api/v1/core/participants/:
    post:
      tags:
        - Participants
      summary: Register participant
      description: Registers a new direct or indirect participant.
      operationId: registerParticipant
      parameters:
        - description: Idempotency key, max 255 characters
          in: header
          name: Idempotency-Key
          schema:
            description: Idempotency key, max 255 characters
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterParticipantRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ParticipantResponse'
          description: Created
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    RegisterParticipantRequest:
      additionalProperties: false
      properties:
        cnpj:
          description: >-
            14-char CNPJ (alphanumeric per PICnpj [0-9A-Z]{12}[0-9]{2}) of the
            indirect participant; required for INDIRECT registration (rides the
            reda.014 MktSpcfcAttr CNPJIDRT). Ignored for DIRECT.
          examples:
            - '12345678000199'
          maxLength: 14
          minLength: 14
          pattern: ^[0-9A-Z]{12}[0-9]{2}$
          type: string
        config:
          $ref: '#/components/schemas/ParticipantConfigDTO'
          description: >-
            Quota and routing configuration; supplied only for indirect
            participants.
        ispb:
          description: ISPB of the participant, exactly 8 numeric digits.
          examples:
            - '12345678'
          type: string
        name:
          description: Legal name of the participant institution.
          examples:
            - Banco Exemplo S.A.
          type: string
        sponsorISPB:
          description: >-
            ISPB of the sponsoring participant (8 numeric digits); required for
            INDIRECT, must be empty for DIRECT.
          examples:
            - ''
          type: string
        type:
          description: >-
            Connection type: DIRECT (connects directly to BACEN) or INDIRECT
            (routes through a sponsor).
          examples:
            - DIRECT
          type: string
      required:
        - ispb
        - name
        - type
      type: object
    ParticipantResponse:
      additionalProperties: false
      properties:
        config:
          $ref: '#/components/schemas/ParticipantConfigDTO'
          description: >-
            Quota and routing configuration; present only for indirect
            participants.
        createdAt:
          description: UTC timestamp when the participant was created, RFC 3339 format.
          examples:
            - '2025-03-07T14:30:00Z'
          type: string
        id:
          description: Server-assigned UUID of the participant.
          examples:
            - 550e8400-e29b-41d4-a716-446655440000
          type: string
        ispb:
          description: ISPB of the participant, exactly 8 numeric digits.
          examples:
            - '12345678'
          type: string
        name:
          description: Legal name of the participant institution.
          examples:
            - Banco Exemplo S.A.
          type: string
        sponsorISPB:
          description: >-
            ISPB of the sponsoring participant (8 numeric digits); present only
            for INDIRECT participants.
          examples:
            - ''
          type: string
        status:
          description: >-
            Lifecycle state of the participant: ACTIVE, SUSPENDED, OFFBOARDED,
            PENDING (indirect reda.014 in flight), REGISTRATION_REJECTED
            (reda.016 REJT), or OFFBOARD_PENDING (reda.031 in flight).
          examples:
            - ACTIVE
          type: string
        type:
          description: >-
            Connection type: DIRECT (connects directly to BACEN) or INDIRECT
            (routes through a sponsor).
          examples:
            - DIRECT
          type: string
        updatedAt:
          description: >-
            UTC timestamp of the last update to the participant, RFC 3339
            format.
          examples:
            - '2025-03-07T14:30:00Z'
          type: string
      required:
        - id
        - ispb
        - name
        - type
        - status
        - createdAt
        - updatedAt
      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
      type: object
    ParticipantConfigDTO:
      additionalProperties: false
      properties:
        quotaDailyLimit:
          description: Maximum total routed amount per day in centavos (BRL minor units).
          examples:
            - 1000000
          format: int64
          type: integer
        quotaTransactionLimit:
          description: Maximum amount per single transaction in centavos (BRL minor units).
          examples:
            - 50000
          format: int64
          type: integer
        routingPolicy:
          description: >-
            Payment routing policy for the indirect participant; currently only
            DEFAULT (route through sponsor with quota enforcement) is accepted.
          examples:
            - DEFAULT
          type: string
      required:
        - quotaDailyLimit
        - quotaTransactionLimit
        - routingPolicy
      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:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````