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

# Send Appointment Message

> Send a message to a caller whilst waiting for a call to start e.g. We're running a few minutes late



## OpenAPI

````yaml POST /api/v1/appointments/{appointment}/messages
openapi: 3.0.0
info:
  title: SQOD API
  version: 1.0.0
  contact:
    name: Daniel Loomes
    email: dloomes@involve.vc
  description: >-
    RESTful API specification for involve-api.


    All endpoints are secured (unless indicated otherwise) and need a valid
    Bearer token passed in the Authorization header of the request.


    Response model conventions:

    - Fields marked as "required" will have a value

    - Fields not marked as "required" can have a value, but may also be null, or
    may not be included in the response at all

    - Fields of type array may be empty (array with no items) unless validation
    indicates otherwise, however they are always "required"


    Patch update conventions:

    - Send only the fields you want to update with their new values

    - Fields marked as "required" cannot be unset/set to null, however they can
    be omitted from the request body if they should be left unchanged

    - The same rules also apply to fields inside nested objects


    Get collection conventions:

    - All paginated lists accept page and per_page query string parameters


    Other notes:

    - For sub-resources of the User resource, 'me' alias can be used instead of
    the user ID to work with currently authenticated user.

    - Expect 401 response in case of authentication problems, e.g. expired or
    invalid tokens.

    - Expect 403 response in case of authorisation problems, e.g. user doesn't
    have enough privileges to access a given resource.
  license:
    name: Private
    url: https://example.com
servers:
  - url: '{customerRef}'
    description: SQOD Customer Server
    variables:
      customerRef:
        default: ''
        description: Enter your customer URL
  - url: https://auth.app.sqod.co.uk
    description: SQOD Authentication Server
security: []
paths:
  /api/v1/appointments/{appointment}/messages:
    parameters:
      - $ref: '#/components/parameters/Appointment'
    post:
      tags:
        - Appointment Message
      summary: Create appointment message
      description: >-
        Send a message to a caller whilst waiting for a call to start e.g. We're
        running a few minutes late
      operationId: postAppointmentMessage
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  type: string
                  description: The message to send
                  example: Hello World
              required:
                - message
      responses:
        '201':
          description: >-
            The request has succeeded and a new resource has been created as a
            result.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AppointmentMessageResource'
                required:
                  - data
      security:
        - Cognito: []
components:
  parameters:
    Appointment:
      name: appointment
      in: path
      description: The Uuid of the required appointment model
      required: true
      schema:
        $ref: '#/components/schemas/Uuid'
  schemas:
    AppointmentMessageResource:
      title: Appointment Message
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        message:
          type: string
          description: The message
          example: Hello World
        created_at:
          type: string
          format: date-time
          description: The date and time the message was created
          example: '2021-01-01T00:00:00.000Z'
        sender:
          $ref: '#/components/schemas/UserResource'
    Uuid:
      title: id
      description: Resource identifier as a UUID
      type: string
      example: 9a0f170e-0aa0-47db-ab14-4ddcdcbad061
    UserResource:
      title: User
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Uuid'
        first_name:
          $ref: '#/components/schemas/FirstName'
        last_name:
          $ref: '#/components/schemas/LastName'
        email:
          $ref: '#/components/schemas/Email'
        role:
          type: string
          enum:
            - super-admin
            - Tenant-admin
            - department-admin
            - Tenant-scheduler
            - agent
        access_permission:
          type: string
          enum:
            - appointment
            - waiting_area
            - both
        deleted_at:
          type: string
          format: date-time
          nullable: true
        is_fully_deleted:
          type: boolean
          nullable: true
      required:
        - id
        - first_name
        - last_name
        - email
        - role
    FirstName:
      title: FirstName
      description: The user's first name
      type: string
      example: John
    LastName:
      title: LastName
      description: The user's last name
      type: string
      example: Smith
    Email:
      title: Email
      type: string
      format: email
  securitySchemes:
    Cognito:
      type: http
      description: Provide a Bearer Token
      scheme: bearer

````