> ## 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 Pix Schedule

> Create a single-shot scheduled Pix instruction. The schedule is persisted with status SCHEDULED; the schedule worker dispatches the cashout at the scheduled fire time. The destination snapshot comes from the payment initiation that initiationId references.



## OpenAPI

````yaml /pt/openapi/v3-current/indirect-pix.yaml post /v1/schedules
openapi: 3.1.0
info:
  description: >-
    API for Pix Indirect via BTG. It covers DICT keys and claims; MED infraction
    reports, fraud markers, refund requests, and funds recoveries; DICT
    statistics and reconciliation; Pix transfers, refunds, and schedules; static
    QR codes and QR code decoding; immediate and due-date collections; Pix
    Automático for the payer; transaction reports and TemposTransacoes
    statistics; and inbound and outbound webhook records.
  title: Pix BTG API
  version: 1.12.0
servers:
  - url: https://api.example.com
    description: >-
      Replace the example host with the URL provided during environment
      onboarding.
security:
  - BearerAuth: []
paths:
  /v1/schedules:
    post:
      tags:
        - Schedules
      summary: Create a Pix Schedule
      description: >-
        Create a single-shot scheduled Pix instruction. The schedule is
        persisted with status SCHEDULED; the schedule worker dispatches the
        cashout at the scheduled fire time. The destination snapshot comes from
        the payment initiation that initiationId references.
      operationId: payment-create-schedule
      parameters:
        - description: Account ID owning the schedule (UUID format)
          in: header
          name: X-Account-Id
          required: true
          schema:
            description: Account ID owning the schedule (UUID format)
            format: uuid
            type: string
        - description: >-
            Idempotency anchor (UUID v4 recommended); replays return the cached
            201.
          in: header
          name: X-Idempotency
          schema:
            description: >-
              Idempotency anchor (UUID v4 recommended); replays return the
              cached 201.
            maxLength: 255
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduleInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleOutput'
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Internal Server Error
        default:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyErrorBody'
          description: Error
