openapi: 3.0.0
paths:
  /whoami:
    get:
      operationId: AuthController_whoami
      summary: Get current user info
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      tags:
        - Auth
  /user/verify:
    post:
      operationId: AuthController_loginWithFirebase
      summary: Login with Firebase
      description: Exchange Firebase token by pxtoken
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /logout:
    get:
      operationId: AuthController_logout
      summary: Logout
      description: Removes http-only auth cookie
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /user/newidentity:
    post:
      operationId: UserController_newIdentity
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewIdentity'
      responses:
        '201':
          description: ''
      tags:
        - User
  /sessions/merge:
    post:
      operationId: UserController_sessionsMerge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionMerge'
      responses:
        '201':
          description: ''
      tags:
        - User
  /user/merge:
    post:
      operationId: UserController_userMerge
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserMerge'
      responses:
        '201':
          description: ''
      tags:
        - User
  /user/profile/{id}:
    get:
      operationId: UserController_userProfile
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /users:
    get:
      operationId: UserController_users
      summary: Get users
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - User
        - Admin
      security:
        - oauth2:
            - admin
  /user/{guid}:
    delete:
      operationId: UserController_deleteUser
      summary: Delete user
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
        - Admin
      security:
        - oauth2:
            - admin
  /user/{guid}/identities:
    delete:
      operationId: UserController_deleteUserIdentities
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/create/unverified:
    post:
      operationId: UserController_createUnverifiedUser
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUnverifiedUser'
      responses:
        '201':
          description: ''
      tags:
        - User
  /user/headshot/{id}:
    get:
      operationId: UserController_userHeadshot
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/preference:
    post:
      operationId: UserController_updateUserPreference
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateUserPreference'
      responses:
        '201':
          description: ''
      tags:
        - User
  /user/check:
    get:
      operationId: UserController_checkUser
      parameters:
        - name: method
          required: true
          in: query
          schema:
            type: string
        - name: value
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/findunverified:
    get:
      operationId: UserController_findUnverifiedUser
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/identites:
    get:
      operationId: UserController_myIdentities
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/profile/{entry_guid}:
    delete:
      operationId: UserController_deleteProfileEntry
      parameters:
        - name: entry_guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/profile:
    post:
      operationId: UserController_addProfileEntry
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddProfile'
      responses:
        '201':
          description: ''
      tags:
        - User
    put:
      operationId: UserController_updateProfileEntry
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateProfile'
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/identity/email/{email}:
    delete:
      operationId: UserController_deleteUserEmailIdentity
      parameters:
        - name: email
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /user/identity/phone/{phone}:
    delete:
      operationId: UserController_deleteUserPhoneIdentity
      parameters:
        - name: phone
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - User
  /workspaces/{workspaceguid}:
    get:
      operationId: WorkspaceController_getWorkspace
      summary: Get Workspace by ID
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspace/joinrequest/{id}:
    get:
      operationId: WorkspaceController_requestToJoinWorkspace
      summary: Request to join a Workspace
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspaces/user:
    delete:
      operationId: WorkspaceController_removeWorkspaceUser
      summary: Remove user from workspace
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveWorkspaceUserDto'
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspaces/inviteuser:
    post:
      operationId: WorkspaceController_inviteUserToWorkspace
      summary: Invite user to workspace
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteUserDto'
      responses:
        '201':
          description: ''
      tags:
        - Workspaces
  /workspace/order:
    post:
      operationId: WorkspaceController_orderWorkspace
      summary: Order workspace
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - Workspaces
  /workspace/{guid}:
    delete:
      operationId: WorkspaceController_deleteWorkspace
      summary: Delete workspace
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspaces:
    get:
      operationId: WorkspaceController_getWorkspaces
      summary: Get workspaces
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspace/logo/{guid}:
    get:
      operationId: WorkspaceController_getWorkspaceLogo
      summary: Get workspace logo
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '302':
          description: Redirect to logo image
      tags:
        - Workspaces
  /workspace:
    post:
      operationId: WorkspaceController_createWorkspace
      summary: Upsert workspace
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertWorkspaceDto'
      responses:
        '201':
          description: ''
      tags:
        - Workspaces
  /workspace/{guid}/phone/{number}:
    post:
      operationId: WorkspaceController_removePhoneNumber
      summary: Remove phone number from workspace
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
        - name: number
          required: true
          in: path
          schema:
            type: string
      responses:
        '201':
          description: ''
      tags:
        - Workspaces
  /workspace/vanityname/check:
    get:
      operationId: WorkspaceController_checkVanityName
      summary: Check name availability
      parameters:
        - name: name
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /workspace/{workspaceguid}/welcome-message:
    delete:
      operationId: WorkspaceController_deleteWelcomeMessage
      summary: Delete welcome message
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Workspaces
  /channels/recent:
    post:
      operationId: ChannelController_getRecentChannels
      summary: Get recent channels
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecentChannelsFilter'
      responses:
        '201':
          description: ''
      tags:
        - Channels
  /channels/{workspaceguid}:
    get:
      operationId: ChannelController_getChannels
      summary: Get workspace channels
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Channels
  /channels/namedConversation:
    post:
      operationId: ChannelController_createNamedConversation
      summary: Create named conversation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNamedConversation'
      responses:
        '201':
          description: ''
      tags:
        - Channels
  /channels/directMessage:
    post:
      operationId: ChannelController_createDirectMessage
      summary: Create direct message
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDirectMessage'
      responses:
        '201':
          description: ''
      tags:
        - Channels
  /channels/dm/match:
    post:
      operationId: ChannelController_dmMatch
      summary: Find DM match
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - Channels
  /channels/collaborators:
    post:
      operationId: ChannelController_addCollaborators
      summary: Add collaborator
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddCollaborators'
      responses:
        '201':
          description: ''
      tags:
        - Channels
  /channel/{channelguid}:
    get:
      operationId: ChannelController_getChannel
      summary: Get Channel by ID
      parameters:
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Channels
  /channels/{workspaceguid}/available:
    get:
      operationId: ChannelController_getAvailableChannels
      summary: Get available channels
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Channels
  /channels/{workspaceguid}/{channelguid}/attachments:
    post:
      operationId: ChannelController_addAttachments
      summary: Add channel attachment
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
      responses:
        '201':
          description: ''
      tags:
        - Channels
        - Attachments (channels)
  /channels/{workspaceguid}/{channelguid}/attachment:
    put:
      operationId: ChannelController_updateAttachment
      summary: Update channel attachment
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAttachment'
      responses:
        '200':
          description: ''
      tags:
        - Channels
        - Attachments (channels)
  /channels/{workspaceguid}/{channelguid}/attachment/{attachmentguid}:
    delete:
      operationId: ChannelController_deleteAttachment
      summary: Delete channel attachment
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
        - name: attachmentguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Channels
        - Attachments (channels)
  /favorites:
    post:
      operationId: FavoriteController_add
      summary: Add new favorite
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddFavoriteDto'
      responses:
        '201':
          description: Favorite added
        '400':
          description: Favorite already exists
      tags:
        - Favorites
    get:
      operationId: FavoriteController_list
      summary: Get user favorites
      parameters:
        - name: type
          required: false
          in: query
          description: Favorite type
          schema:
            enum:
              - channel
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Favorites
    delete:
      operationId: FavoriteController_deleteByType
      summary: Delete favorite by entity
      parameters:
        - name: type
          required: true
          in: query
          schema:
            enum:
              - channel
            type: string
        - name: entity_id
          required: true
          in: query
          example: 5e9f8f8f8f8f8f8f8f8f8f8
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Favorites
  /favorites/sort:
    post:
      operationId: FavoriteController_sort
      summary: Update favorites order
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SortFavoritesDto'
      responses:
        '201':
          description: ''
      tags:
        - Favorites
  /favorites/{id}:
    delete:
      operationId: FavoriteController_remove
      summary: Delete favorite by ID
      parameters:
        - name: id
          required: true
          in: path
          description: The ID of the favorite element to delete
          example: 5e8f8f8f8f8f8f8f8f
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Favorites
  /health:
    get:
      operationId: HealthController_health
      summary: Show app version and status
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HealthDto'
      tags:
        - Health Checks
  /startup:
    get:
      operationId: HomeController_startup
      summary: Get app startup data
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartupResponse'
      tags:
        - Home
  /home:
    get:
      operationId: HomeController_home
      summary: Get home screen data
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HomeResponse'
      tags:
        - Home
  /labels:
    post:
      operationId: LabelController_createLabel
      summary: Create label
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLabel'
      responses:
        '201':
          description: ''
      tags:
        - Labels
    get:
      operationId: LabelController_getAllLabelsForUser
      summary: Get all labels for user
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Labels
  /labels/{guid}:
    get:
      operationId: LabelController_getLabel
      summary: Get label by ID
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Labels
    put:
      operationId: LabelController_updateLabel
      summary: Update label
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLabel'
      responses:
        '200':
          description: ''
      tags:
        - Labels
    delete:
      operationId: LabelController_deleteLabel
      summary: Delete label
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Labels
  /labels/{labelguid}/message/{workspace_guid}/{messageguid}:
    post:
      operationId: LabelController_applyLabelToMessage
      summary: Apply label to message
      parameters:
        - name: labelguid
          required: true
          in: path
          schema:
            type: string
        - name: workspace_guid
          required: true
          in: path
          schema:
            type: string
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '201':
          description: ''
      tags:
        - Labels
    delete:
      operationId: LabelController_removeLabelFromMessage
      summary: Remove label from message
      parameters:
        - name: labelguid
          required: true
          in: path
          schema:
            type: string
        - name: workspace_guid
          required: true
          in: path
          schema:
            type: string
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Labels
  /logerror:
    post:
      operationId: LogController_logClientError
      summary: Log client error
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientLogDto'
      responses:
        '201':
          description: ''
      tags:
        - Log
  /magiclink:
    post:
      operationId: MagiclinkController_magiclink
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - Auth
  /magiclink/confirmed/{key}:
    put:
      operationId: MagiclinkController_confirmed
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /magiclink/redeemnow/{magictoken}:
    get:
      operationId: MagiclinkController_redeemnow
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /magiclink/redeem/{magictoken}:
    get:
      operationId: MagiclinkController_redeem
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /magiclink/{magictoken}:
    get:
      operationId: MagiclinkController_get
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /magiclink/code/check:
    get:
      operationId: MagiclinkController_codeCheck
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Auth
  /messages/welcome/{workspaceguid}:
    get:
      operationId: MessageController_getWelcomeMessage
      summary: Get welcome message
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/start:
    post:
      operationId: MessageController_startChannelMessage
      summary: Start channel message
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartChannelMessage'
      responses:
        '201':
          description: ''
      tags:
        - Messages
  /messages/prerecorded/start:
    post:
      operationId: MessageController_startPrerecordedMessage
      summary: Start prerecorded message
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartPrerecordedMessage'
      responses:
        '201':
          description: ''
      tags:
        - Prerecorded Messages
  /messages/welcome/start:
    post:
      operationId: MessageController_startWelcomeMessage
      summary: Start welcome message
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartWelcomeMessage'
      responses:
        '201':
          description: ''
      tags:
        - Messages
  /messages/complete:
    post:
      operationId: MessageController_completeMessage
      summary: Complete message
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - Messages
  /messages/created/{unique_id}:
    get:
      operationId: MessageController_getMessageForUser
      summary: Get message for user
      parameters:
        - name: unique_id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: >-
            Get a message created by the current user with the specified id or
            client id
      tags:
        - Messages
  /messages/summary:
    put:
      operationId: MessageController_upsertMessageSummary
      summary: Update message summary
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMessageSummary'
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/{channelguid}/around/{messageguid}:
    get:
      operationId: MessageController_getRecentMessagesAround
      summary: Get recent messages around
      parameters:
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/name:
    put:
      operationId: MessageController_updateMessageName
      summary: Update message name
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetMessageName'
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/prerecorded:
    get:
      operationId: MessageController_getPrerecordedMessages
      summary: Get prerecorded message
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Prerecorded Messages
    post:
      operationId: MessageController_createPrerecordedMessage
      summary: Create prerecorded message
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePrerecordedMessage'
      responses:
        '201':
          description: ''
      tags:
        - Prerecorded Messages
  /messages/prerecorded/{message_guid}/send/{channel_guid}:
    post:
      operationId: MessageController_sendPrerecordedMessage
      summary: Send prerecorded message
      parameters:
        - name: message_guid
          required: true
          in: path
          schema:
            type: string
        - name: channel_guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '201':
          description: ''
      tags:
        - Prerecorded Messages
  /messages/prerecorded/{message_guid}/send/{channel_guid}/{parent_message_guid}:
    post:
      operationId: MessageController_replyWithPrerecordedMessage
      summary: Reply with prerecorded message
      parameters:
        - name: message_guid
          required: true
          in: path
          schema:
            type: string
        - name: channel_guid
          required: true
          in: path
          schema:
            type: string
        - name: parent_message_guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '201':
          description: ''
      tags:
        - Prerecorded Messages
  /messages/prerecorded/{messageguid}:
    delete:
      operationId: MessageController_deletePrerecordedMessage
      summary: Delete prerecorded message
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Prerecorded Messages
  /messages/{messageguid}:
    delete:
      operationId: MessageController_deleteMessage
      summary: Delete message
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/recent:
    get:
      operationId: MessageController_getRecentMessages
      summary: Get recent messages
      parameters:
        - name: channelguid
          required: true
          in: query
          schema:
            type: string
        - name: useLastUpdated
          required: true
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/replies:
    get:
      operationId: MessageController_getMessageReplies
      summary: Get message replies
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/{workspaceguid}/{channelguid}:
    get:
      operationId: MessageController_getChannelMessages
      summary: Get channel messages
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
        - name: older_than
          required: true
          in: query
          schema:
            type: number
        - name: newer_than
          required: true
          in: query
          schema:
            type: number
        - name: count
          required: true
          in: query
          schema:
            type: number
      responses:
        '200':
          description: ''
      tags:
        - Messages
        - Channels
  /messages/{workspaceguid}/{channelguid}/{messageguid}:
    get:
      operationId: MessageController_getMessage
      summary: Get message by Workspace, Channel, ID
      parameters:
        - name: workspaceguid
          required: true
          in: path
          schema:
            type: string
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
        - name: channelguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/transcript:
    put:
      operationId: MessageController_updateTranscript
      summary: Update message transcript
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MessageTranscript'
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/{workspaceguid}/{messageguid}/attachments:
    post:
      operationId: MessageController_addAttachmentsOld
      summary: Add message attachment
      deprecated: true
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddAttachments'
      responses:
        '201':
          description: ''
      tags:
        - Attachments (messages)
  /messages/{messageguid}/attachments:
    post:
      operationId: MessageController_addAttachments
      summary: Add message attachment
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddAttachments'
      responses:
        '201':
          description: ''
      tags:
        - Attachments (messages)
  /messages/{workspaceguid}/{messageguid}/attachment/{attachmentguid}:
    delete:
      operationId: MessageController_deleteAttachmentOld
      summary: Delete message attachment
      deprecated: true
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
        - name: attachmentguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Attachments (messages)
    put:
      operationId: MessageController_updateAttachmentOld
      summary: Update message attachment
      deprecated: true
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
        - name: attachmentguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestAttachment'
      responses:
        '200':
          description: ''
      tags:
        - Attachments (messages)
  /messages/{messageguid}/attachment/{attachmentguid}:
    delete:
      operationId: MessageController_deleteAttachment
      summary: Delete message attachment
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
        - name: attachmentguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Attachments (messages)
    put:
      operationId: MessageController_updateAttachment
      summary: Update message attachment
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
        - name: attachmentguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RequestAttachment'
      responses:
        '200':
          description: ''
      tags:
        - Attachments (messages)
  /messages/notes:
    put:
      operationId: MessageController_updateNotes
      summary: Update message notes
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddNotes'
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /message/{messageguid}:
    get:
      operationId: MessageController_getMessageById
      summary: Get message by ID
      parameters:
        - name: messageguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /messages/unverified:
    get:
      operationId: MessageController_findUnverifiedMessages
      summary: Get unverified messages
      parameters: []
      responses:
        '200':
          description: ''
      tags:
        - Messages
  /notification/{guid}:
    delete:
      operationId: NotificationController_deleteNotification
      summary: Delete Notification
      parameters:
        - name: guid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Notifications
  /notification:
    post:
      operationId: NotificationController_createNotification
      summary: Create Notification
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Notification'
      responses:
        '201':
          description: ''
      tags:
        - Notifications
  /tag:
    post:
      operationId: NotificationController_tag
      summary: Tag
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag'
      responses:
        '201':
          description: ''
      tags:
        - Notifications
  /oauth/authorize:
    get:
      operationId: Oauth2Controller_auth
      summary: Authorize User
      parameters:
        - name: response_type
          required: true
          in: query
          description: >-
            Use `code` for server side flows, and `token` for application side
            flows
          schema:
            type: string
        - name: client_id
          required: true
          in: query
          description: Application client_id
          schema:
            type: string
        - name: state
          required: true
          in: query
          description: >-
            An opaque value the applications adds to the initial request that
            the authorization server includes when redirecting the back to the
            application. This value must be used by the application to prevent
            CSRF attacks.
          schema:
            type: string
        - name: scope
          required: true
          in: query
          description: A space-delimited list of permissions that the application requires.
          schema:
            type: string
        - name: redirect_uri
          required: true
          in: query
          description: >-
            The URL to which Auth will redirect the browser after authorization
            has been granted by the user.
          schema:
            type: string
      responses:
        '302':
          description: Redirect to login page or redirectUri sent
      tags:
        - OAuth2
  /oauth/userinfo:
    get:
      operationId: Oauth2Controller_userinfo
      summary: Get User info
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
      tags:
        - OAuth2
  /oauth/token:
    post:
      operationId: Oauth2Controller_token
      summary: Authenticate User
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OAuth2Request'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OAuth2Response'
      tags:
        - OAuth2
  /oauth/client/{client_id}:
    get:
      operationId: Oauth2Controller_client
      summary: Get Client by client_id
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Client'
      tags:
        - OAuth2
  /playlists:
    get:
      operationId: PlaylistController_getPlaylistsForUser
      summary: Get user playlists
      parameters: []
      responses:
        '200':
          description: The playlists
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Playlist'
      tags:
        - Playlists
    post:
      operationId: PlaylistController_createUserPlaylist
      summary: Create playlist
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlaylist'
      responses:
        '201':
          description: The playlist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Playlist'
      tags:
        - Playlists
  /playlists/{playlistguid}:
    put:
      operationId: PlaylistController_updatePlaylist
      summary: Update playlist
      parameters:
        - name: playlistguid
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePlaylist'
      responses:
        '200':
          description: ''
      tags:
        - Playlists
    delete:
      operationId: PlaylistController_deletePlaylist
      summary: Delete playlist
      parameters:
        - name: playlistguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Playlists
  /playlists/{playlistguid}/icon:
    put:
      operationId: PlaylistController_uploadPlaylistIcon
      summary: Update playlist icon
      parameters:
        - name: playlistguid
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Playlists
  /pushtoken:
    post:
      operationId: PushController_pushToken
      summary: Save push token
      parameters: []
      responses:
        '201':
          description: ''
      tags:
        - Push
  /reactions:
    get:
      operationId: ReactionController_getReactions
      summary: Get available reactions
      parameters: []
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Reaction'
      tags:
        - Reactions
  /reactions/{reaction_id}/{message_id}:
    post:
      operationId: ReactionController_addReactionToMessage
      summary: Add reaction to message
      parameters:
        - name: reaction_id
          required: true
          in: path
          schema:
            type: string
        - name: message_id
          required: true
          in: path
          schema:
            type: string
      responses:
        '201':
          description: ''
      tags:
        - Reactions
    delete:
      operationId: ReactionController_removeReaction
      summary: Remove reaction from message
      parameters:
        - name: reaction_id
          required: true
          in: path
          schema:
            type: string
        - name: message_id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Reactions
  /search:
    post:
      operationId: SearchController_search
      summary: Search messages
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchParameters'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResults'
      tags:
        - Search
  /stream/{message_id}/{file}:
    get:
      operationId: StreamController_getFile
      summary: Get stream files signed URL
      parameters:
        - name: message_id
          required: true
          in: path
          description: Message ID
          example: fd546db4b648d6b1fa
          schema:
            type: string
        - name: file
          required: true
          in: path
          description: Filename
          example: stream.m3u8
          schema:
            type: string
      responses:
        '302':
          description: Redirect to the S3 URL
      tags:
        - Streaming
  /message/sms:
    post:
      operationId: VoicemailController_receiveSMS
      summary: Receive SMS webhook
      description: This endpoint is called by AWS
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReceiveSMS'
      responses:
        '201':
          description: ''
      tags:
        - Voicemail
  /voicemail/find/phone:
    get:
      operationId: VoicemailController_findPhone
      summary: Get voicemail phone numbers
      description: Get a list of available phone numbers
      parameters:
        - name: areacode
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
      tags:
        - Voicemail
