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

# Get an autopay schedule

> Returns a single autopay schedule by ID. Returns 404 if it isn't reachable by this key.



## OpenAPI

````yaml /api-reference/external_api.openapi.json get /autopay/{autopay_id}
openapi: 3.1.0
info:
  title: Monterey External Reporting API
  description: >-
    Org-scoped, API-key-authenticated reporting endpoints for Monterey Financial
    clients.
  version: 0.1.0
servers:
  - url: https://api.montereyfinancial.app
    description: Production
security:
  - BearerApiKey: []
paths:
  /autopay/{autopay_id}:
    get:
      tags:
        - Autopay
      summary: Get an autopay schedule
      description: >-
        Returns a single autopay schedule by ID. Returns 404 if it isn't
        reachable by this key.
      operationId: get_autopay_autopay__autopay_id__get
      parameters:
        - name: autopay_id
          in: path
          required: true
          schema:
            type: string
            title: Autopay Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutopayRow'
        '401':
          description: Missing or invalid API key.
        '404':
          description: Resource not in scope or does not exist.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerApiKey: []
components:
  schemas:
    AutopayRow:
      properties:
        id:
          type: string
          title: Id
        account_id:
          type: string
          title: Account Id
          description: The account this schedule pays toward.
        payment_method_id:
          type: string
          title: Payment Method Id
          description: The stored payment method charged on each run.
        amount_cents:
          type: integer
          title: Amount Cents
          description: Amount charged per run, in integer cents.
        frequency_unit:
          type: string
          title: Frequency Unit
          description: 'Unit of the recurrence interval. One of: day, week, month, year.'
        frequency_interval:
          type: integer
          title: Frequency Interval
          description: Number of units between runs (e.g. 2 + week = every two weeks).
        anchor_day:
          anyOf:
            - type: integer
            - type: 'null'
          title: Anchor Day
          description: >-
            Day of month (1-31) runs are pinned to, for month/year cadences.
            Clamped to the last day of shorter months.
        anchor_month:
          anyOf:
            - type: integer
            - type: 'null'
          title: Anchor Month
          description: Month (1-12) runs are pinned to, for yearly cadences.
        start_date:
          type: string
          format: date
          title: Start Date
          description: Date of the first scheduled run.
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
          description: Last date a run may occur. Null for open-ended schedules.
        next_run_date:
          type: string
          format: date
          title: Next Run Date
          description: Date the next charge is scheduled to run.
        status:
          type: string
          title: Status
          description: 'Schedule state. One of: active, paused, cancelled, expired.'
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
          description: When the schedule was cancelled. Null unless cancelled.
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - account_id
        - payment_method_id
        - amount_cents
        - frequency_unit
        - frequency_interval
        - start_date
        - next_run_date
        - status
        - created_at
        - updated_at
      title: AutopayRow
      description: |-
        A recurring payment schedule tying an account to a stored
        payment method.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
      description: >-
        Parameter-validation error (HTTP 422). `detail` lists each violated
        constraint with its location, message, and type.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
      description: >-
        A single parameter-validation failure: `loc` is the path to the
        offending input, `msg` is human-readable, and `type` is the rule that
        failed.
  securitySchemes:
    BearerApiKey:
      type: http
      description: Static API key issued via the client portal. Treat it like a password.
      scheme: bearer
      bearerFormat: ApiKey

````