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

# Create Availability

> Creates availability schedule for an artist



## OpenAPI

````yaml POST /availability/create-availability
openapi: 3.1.0
info:
  title: Tatu API
  description: API documentation for Tatu's booking and artist management system
  version: 1.0.0
servers:
  - url: http://localhost:3000/api
    description: Development server
security: []
paths:
  /availability/create-availability:
    post:
      summary: Create Availability
      description: Creates availability schedule for an artist
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAvailabilityRequest'
      responses:
        '200':
          description: Availability created successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    description: Whether the operation was successful
        '400':
          description: Bad request - not authorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateAvailabilityRequest:
      type: object
      required:
        - artistId
        - weeklySlots
        - dateRangeType
        - effectiveFrom
      properties:
        artistId:
          type: string
          description: ID of the artist this availability belongs to
        weeklySlots:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/DaySlots'
          description: Weekly schedule with days as keys (e.g., 'Sunday', 'Monday')
        dateRangeType:
          $ref: '#/components/schemas/AvailabilityDateRangeTypeEnum'
          description: Type of date range for this availability
        effectiveFrom:
          type: number
          description: >-
            UTC timestamp in milliseconds when this availability becomes
            effective
        effectiveUntil:
          type: number
          description: Optional UTC timestamp in milliseconds when this availability ends
        rollingDays:
          type: string
          description: Optional number of days to roll over when dateRangeType is 'rolling'
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    DaySlots:
      type: object
      required:
        - timeSlots
      properties:
        timeSlots:
          type: array
          items:
            $ref: '#/components/schemas/TimeSlot'
          description: List of time slots for this day
    AvailabilityDateRangeTypeEnum:
      type: string
      enum:
        - indefinitely
        - specific
        - rolling
      description: Type of date range for availability
    TimeSlot:
      type: object
      required:
        - startTime
        - endTime
      properties:
        startTime:
          type: string
          format: date-time
          description: Start time of the slot
        endTime:
          type: string
          format: date-time
          description: End time of the slot

````