info:
  title: Carbon Voice API
  description: >
    # Introduction


    This API is designed for people who feel comfortable integrating with
    RESTful APIs.


    ## Terminology
     
    * **Workspace**: An area that groups together people and Conversations.

    * **Conversation**: A channel of communication. A grouping of people and
    messages related to a given topic.

    * **Collaborators**: A group of people who are part of a Conversation.

    * **Discussion**: Any post into a conversation

    * **CarbonLink**: A link (on a website, QR code, or phone call) to start a
    conversation.


    ## BaseURL


    This API is served over HTTPS.


    All URLs referenced in the documentation have the following base:
    https://api.carbonvoice.app.


    ## Authentication


    There are three ways to authenticate with this API:


    * with an OAuth2 Access Token in the Authorization request header field
    (which uses the Bearer authentication scheme to transmit the Access Token)

    * with your Client ID and Client Secret credentials

    * with a PXToken


    Each endpoint supports only one option.


    <SecurityDefinitions />


    ## Errors


    When an error occurs, you will receive an error object. Most of these error
    objects 

    contain an error code and an error description so that your applications can
    more 

    efficiently identify the problem.


    If you get an 4xx HTTP response code, then you can assume that there is a
    bad request

    from your end. In this case, check the Standard Error Responses for more
    context.


    5xx errors suggest a problem on our end, so in this case, check Carbon
    Voice's Status 

    to see how our systems are doing.


    In any other case you can use our support options.


    ## Rate-Limiting 


    This API is subject to rate limiting. The limits differ per endpoint.


    If you exceed the provided rate limit for a given endpoint, you will receive
    the 429

    Too Many Requests response with the following message: Too many requests.
    Check the

    X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers.


    For details on rate limiting, refer to Rate Limit Policy.


    ## Support


    If you have problems or need help with your case, you can always reach out
    to our Support.
  version: 1.0.0
  contact:
    name: Carbon Voice
    url: https://carbonvoice.app/support
    email: ''
  termsOfService: https://carbonvoice.app/terms
