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

# List appointment cancellation reasons

> Returns the cancellation reasons configured for the organization. Sourced from ModMed's `appointment/cancel-reason` configuration; EZDerm exposes no equivalent reference surface, so an EZDerm-only organization returns an empty list. Requires read:appointments scope.



## OpenAPI

````yaml /openapi-v2.json get /cancel-reasons
openapi: 3.0.0
info:
  title: Max AI Public API
  description: API for third-party marketplace apps
  version: '2.0'
  contact: {}
servers:
  - url: https://api.maxcare.ai/v2
security: []
tags: []
paths:
  /cancel-reasons:
    get:
      tags:
        - Cancel Reasons
      summary: List appointment cancellation reasons
      description: >-
        Returns the cancellation reasons configured for the organization.
        Sourced from ModMed's `appointment/cancel-reason` configuration; EZDerm
        exposes no equivalent reference surface, so an EZDerm-only organization
        returns an empty list. Requires read:appointments scope.
      operationId: CancelReasonsPublicController_listCancelReasons
      parameters:
        - name: activeOnly
          required: false
          in: query
          description: >-
            When true, return only reasons the practice can currently select.
            Retired reasons are returned by default because historical
            appointments still reference them and a picker that cannot name one
            would render that appointment's reason blank.
          schema:
            example: false
            type: boolean
        - name: X-Organization-Id
          in: header
          required: true
          schema:
            type: string
          description: Target clinic organization ID
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCancelReasonsSuccessResponse'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiUnauthorizedResponse'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiForbiddenResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicApiRateLimitResponse'
      security:
        - api-key: []
components:
  schemas:
    ListCancelReasonsSuccessResponse:
      type: object
      properties:
        code:
          type: string
          description: Response code
          example: success
        data:
          $ref: '#/components/schemas/ListCancelReasonsResponseData'
      required:
        - code
        - data
    PublicApiUnauthorizedResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: unauthorized
        message:
          type: string
          description: Human-readable error message
          example: Invalid or missing API key
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiForbiddenResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: forbidden
        message:
          type: string
          description: Human-readable error message
          example: Insufficient scope
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    PublicApiRateLimitResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: rate_limit_exceeded
        message:
          type: string
          description: Human-readable error message
          example: Rate limit exceeded. Maximum 1000 requests per 60 seconds.
        trace_id:
          type: string
          description: Trace ID for debugging
          example: 550e8400-e29b-41d4-a716-446655440000
      required:
        - code
        - message
        - trace_id
    ListCancelReasonsResponseData:
      type: object
      properties:
        cancelReasons:
          type: array
          items:
            $ref: '#/components/schemas/ExternalCancelReasonResponse'
      required:
        - cancelReasons
    ExternalCancelReasonResponse:
      type: object
      properties:
        id:
          type: string
          description: >-
            Max AI's own id for this cancellation reason. Pass THIS to `GET
            /appointments?cancelReasonIds=`, not `externalId` — an EHR-native
            reason id is only unique within one EHR instance. Prefixed `crn_…`
            from v3 onward; a raw UUID on v1/v2.
          example: 7e8d9c0b-1a2f-43e5-6789-01234567890a
        externalId:
          type: string
          description: >-
            The EHR's own id for this reason (ModMed's `reasonId`). NOT unique
            across EHR instances — do not use it as a key.
          example: CR00000001
        instanceId:
          type: string
          description: >-
            The EHR instance this reason belongs to. Prefixed `ins_…` from v3
            onward; a raw UUID on v1/v2.
          example: 1a2b3c4d-5e6f-47a8-9b01-c2d3e4f56789
        name:
          type: string
          description: Display name
          nullable: true
          example: Patient cancelled
        active:
          type: boolean
          description: >-
            Whether the practice can still select this reason. Null when the EHR
            does not report it.
          nullable: true
          example: true
        predefined:
          type: boolean
          description: >-
            True for EHR built-in reasons, false for practice-authored ones.
            Null when not reported.
          nullable: true
          example: true
        lastSyncedAt:
          type: string
          description: When Max AI last saw this reason in the practice's configuration.
          example: '2026-07-31T04:15:00.000Z'
      required:
        - id
        - externalId
        - instanceId
        - name
        - active
        - predefined
        - lastSyncedAt
  securitySchemes:
    api-key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Marketplace API key

````