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

# Create appointment type

> **Error response — `422 Unprocessable Entity`**

- | Field | Type | Required? | Notes |
- |---|---|---|---|
- | `title` | string | **Always required** | DB-level `null: false`. |
- | `category` | enum string | Optional | One of `hygiene`, `emergency`, `consultation`, `other`. **"Implant consult" is not in this enum yet** — that's from the Aug 21 meeting's task #2 and hasn't been implemented. Until it lands, send `"other"` or `"consultation"` as a placeholder. |
- | `provider_id` | integer | **Conditionally required** | Required unless the practice is `no_pms?`, `open_dental?`, or on a manual (non-Bahammas) scheduler — see [appointment_type.rb:78-83](https://null). Omitting it on a PMS that needs it returns `"Provider can't be blank"`. |
- | `new_patient_minutes` / `existing_patient_minutes` | integer | Conditionally required | Required unless `scheduler_setting.manual?`. Must be a multiple of 5 and ≥ 30. |
- | `buffer_minutes` | integer | Conditionally required | Required unless manual scheduler. Must be ≥ 60. |
- | `available_slots_lookup_months` | integer | Conditionally required | Required unless manual scheduler. Integer 1–12. |
- | `allowed_patient_posting` | enum string | Has a DB default (`both`) | One of `new_patients_only`, `existing_patients_only`, `both`. Rarely fails validation since the column defaults to `both`, but send it explicitly if you want a different posting rule. |
- | `procedure_code_ids` | array of integers | Optional | Links via `appointment_type_procedure_codes`. |
- `tenant_id` and `scheduler_setting_id` are set automatically server-side — do not send them.
- Success response — `201 Created`



## OpenAPI

````yaml https://app.teamcaredental.com/openapi-ai-voice.json post /organizations/{organization_id}/appointment_types
openapi: 3.1.0
info:
  title: TeamCare AI Voice API
  version: 1.0.0
  description: AI Agent APIs for appointment scheduling, patient lookup and availability.
servers:
  - url: https://app.teamcaredental.com/api/v1/ai_voice
security:
  - bearerAuth: []
paths:
  /organizations/{organization_id}/appointment_types:
    post:
      tags:
        - Appointment Types
      summary: Create appointment type
      description: "**Error response —\_`422 Unprocessable Entity`**\n\n- | Field | Type | Required? | Notes |\n- |---|---|---|---|\n- | `title` | string | **Always required** | DB-level `null: false`. |\n- | `category` | enum string | Optional | One of `hygiene`, `emergency`, `consultation`, `other`. **\"Implant consult\" is not in this enum yet** — that's from the Aug 21 meeting's task #2 and hasn't been implemented. Until it lands, send `\"other\"` or `\"consultation\"` as a placeholder. |\n- | `provider_id` | integer | **Conditionally required** | Required unless the practice is `no_pms?`, `open_dental?`, or on a manual (non-Bahammas) scheduler — see [appointment_type.rb:78-83](https://null). Omitting it on a PMS that needs it returns `\"Provider can't be blank\"`. |\n- | `new_patient_minutes` / `existing_patient_minutes` | integer | Conditionally required | Required unless `scheduler_setting.manual?`. Must be a multiple of 5 and ≥ 30. |\n- | `buffer_minutes` | integer | Conditionally required | Required unless manual scheduler. Must be ≥ 60. |\n- | `available_slots_lookup_months` | integer | Conditionally required | Required unless manual scheduler. Integer 1–12. |\n- | `allowed_patient_posting` | enum string | Has a DB default (`both`) | One of `new_patients_only`, `existing_patients_only`, `both`. Rarely fails validation since the column defaults to `both`, but send it explicitly if you want a different posting rule. |\n- | `procedure_code_ids` | array of integers | Optional | Links via `appointment_type_procedure_codes`. |\n- `tenant_id` and `scheduler_setting_id` are set automatically server-side — do not send them.\n- Success response — `201 Created`"
      operationId: organization_appointment_types_create
      parameters:
        - name: organization_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                appointment_type:
                  type: object
                  properties:
                    title:
                      type: string
                      example: Dental Implant Consult
                    category:
                      type: string
                      example: consultation
                    provider_id:
                      type: integer
                      example: 123
                    new_patient_minutes:
                      type: integer
                      example: 60
                    existing_patient_minutes:
                      type: integer
                      example: 45
                    buffer_minutes:
                      type: integer
                      example: 60
                    available_slots_lookup_months:
                      type: integer
                      example: 3
            example:
              appointment_type:
                title: Dental Implant Consult
                category: consultation
                provider_id: 123
                new_patient_minutes: 60
                existing_patient_minutes: 45
                buffer_minutes: 60
                available_slots_lookup_months: 3
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        '401':
          description: Missing, invalid or expired token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: not authorized
        '403':
          description: The credential may not access this resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: access Denied
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              example:
                error: Appointment not found
        '422':
          description: The request could not be processed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
              example:
                errors: ...
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT returned by POST /auth/token. Valid for six hours.

````