components:
  schemas:
    CreateScheduleInput:
      additionalProperties: false
      properties:
        amount:
          examples:
            - '100.50'
          minLength: 1
          type: string
        description:
          examples:
            - Recurring charge installment 03/12
          maxLength: 140
          type: string
        endToEndId:
          examples:
            - E1234567820260815060012345678901
          type: string
        initiationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          minLength: 1
          type: string
        maxAttempts:
          examples:
            - 2
          format: int64
          maximum: 2
          type: integer
        recurrenceId:
          examples:
            - 01988a7c-1234-7abc-8def-111122223333
          type: string
        scheduledFor:
          examples:
            - '2026-08-15T00:00:00Z'
          format: date-time
          minLength: 1
          type: string
      required:
        - initiationId
        - scheduledFor
        - amount
      type: object
    ScheduleOutput:
      additionalProperties: false
      properties:
        accountId:
          examples:
            - 019cf6ef-e418-7ced-80c0-7b9816faa798
          type: string
        amount:
          examples:
            - '100.50'
          type: string
        attemptCount:
          examples:
            - 0
          format: int64
          type: integer
        attempts:
          items:
            $ref: '#/components/schemas/ScheduleAttemptOutput'
          type: array
        cancelledAt:
          examples:
            - '2026-05-19T09:15:33Z'
          format: date-time
          type: string
        createdAt:
          examples:
            - '2026-05-26T12:30:00Z'
          format: date-time
          type: string
        description:
          examples:
            - Recurring charge installment 03/12
          type: string
        destination:
          $ref: '#/components/schemas/ScheduleDestination'
        endToEndId:
          examples:
            - E1234567820260815060012345678901
          type: string
        executedAt:
          examples:
            - '2026-08-15T06:00:04Z'
          format: date-time
          type: string
        failedAt:
          examples:
            - '2026-08-15T06:00:04Z'
          format: date-time
          type: string
        failureMessage:
          type: string
        failureReason:
          enum:
            - INSUFFICIENT_FUNDS
            - BTG_REJECTED
            - MIDAZ_REJECTED
            - VALIDATION_FAILED
            - SCHEDULE_STALE_TIMEOUT
            - SCHEDULE_RETRIES_EXHAUSTED
          examples:
            - INSUFFICIENT_FUNDS
          type: string
        firedAt:
          examples:
            - '2026-08-15T06:00:04Z'
          format: date-time
          type: string
        id:
          examples:
            - 01989f9e-6508-79f8-9540-835be49fbd0d
          type: string
        initiationId:
          examples:
            - 550e8400-e29b-41d4-a716-446655440010
          type: string
        initiationType:
          enum:
            - MANUAL
            - KEY
            - QR_CODE
          examples:
            - MANUAL
          type: string
        maxAttempts:
          examples:
            - 2
          format: int64
          type: integer
        recurrenceId:
          examples:
            - 01988a7c-1234-7abc-8def-111122223333
          type: string
        scheduledFor:
          examples:
            - '2026-08-15T09:00:00Z'
          format: date-time
          type: string
        status:
          enum:
            - SCHEDULED
            - PROCESSING
            - EXECUTED
            - FAILED
            - CANCELLED
          examples:
            - SCHEDULED
          type: string
        transferId:
          examples:
            - c8d27e3f-4a5b-6c7d-8e9f-0a1b2c3d4e5f
          type: string
        updatedAt:
          examples:
            - '2026-05-26T12:30:00Z'
          format: date-time
          type: string
      required:
        - id
        - accountId
        - initiationId
        - status
        - scheduledFor
        - amount
        - initiationType
        - destination
        - attemptCount
        - maxAttempts
        - attempts
        - createdAt
        - updatedAt
      type: object
    LegacyErrorBody:
      additionalProperties: false
      properties:
        fields:
          additionalProperties:
            type: string
          type: object
        headers:
          additionalProperties:
            type: string
          type: object
        message:
          type: string
        paths:
          additionalProperties:
            type: string
          type: object
        queryParams:
          additionalProperties:
            type: string
          type: object
        raw:
          type: string
        code:
          type: string
        title:
          type: string
      required:
        - code
        - title
        - message
      type: object
    ScheduleAttemptOutput:
      additionalProperties: false
      properties:
        attemptedAt:
          examples:
            - '2026-08-15T06:00:02Z'
          format: date-time
          type: string
        endToEndId:
          examples:
            - E1234567820260815060011111111111
          type: string
        failureMessage:
          examples:
            - 'Midaz error: balance below required (06:00 BRT attempt)'
          type: string
        failureReason:
          enum:
            - INSUFFICIENT_FUNDS
            - BTG_REJECTED
            - MIDAZ_REJECTED
            - VALIDATION_FAILED
            - SCHEDULE_STALE_TIMEOUT
          examples:
            - INSUFFICIENT_FUNDS
          type: string
        initiationId:
          examples:
            - a1111111-1111-4111-8111-111111111111
          type: string
        transferId:
          examples:
            - f1a2b3c4-1111-4d5e-9f6a-7b8c9d0e1f23
          type: string
      required:
        - attemptedAt
        - failureReason
        - failureMessage
      type: object
    ScheduleDestination:
      additionalProperties: false
      properties:
        account:
          $ref: '#/components/schemas/ScheduleDestinationAccount'
        key:
          examples:
            - john.doe@example.com
          type: string
        owner:
          $ref: '#/components/schemas/ScheduleDestinationOwner'
      required:
        - account
        - owner
      type: object
    ScheduleDestinationAccount:
      additionalProperties: false
      properties:
        branch:
          examples:
            - '0001'
          type: string
        number:
          examples:
            - '123456789'
          type: string
        participant:
          examples:
            - '12345678'
          type: string
        type:
          enum:
            - CACC
            - SVGS
            - TRAN
            - OTHR
          examples:
            - CACC
          type: string
      required:
        - branch
        - number
        - participant
        - type
      type: object
    ScheduleDestinationOwner:
      additionalProperties: false
      properties:
        document:
          examples:
            - '52998224725'
          type: string
        name:
          examples:
            - John Doe
          type: string
        tradeName:
          examples:
            - John's Business
          type: string
      required:
        - document
        - name
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.