tags:
  - name: Favorites
    description: Manage logged in user favorites
servers:
  - url: http://localhost:8081
components:
  securitySchemes:
    cookie:
      type: apiKey
      in: cookie
      name: PXToken
    oauth2:
      type: oauth2
      flows:
        implicit:
          scopes:
            admin: Admin
            identity: View information about a user's identity
            profile:read: View a user's profile
            profile:write: >-
              Manage user's profile information: emails, phones, videocall, and
              more
            channels:read: View basic information about users's channels
            channels:write: Manage user's channels and create new ones on a user's behalf
            channels:join: Join user to an existing channel
          tokenUrl: http://localhost:8081/oauth/token
          authorizationUrl: http://localhost:8081/oauth/authorize
  schemas:
    User:
      type: object
      properties: {}
    NewIdentity:
      type: object
      properties: {}
    SessionMerge:
      type: object
      properties: {}
    UserMerge:
      type: object
      properties: {}
    CreateUnverifiedUser:
      type: object
      properties: {}
    UpdateUserPreference:
      type: object
      properties: {}
    AddProfile:
      type: object
      properties: {}
    UpdateProfile:
      type: object
      properties: {}
    RemoveWorkspaceUserDto:
      type: object
      properties:
        workspace_guid:
          type: string
        user_guid:
          type: string
      required:
        - workspace_guid
        - user_guid
    InviteUserDto:
      type: object
      properties:
        workspace_guid:
          type: string
        user_guid:
          type: string
        email:
          type: string
        phone:
          type: string
      required:
        - workspace_guid
        - user_guid
        - email
        - phone
    UpsertWorkspaceDto:
      type: object
      properties:
        user_guid:
          type: string
        workspace_guid:
          type: string
        workspace_name:
          type: string
        workspace_description:
          type: string
        type_cd:
          type: string
        vanity_name:
          type: string
      required:
        - user_guid
        - workspace_guid
        - workspace_name
        - workspace_description
        - type_cd
        - vanity_name
    RecentChannelsFilter:
      type: object
      properties: {}
    CreateNamedConversation:
      type: object
      properties: {}
    CreateDirectMessage:
      type: object
      properties: {}
    AddCollaborators:
      type: object
      properties: {}
    UpdateAttachment:
      type: object
      properties: {}
    AddFavoriteDto:
      type: object
      properties:
        type:
          type: string
          enum:
            - channel
        entity_id:
          type: string
          example: 5e9f8f8f8f8f8f8f8f8f8f8
      required:
        - type
        - entity_id
    SortFavoritesDto:
      type: object
      properties:
        ids:
          description: List of favorite IDs in the desired order
          example:
            - 5e9f8f8f8f8f8f8f8f8f8f8
            - 5e9f8f8f8f8f8f8f8f8f8f9
          type: array
          items:
            type: string
      required:
        - ids
    HealthDto:
      type: object
      properties:
        name:
          type: string
          description: Name of running service
          example: cv-api
        hostname:
          type: string
          example: cv-api-774dbc4955-696zc
        version:
          type: string
          description: Branch name (ref) and short commit hash
          example: develop-21173ca
      required:
        - name
        - hostname
        - version
    PushInfo:
      type: object
      properties:
        title:
          type: string
        subtitle:
          type: string
        body:
          type: string
        data:
          type: object
      required:
        - title
        - subtitle
        - body
        - data
    Notification:
      type: object
      properties:
        _id:
          type: string
        user_id:
          type: string
        type:
          type: string
          enum:
            - message
            - tag
        workspace_id:
          type: string
        channel_id:
          type: string
        parent_message_id:
          type: string
        message_id:
          type: string
        message:
          type: string
        created_on:
          format: date-time
          type: string
        created_at:
          format: date-time
          type: string
        from_user_id:
          type: string
        pushInfo:
          $ref: '#/components/schemas/PushInfo'
      required:
        - _id
        - user_id
        - type
        - workspace_id
        - channel_id
        - parent_message_id
        - message_id
        - message
        - created_on
        - created_at
        - from_user_id
        - pushInfo
    Map:
      type: object
      properties: {}
    Workspace:
      type: object
      properties:
        workspace_guid:
          type: string
        vanity_name:
          type: string
        workspace_name:
          type: string
        workspace_description:
          type: string
        image_url:
          type: string
        owner_guid:
          type: string
        type_cd:
          type: string
        created_by:
          type: string
        created_ts:
          type: number
        last_updated_ts:
          type: number
        creator_first_name:
          type: string
        creator_last_name:
          type: string
        role_cd:
          type: string
        plan_type:
          type: string
        channels:
          type: array
          items:
            type: string
        availableChannelCount:
          type: number
        collaborators:
          type: array
          items:
            type: string
        settings:
          $ref: '#/components/schemas/Map'
        phones:
          type: array
          items:
            type: string
      required:
        - workspace_guid
        - vanity_name
        - workspace_name
        - workspace_description
        - image_url
        - owner_guid
        - type_cd
        - created_by
        - created_ts
        - last_updated_ts
        - creator_first_name
        - creator_last_name
        - role_cd
        - plan_type
        - channels
        - availableChannelCount
        - collaborators
        - settings
        - phones
    ChannelCollaborator:
      type: object
      properties: {}
    AvatarLayout:
      type: object
      properties: {}
    Attachment:
      type: object
      properties:
        _id:
          type: string
        creator_id:
          type: string
        created_at:
          format: date-time
          type: string
        type:
          type: string
        link:
          type: string
        active_begin:
          format: date-time
          type: string
        active_end:
          format: date-time
          type: string
        filename:
          type: string
        mime_type:
          type: string
        length_in_bytes:
          type: number
        location:
          type: object
      required:
        - _id
        - creator_id
        - created_at
        - type
        - link
        - active_begin
        - active_end
        - filename
        - mime_type
        - length_in_bytes
        - location
    PersonalizedChannel:
      type: object
      properties:
        workspace_guid:
          type: string
        channel_guid:
          type: string
        channel_name:
          type: string
        channel_description:
          type: string
        bg_rrggbb:
          type: string
        txt_rrggbb:
          type: string
        channel_settings:
          type: string
        image_url:
          type: string
        is_private:
          type: string
        post_rule:
          type: string
        dm_hash:
          type: string
        last_updated_ts:
          type: number
        created_ts:
          type: number
        owner_name:
          type: string
        sms_phone:
          type: string
        json_collaborators:
          type: array
          items:
            $ref: '#/components/schemas/ChannelCollaborator'
        joined_ts:
          type: number
        is_favorite:
          type: string
          enum:
            - 'N'
            - 'Y'
        last_heard_ts:
          type: number
        last_posted_ts:
          type: number
        workspace_name:
          type: string
        workspace_image_url:
          type: string
        type:
          type: string
          enum:
            - directMessage
            - customerConversation
            - namedConversation
        images:
          type: array
          items:
            type: string
        moreCount:
          type: number
        unread_cnt:
          type: number
        avatars:
          $ref: '#/components/schemas/AvatarLayout'
        createdNew:
          type: object
        settings:
          $ref: '#/components/schemas/Map'
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
      required:
        - workspace_guid
        - channel_guid
        - channel_name
        - channel_description
        - bg_rrggbb
        - txt_rrggbb
        - channel_settings
        - image_url
        - is_private
        - post_rule
        - dm_hash
        - last_updated_ts
        - created_ts
        - owner_name
        - sms_phone
        - json_collaborators
        - joined_ts
        - is_favorite
        - last_heard_ts
        - last_posted_ts
        - workspace_name
        - workspace_image_url
        - type
        - images
        - moreCount
        - unread_cnt
        - avatars
        - createdNew
        - settings
        - attachments
    Contact:
      type: object
      properties: {}
    StartupResponse:
      type: object
      properties:
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/Notification'
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
        channels:
          type: array
          items:
            $ref: '#/components/schemas/PersonalizedChannel'
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/Contact'
      required:
        - notifications
        - workspaces
        - channels
        - contacts
    HomeResponse:
      type: object
      properties:
        success:
          type: boolean
        workspaces:
          type: array
          items:
            $ref: '#/components/schemas/Workspace'
        usedAccessToken:
          type: boolean
      required:
        - success
        - workspaces
        - usedAccessToken
    CreateLabel:
      type: object
      properties:
        name:
          type: string
        behavior:
          type: string
          enum:
            - removeOnListenStart
            - removeWhenHeard
            - persistent
        type:
          type: string
          enum:
            - personal
            - workspace
            - system
            - reaction
        space_guid:
          type: string
      required:
        - name
        - behavior
        - type
        - space_guid
    ClientLogDto:
      type: object
      properties:
        msg:
          type: string
        url:
          type: string
        line:
          type: number
      required:
        - msg
        - url
        - line
    StartChannelMessage:
      type: object
      properties: {}
    StartPrerecordedMessage:
      type: object
      properties: {}
    StartWelcomeMessage:
      type: object
      properties: {}
    UpdateMessageSummary:
      type: object
      properties:
        message_guid:
          type: string
        workspace_guid:
          type: string
        text:
          type: string
      required:
        - message_guid
        - workspace_guid
        - text
    SetMessageName:
      type: object
      properties: {}
    CreatePrerecordedMessage:
      type: object
      properties: {}
    MessageTranscript:
      type: object
      properties: {}
    AddAttachments:
      type: object
      properties: {}
    RequestAttachment:
      type: object
      properties: {}
    AddNotes:
      type: object
      properties: {}
    Tag:
      type: object
      properties: {}
    OAuth2Request:
      type: object
      properties:
        grant_type:
          type: string
          description: >-
            The type of grant you are requesting,
            "client_credentials","refresh_token","authorization_code"
        client_id:
          type: string
          description: The API Key given by the application
        client_secret:
          type: string
          description: The API Token given by the application
        exp:
          type: number
          description: >-
            The expiration time of the assertion, specified as seconds since
            00:00:00 UTC, January 1, 1970. This value has a maximum of 1 hour
            after the issued time.
        iat:
          type: number
          description: >-
            The time the assertion was issued, specified as seconds since
            00:00:00 UTC, January 1, 1970.
        scopes:
          description: The list of the permissions (tpApps) that the application requests.
          type: array
          items:
            type: string
        refresh_token:
          type: string
          description: The refresh token only when grant_type is set to "refresh_token"
        username:
          type: string
          description: The username only when grant_type is set to "refresh_token"
        password:
          type: string
          description: The password when grant_type is set to "password_grant"
        code:
          type: string
          description: >-
            The authorization code when grant_type is set to
            "authorization_code"
      required:
        - grant_type
        - client_id
        - client_secret
        - exp
        - iat
        - scopes
        - refresh_token
        - username
        - password
        - code
    OAuth2Response:
      type: object
      properties:
        access_token:
          type: string
          description: The generated access token
        token_type:
          type: string
          description: The type of token, in our case should always be "bearer"
        refresh_token:
          type: string
          description: The generated refresh token
        expires_in:
          type: number
          description: Number of seconds until the access token expires
        refresh_token_exp:
          type: number
          description: The list of the permissions (tpApps) that the application requests.
        scope:
          type: string
          description: Scopes you are allowed to use if any requested
      required:
        - access_token
        - token_type
        - refresh_token
        - expires_in
        - refresh_token_exp
        - scope
    Client:
      type: object
      properties: {}
    SearchParameters:
      type: object
      properties:
        label_guids:
          type: array
          items:
            type: string
        user_guids:
          type: array
          items:
            type: string
        begin_date:
          format: date-time
          type: string
        end_date:
          format: date-time
          type: string
        heardStatus:
          type: string
          enum:
            - heard
            - unheard
            - any
        limit:
          type: number
      required:
        - label_guids
        - user_guids
        - begin_date
        - end_date
        - heardStatus
        - limit
    Playlist:
      type: object
      properties:
        _id:
          type: string
        name:
          type: string
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        image_url:
          type: string
      required:
        - _id
        - name
        - search_parameters
        - image_url
    CreatePlaylist:
      type: object
      properties:
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        name:
          type: string
      required:
        - search_parameters
        - name
    Reaction:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        image_url:
          type: string
        code:
          type: string
        reaction_tts:
          type: string
      required:
        - id
        - name
        - image_url
        - code
        - reaction_tts
    ReplySummary:
      type: object
      properties: {}
    UtmData:
      type: object
      properties: {}
    ReactionSummary:
      type: object
      properties: {}
    Message:
      type: object
      properties:
        message_guid:
          type: string
        creator_guid:
          type: string
        duration_ms:
          type: number
        word_cloud:
          type: string
        message_ts:
          type: number
        last_updated_at:
          type: number
        keywords_txt:
          type: string
        message_url:
          type: string
        transcript_txt:
          type: string
        workspace_guid:
          type: string
        channel_guids:
          type: array
          items:
            type: string
        waveform_url:
          type: string
        waveform_percentages:
          type: array
          items:
            type: string
        creator_image_url:
          type: string
        creator_first_name:
          type: string
        creator_last_name:
          type: string
        reply_count:
          type: number
        reply_summary:
          $ref: '#/components/schemas/ReplySummary'
        parent_message_guid:
          type: string
        heard_ms:
          type: number
        heard_pct:
          type: number
        data:
          $ref: '#/components/schemas/UtmData'
        unheard_replies:
          type: number
        audio_route:
          type: string
        attachments:
          type: array
          items:
            type: string
        heard_status:
          type: array
          items:
            type: string
        notes:
          type: string
        settings:
          $ref: '#/components/schemas/Map'
        notify:
          type: boolean
        reaction_summary:
          $ref: '#/components/schemas/ReactionSummary'
        name:
          type: string
        transcription_timecodes:
          type: array
          items:
            type: string
        is_text_message:
          type: boolean
        unique_client_id:
          type: string
        status:
          type: string
      required:
        - message_guid
        - creator_guid
        - duration_ms
        - word_cloud
        - message_ts
        - last_updated_at
        - keywords_txt
        - message_url
        - transcript_txt
        - workspace_guid
        - channel_guids
        - waveform_url
        - waveform_percentages
        - creator_image_url
        - creator_first_name
        - creator_last_name
        - reply_count
        - reply_summary
        - parent_message_guid
        - heard_ms
        - heard_pct
        - data
        - unheard_replies
        - audio_route
        - attachments
        - heard_status
        - notes
        - settings
        - notify
        - reaction_summary
        - name
        - transcription_timecodes
        - is_text_message
        - unique_client_id
        - status
    SearchResults:
      type: object
      properties:
        messages:
          type: array
          items:
            $ref: '#/components/schemas/Message'
        success:
          type: boolean
        unheard_counts_by_channel:
          $ref: '#/components/schemas/Map'
      required:
        - messages
        - success
        - unheard_counts_by_channel
    ReceiveSMS:
      type: object
      properties: {}
