> ## 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 Guest Booking

> Creates a new booking request from an unauthenticated user (guest). This public endpoint allows guests to submit booking requests without creating an account upfront. A user account will be created automatically and a welcome email sent for password setup.



## OpenAPI

````yaml POST /bookings/create-booking-guest
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:
  /bookings/create-booking-guest:
    post:
      tags:
        - bookings
        - public
      summary: Create Guest Booking
      description: >-
        Creates a new booking request from an unauthenticated user (guest). This
        public endpoint allows guests to submit booking requests without
        creating an account upfront. A user account will be created
        automatically and a welcome email sent for password setup.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBookingGuestRequest'
      responses:
        '200':
          description: Guest booking created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBookingGuestResponse'
        '400':
          description: Bad request - Invalid input data or validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Artist not found or not accepting bookings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateBookingGuestRequest:
      type: object
      required:
        - artistUserId
        - guestEmail
        - guestFirstName
        - guestSessionId
        - bookingData
      properties:
        artistUserId:
          type: string
          minLength: 1
          description: ID of the artist to book with
        guestEmail:
          type: string
          format: email
          description: Email address of the guest user
        guestFirstName:
          type: string
          minLength: 1
          description: First name of the guest user
        guestLastName:
          type: string
          description: Last name of the guest user (optional)
        guestSessionId:
          type: string
          minLength: 1
          description: Unique session ID for the guest (used for temporary image storage)
        bookingData:
          $ref: '#/components/schemas/BookingFormData'
          description: >-
            Booking request details including tattoo info, dates, and images.
            Can be either Flash or Custom booking type.
    CreateBookingGuestResponse:
      type: object
      required:
        - success
        - bookingId
        - clientCreated
      properties:
        success:
          type: boolean
          description: Whether the guest booking was created successfully
        bookingId:
          type: string
          description: ID of the created booking
        clientCreated:
          type: boolean
          description: Whether a new user account was created for the guest
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    BookingFormData:
      type: object
      description: >-
        Booking form data that can be either Flash or Custom type. The required
        fields vary based on requestType.
      required:
        - requestType
        - preferredLocationIds
        - isCoverUp
        - tattooPlacement
        - selectedDates
        - desiredTimeOfDay
        - isOver18
        - isPolicyAccepted
      properties:
        requestType:
          type: string
          enum:
            - Flash
            - Custom
          description: >-
            Type of booking request. Flash requires flashIds array. Custom
            requires description (min 30 chars), color field.
        preferredLocationIds:
          type: array
          items:
            type: string
          minItems: 1
          description: IDs of preferred locations for the booking
        flashIds:
          type: array
          items:
            type: string
          description: Array of flash listing IDs (for Flash bookings, can be empty array)
        description:
          type: string
          maxLength: 1000
          description: >-
            Description of the tattoo request. Optional for Flash (max 1000
            chars), required for Custom (min 30 chars).
        isCoverUp:
          type: boolean
          description: Whether this is a cover-up tattoo
        color:
          type: string
          description: Color preference (required for Custom bookings)
        length:
          type: string
          description: >-
            Length of the tattoo (optional for Custom, must be positive number
            if provided)
        width:
          type: string
          description: >-
            Width of the tattoo (optional for Custom, must be positive number if
            provided)
        tattooPlacement:
          type: array
          items:
            type: string
          description: Selected placement areas for the tattoo
        otherTattooPlacement:
          type: string
          description: Custom placement description if not in standard options
        tattooStyle:
          type: array
          items:
            type: string
          description: Selected tattoo styles (optional, for Custom bookings)
        images:
          type: array
          items:
            type: string
          description: Array of image URLs (optional)
        links:
          type: array
          items:
            type: string
            format: uri
          description: Reference links for tattoo design (optional)
        selectedDates:
          type: array
          items:
            oneOf:
              - type: string
                format: date
              - type: string
                format: date-time
          description: >-
            Preferred dates for the tattoo session (can be date strings or
            timestamps)
        desiredTimeOfDay:
          type: string
          enum:
            - Morning
            - Afternoon
            - Either
          description: Preferred time of day for the session
        additionalDateComments:
          type: string
          description: Additional comments about date preferences
        medicalConditions:
          type: string
          description: Any relevant medical conditions
        isOver18:
          type: boolean
          description: Confirmation that the client is over 18 (must be true)
        isPolicyAccepted:
          type: boolean
          description: Confirmation that the client accepts the policy (must be true)

````