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

# Plan an appointment for a candidate

> Creates an appointment for a candidate. Pass `applicationId` to attach the appointment to one of the applications of that candidate, and `location` to record where it takes place.



## OpenAPI

````yaml /api-reference/openapi.json post /appointments
openapi: 3.1.0
info:
  title: Spott API Reference
  version: '0.1'
servers:
  - url: https://api.gospott.com
security: []
tags: []
paths:
  /appointments:
    post:
      tags:
        - Appointments
      summary: Plan an appointment for a candidate
      description: >-
        Creates an appointment for a candidate. Pass `applicationId` to attach
        the appointment to one of the applications of that candidate, and
        `location` to record where it takes place.
      operationId: createAppointment
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAppointmentDto'
      responses:
        '201':
          description: The appointment was created. Returns its id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateRecordResponseDto'
        '400':
          description: Bad request - `endTime` is not after `startTime`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '401':
          description: Unauthorized - invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '403':
          description: The feature is not enabled for your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '404':
          description: >-
            The candidate does not exist, or the application does not belong to
            the candidate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
        '500':
          description: Error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExceptionBaseDto'
      security:
        - x-api-key: []
components:
  schemas:
    CreateAppointmentDto:
      type: object
      properties:
        candidateId:
          type: string
          minLength: 1
          description: Identifier of the candidate the appointment is planned for.
        type:
          $ref: '#/components/schemas/AppointmentType'
          description: Kind of appointment being planned.
        message:
          description: Subject and body describing the appointment.
          anyOf:
            - $ref: '#/components/schemas/CreateAppointmentMessageDto'
            - type: 'null'
        startTime:
          $ref: '#/components/schemas/DateISO'
          description: Moment the appointment starts.
          example: '2026-08-12T08:30:00.000Z'
        endTime:
          $ref: '#/components/schemas/DateISO'
          description: Moment the appointment ends. Must be after `startTime`.
          example: '2026-08-12T09:15:00.000Z'
        location:
          description: >-
            Physical location of the appointment. Omit for appointments without
            location.
          anyOf:
            - $ref: '#/components/schemas/CreateLocationDto'
            - type: 'null'
        applicationId:
          description: >-
            Identifier of the application this appointment belongs to. Must be
            an application of the same candidate.
          anyOf:
            - type: string
              minLength: 1
            - type: 'null'
      required:
        - candidateId
        - type
        - startTime
        - endTime
      id: PrivateCreateAppointmentDto
    CreateRecordResponseDto:
      type: object
      properties:
        id:
          type: string
          minLength: 1
      required:
        - id
      id: CreateRecordResponseDto
    ExceptionBaseDto:
      type: object
      properties:
        status:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        message:
          type: string
        requestId:
          type: string
      required:
        - status
        - message
        - requestId
      id: ExceptionBaseDto
    AppointmentType:
      type: string
      enum:
        - ONLINE_MEETING
        - INTERVIEW
        - REGISTRATION
      id: AppointmentType
    CreateAppointmentMessageDto:
      type: object
      properties:
        subject:
          description: Short title of the appointment.
          example: Intake
          anyOf:
            - type: string
              minLength: 1
              maxLength: 255
            - type: 'null'
        body:
          description: Free-text description or agenda of the appointment.
          anyOf:
            - type: string
              minLength: 1
              maxLength: 20000
            - type: 'null'
      id: PrivateCreateAppointmentMessageDto
    DateISO:
      id: DateISO
      format: date-time
      anyOf:
        - type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        - type: string
          format: date
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))$
    CreateLocationDto:
      type: object
      properties:
        street1:
          anyOf:
            - type: string
            - type: 'null'
        street2:
          anyOf:
            - type: string
            - type: 'null'
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
        city:
          anyOf:
            - type: string
            - type: 'null'
        region:
          anyOf:
            - type: string
            - type: 'null'
        state:
          anyOf:
            - type: string
            - type: 'null'
        country:
          anyOf:
            - type: string
            - type: 'null'
        latitude:
          anyOf:
            - type: number
              minimum: -90
              maximum: 90
            - type: 'null'
        longitude:
          anyOf:
            - type: number
              minimum: -180
              maximum: 180
            - type: 'null'
        type:
          anyOf:
            - $ref: '#/components/schemas/LocationType'
            - type: 'null'
      required:
        - street1
        - street2
        - postalCode
        - city
        - region
        - state
        - country
        - type
      id: PrivateCreateLocationDto
    LocationType:
      type: string
      enum:
        - primary_home
        - secondary_home
        - primary_work
        - headquarters
        - regional_office
      id: LocationType
  securitySchemes:
    x-api-key:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        API key for authentication. Get your API key from Settings → API Keys in
        your Spott dashboard.

````