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

# Unsubscribe from an event

> Deletes the webhook subscription identified by `id` and stops deliveries to its URL.



## OpenAPI

````yaml developer/api-reference/openapi.json POST /integrations/developer/zapier/unsubscribe
openapi: 3.1.0
info:
  contact:
    email: support@messagedesk.com
    name: MessageDesk Support
    url: https://messagedesk.com
  description: >-
    The MessageDesk Developer API. Integration providers use it to read and
    write a workspace on a user's behalf. Zapier is the only supported provider
    today; endpoints are namespaced by provider under
    `/integrations/developer/{provider}`.
  title: MessageDesk API
  version: '1.0'
servers:
  - description: Production
    url: https://c3uezq47el.execute-api.us-west-2.amazonaws.com/main
security: []
tags:
  - description: >-
      Read-only lookups an integration uses while a user configures it: the
      workspaces they belong to, and the users, phone numbers and contact
      properties in a workspace.
    name: Context lookups
  - description: >-
      Write operations an integration performs on behalf of a user. Every
      request body carries the target workspace as `id` and names the calling
      provider in `developerProvider`.
    name: Actions
  - description: >-
      Event subscriptions for instant triggers, plus sample-data endpoints that
      return a workspace's most recent records (or generated placeholders when
      it has none) in exactly the shape the matching webhook delivers.
    name: Triggers
externalDocs:
  description: ''
  url: ''
paths:
  /integrations/developer/zapier/unsubscribe:
    post:
      tags:
        - Triggers
      summary: Unsubscribe from an event
      description: >-
        Deletes the webhook subscription identified by `id` and stops deliveries
        to its URL.
      operationId: unsubscribeWebhook
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/developer.DeveloperUnsubscribeWebhookRequest
              summary: request
              description: Subscription to delete
        description: Subscription to delete
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/entities.WebhookSubscription'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Missing or invalid bearer token
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: The authenticated user is not a member of the workspace
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Workspace or referenced record not found
        '422':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/validator.ValidationError'
                type: array
          description: Request body failed validation
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/openapi.ErrorResponse'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    developer.DeveloperUnsubscribeWebhookRequest:
      properties:
        id:
          description: The ID of the webhook subscription to unsubscribe from
          maxLength: 45
          type: string
        workspaceId:
          description: Workspace ID the subscription belongs to
          maxLength: 45
          type: string
      required:
        - id
        - workspaceId
      type: object
    entities.WebhookSubscription:
      properties:
        createdAt:
          type: string
        eventName:
          $ref: '#/components/schemas/enums.EventName'
          description: The name of the event that the webhook is subscribed to
        id:
          description: The unique identifier for the webhook
          type: string
        object:
          description: The object type
          type: string
        provider:
          $ref: '#/components/schemas/enums.DeveloperProvider'
          description: The provider of the webhook
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: Relationships
        tenantId:
          description: The tenant id that this webhook belongs to
          type: string
        updatedAt:
          type: string
        url:
          description: The URL of the webhook to send the request to
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace id that this webhook belongs to
          type: string
      type: object
    openapi.ErrorResponse:
      properties:
        error:
          description: Human-readable description of the failure
          example: workspace not found
          type: string
      type: object
    validator.ValidationError:
      properties:
        field:
          type: string
        message:
          type: string
      type: object
    enums.EventName:
      enum:
        - AddRemoveOptOutRequest
        - AdminDatabaseSeed
        - AuthUserUpdated
        - BrandCreated
        - BandwidthOrderWebhookReceived
        - BrandDeleted
        - BrandUpdated
        - BroadcastCreated
        - BroadcastDeleted
        - BroadcastMessageSendRequest
        - BroadcastMessageSent
        - BroadcastUpdated
        - CallForwarded
        - CallReceived
        - CampaignCreated
        - CampaignDeleted
        - CampaignUpdated
        - ClientDeployed
        - CommentCreated
        - CommentDeleted
        - CommentUpdated
        - ConsentCreated
        - ConsentDeleted
        - ConsentUpdated
        - ContactCreated
        - ContactDeleted
        - ContactUpdated
        - ContactPropertyCreated
        - ContactPropertyDeleted
        - ContactPropertyUpdated
        - ConversationAllUsersUnassigned
        - ConversationClosed
        - ConversationCreated
        - ConversationDeleted
        - ConversationLabelApplied
        - ConversationLabelRemoved
        - ConversationOpened
        - ConversationUpdated
        - ConversationUpdateLabelsAndUsers
        - ConversationUsersAssigned
        - EventCreated
        - EventDeleted
        - EventUpdated
        - EventStreamWebhookReceived
        - ExportCreated
        - ExportShard
        - ExportCompleted
        - FilterCreated
        - FilterDeleted
        - FilterUpdated
        - FlagCreated
        - FlagDeleted
        - FlagUpdated
        - ImportCreated
        - ImportShard
        - ImportCompleted
        - InboundCallWebhookReceived
        - InboundChannelBlocked
        - InboundChannelCreated
        - InboundChannelDeleted
        - InboundChannelUpdated
        - InboundComplianceReplyRequest
        - InboundMessageWebhookReceived
        - InboundWebhookReceived
        - InvitationCreated
        - InvitationDeleted
        - InvitationUpdated
        - LabelCreated
        - LabelDeleted
        - LabelUpdated
        - MediaCreated
        - MediaDeleted
        - MediaUpdated
        - MessageBlocked
        - MessageCreated
        - MessageDeleted
        - MessageDelivered
        - MessageFailed
        - MessageReceived
        - MessageReceivedUserNotificationRequest
        - MessageScheduled
        - MessageScheduleDeleted
        - MessageScheduleUpdated
        - MessageSent
        - MessageSendRequest
        - MessageUpdated
        - MessageDraftCreated
        - MessageDraftDeleted
        - MessageDraftUpdated
        - MessagesExported
        - MessageTagCreated
        - MessageTagDeleted
        - MessageTagUpdated
        - MessageTemplateCreated
        - MessageTemplateDeleted
        - MessageTemplateUpdated
        - MessageStatusWebhookReceived
        - MigratePhoneBW
        - MigrateFormattedPhoneBW
        - MigrationV1Started
        - MigrationV1Completed
        - MigrationV1Download
        - MigrationV1DownloadComplete
        - MigrationV1ProcessContacts
        - MigrationV1ProcessContactRow
        - MigrationV1ProcessExtensionOptions
        - MigrationV1ProcessExtensionOptionRow
        - MigrationV1ProcessMessages
        - MigrationV1ProcessMessageRow
        - MigrationV1ProcessMessageTemplates
        - MigrationV1ProcessMessageTemplateRow
        - MigrationV1ProcessOptOuts
        - MigrationV1ProcessOptOutRow
        - OptOutCreated
        - OptOutDeleted
        - OptOutUpdated
        - OutboundChannelCreated
        - OutboundChannelDeleted
        - OutboundChannelUpdated
        - RelayCreated
        - RelayDeleted
        - RelayTriggered
        - RelayUpdated
        - ScheduleCreated
        - ScheduleDeleted
        - ScheduleUpdated
        - SearchWorkspaceReindexRequest
        - SigningSecretCreated
        - SigningSecretDeleted
        - StripeWebhookReceived
        - StripeSubscriptionCanceled
        - StripeSubscriptionUpdated
        - SmsNumberCreated
        - SmsNumberDeleted
        - SmsNumberUpdated
        - SubscriptionCreated
        - SubscriptionDeleted
        - SubscriptionUpdated
        - TCRWebhookReceived
        - TelgorithmPhoneNumberStatusWebhookReceived
        - TenantCreated
        - TenantUpdated
        - TenantDeleted
        - ThreadCreated
        - ThreadUpdated
        - ThreadDeleted
        - Test
        - UnreadConversationsCountUpdated
        - UserConnected
        - UserDisconnected
        - UserCreated
        - UserDeleted
        - UserHasJoinedTheChannel
        - UserHasLeftTheChannel
        - UserLogin
        - UserStartedTyping
        - UserStoppedTyping
        - UserUpdated
        - UserMembershipCreated
        - UserMembershipDeleted
        - UserMembershipUpdated
        - UserNotificationCreated
        - UserNotificationDeleted
        - UserNotificationUpdated
        - UserRoleCreated
        - UserRoleDeleted
        - UserRoleUpdated
        - UserSettingCreated
        - UserSettingDeleted
        - UserSettingUpdated
        - WebhookSubscriptionCreated
        - WebhookSubscriptionDeleted
        - WorkspaceCreated
        - WorkspaceDeleted
        - WorkspaceMoved
        - WorkspaceUpdated
        - WorkspaceSettingCreated
        - WorkspaceSettingDeleted
        - WorkspaceSettingUpdated
        - '*'
      type: string
      x-enum-comments:
        EventNameAddRemoveOptOutRequest: >-
          Occurs on the 'MessageReceived' event, when message service dispatches
          async post processors
        EventNameAdminDatabaseSeed: An async request to seed the database with test data
        EventNameAuthUserUpdated: Occurs when the currently authenticated user updates their profile
        EventNameBandwidthOrderWebhookReceived: >-
          Bandwidth order update webhook (hosting import / port-in status
          changes)
        EventNameBrandCreated: Occurs when a brand is created by the brand service
        EventNameBrandDeleted: Occurs when a brand is deleted by the brand service
        EventNameBrandUpdated: >-
          Occurs when a brand's status changes (submit/refresh/webhook), for
          live UI updates
        EventNameBroadcastCreated: Occurs when a broadcast is created by the broadcast service
        EventNameBroadcastDeleted: Occurs when a broadcast is deleted by the broadcast service
        EventNameBroadcastMessageSendRequest: Occurs when doing a broadcast message send
        EventNameBroadcastMessageSent: Occurs when a broadcast message is sent via Messages Service
        EventNameBroadcastUpdated: Occurs when a broadcast is updated by the broadcast service
        EventNameCallForwarded: Occurs when a call is forwarded
        EventNameCallReceived: Occurs when a call is received
        EventNameCampaignCreated: Occurs when a campaign is created by the campaign service
        EventNameCampaignDeleted: Occurs when a campaign is deleted by the campaign service
        EventNameCampaignUpdated: >-
          Occurs when a campaign's status changes (submit/refresh/webhook), for
          live UI updates
        EventNameClientDeployed: Occurs when the client gets deployed
        EventNameCommentCreated: Occurs when a comment is created by the comment service
        EventNameCommentDeleted: Occurs when a comment is deleted by the comment service
        EventNameCommentUpdated: Occurs when a comment is updated by the comment service
        EventNameConsentCreated: Occurs when a consent is created by the consent service
        EventNameConsentDeleted: Occurs when a consent is deleted by the consent service
        EventNameConsentUpdated: Occurs when a consent is updated by the consent service
        EventNameContactCreated: Occurs when a contact is created by the contact service
        EventNameContactDeleted: Occurs when a contact is deleted by the contact service
        EventNameContactPropertyCreated: Occurs when a contact property is created by the contact service
        EventNameContactPropertyDeleted: Occurs when a contact property is deleted by the contact service
        EventNameContactPropertyUpdated: Occurs when a contact property is updated by the contact service
        EventNameContactUpdated: Occurs when a contact is updated by the contact service
        EventNameConversationAllUsersUnassigned: Occurs when all users are unassigned from a Conversation
        EventNameConversationClosed: Occurs when a conversation is closed
        EventNameConversationCreated: Occurs when a conversation is created by the conversation service
        EventNameConversationDeleted: Occurs when a conversation is deleted by the conversation service
        EventNameConversationLabelApplied: Occurs when a conversation has a label applied
        EventNameConversationLabelRemoved: Occurs when a conversation has a label removed
        EventNameConversationOpened: Occurs when a conversation opens
        EventNameConversationUpdateLabelsAndUsers: >-
          Occurs when a batch update for Conversations occurs for both users and
          labels
        EventNameConversationUpdated: Occurs when a conversation is updated by the conversation service
        EventNameConversationUsersAssigned: Occurs when a conversation has users assigned
        EventNameEventCreated: Occurs when an event is created by the event service
        EventNameEventDeleted: Occurs when an event is deleted by the event service
        EventNameEventStreamWebhookReceived: Occurs when a event stream webhook is received by the webhooks service
        EventNameEventUpdated: Occurs when an event is updated by the event service
        EventNameExportCompleted: Occurs when all shards of an export have been processed
        EventNameExportCreated: Occurs when an export job is created by the exports service
        EventNameExportShard: >-
          Occurs when the export planner emits a shard for the shard worker to
          process
        EventNameFilterCreated: Occurs when a filter is created by the contacts service
        EventNameFilterDeleted: Occurs when a filter is deleted by the contacts service
        EventNameFilterUpdated: Occurs when a filter is updated by the contacts service
        EventNameFlagCreated: Occurs when a flag is created by the flag service
        EventNameFlagDeleted: Occurs when a flag is deleted by the flag service
        EventNameFlagUpdated: Occurs when a flag is updated by the flag service
        EventNameImportCompleted: >-
          Occurs when all shards of an import have been processed by the imports
          service
        EventNameImportCreated: >-
          Occurs when an import job is created by the imports service (file
          uploaded, awaiting async processing)
        EventNameImportShard: >-
          Occurs when the import planner emits a shard of rows for the shard
          worker to process
        EventNameInboundCallWebhookReceived: Occurs when an inbound call webhook is received
        EventNameInboundChannelBlocked: Occurs when an inbound channel is blockedAt is set
        EventNameInboundChannelCreated: Occurs when an inbound channel is created by the channel service
        EventNameInboundChannelDeleted: Occurs when an inbound channel is deleted by the channel service
        EventNameInboundChannelUpdated: Occurs when an inbound channel is updated by the channel service
        EventNameInboundComplianceReplyRequest: >-
          Occurs on the 'MessageReceived' event, when message service dispatches
          async post processors
        EventNameInboundMessageWebhookReceived: >-
          Occurs when one of our message providers sends us an inbound message
          webhook
        EventNameInboundWebhookReceived: Occurs when an inbound workspace webhook is received
        EventNameInvitationCreated: Occurs when an invitation is created by the invitation service
        EventNameInvitationDeleted: Occurs when an invitation is deleted by the invitation service
        EventNameInvitationUpdated: Occurs when an invitation is updated by the invitation service
        EventNameLabelCreated: Occurs when a label is created by the label service
        EventNameLabelDeleted: Occurs when a label is deleted by the label service
        EventNameLabelUpdated: Occurs when a label is updated by the label service
        EventNameMediaCreated: Occurs when a media is created by the media service
        EventNameMediaDeleted: Occurs when a media is deleted by the media service
        EventNameMediaUpdated: Occurs when a media is updated by the media service
        EventNameMessageBlocked: >-
          Occurs when an inbound message is received from a blocked inbound
          channel (ie sender)
        EventNameMessageCreated: >-
          Occurs when a message is created by the message service, and not
          queued for sending
        EventNameMessageDeleted: Occurs when a message is deleted by the message service
        EventNameMessageDelivered: Occurs when a message is delivered by the message service
        EventNameMessageDraftCreated: Occurs when a message draft is created by the message service
        EventNameMessageDraftDeleted: Occurs when a message draft is deleted by the message service
        EventNameMessageDraftUpdated: Occurs when a message draft is updated by the message service
        EventNameMessageFailed: Occurs when a message fails to send by the message service
        EventNameMessageReceived: Occurs when an inbound message is received by the message service
        EventNameMessageReceivedUserNotificationRequest: >-
          Occurs when user notifications service fans out a MessageReceived
          alert to one workspace member
        EventNameMessageScheduleDeleted: Occurs when a outbound message schedule is deleted
        EventNameMessageScheduleUpdated: Occurs when a outbound message schedule is updated
        EventNameMessageScheduled: >-
          Occurs when a outbound message is scheduled to be sent via a provider
          by the message service
        EventNameMessageSendRequest: >-
          Occurs when a message has been queued for sending by the message
          service
        EventNameMessageSent: >-
          Occurs when a outbound message is sent via a provider by the message
          service
        EventNameMessageStatusWebhookReceived: >-
          Occurs when a message providers status webhook is received by the
          message service
        EventNameMessageTagCreated: Occurs when a message tag is created by the message tags service
        EventNameMessageTagDeleted: Occurs when a message tag is deleted by the message tags service
        EventNameMessageTagUpdated: Occurs when a message tag is updated by the message tags service
        EventNameMessageTemplateCreated: Occurs when a message template is created by the message service
        EventNameMessageTemplateDeleted: Occurs when a message template is deleted by the message service
        EventNameMessageTemplateUpdated: Occurs when a message template is updated by the message service
        EventNameMessageUpdated: Occurs when a message is updated by the message service
        EventNameMessagesExported: Occurs when a messages export completes
        EventNameMigrateFormattedPhoneBW: >-
          Occurs after our MigratePhoneBW event is fired and is just the same
          event but it now has workspace and tenant context so our numbers
          service can handle it
        EventNameMigratePhoneBW: >-
          Occurs when a phone migration request has been made by v1 for
          Bandwidth to process
        EventNameMigrationV1Completed: >-
          Occurs when a migration v1 process has completed by the migration
          service
        EventNameMigrationV1Download: >-
          Occurs when a migration v1 download is requested by the migration
          service
        EventNameMigrationV1DownloadComplete: >-
          Occurs when a migration v1 download is completed by the migration
          service
        EventNameMigrationV1ProcessContactRow: >-
          Occurs when a migration v1 contact row is being processed by the
          migration service
        EventNameMigrationV1ProcessContacts: >-
          Occurs when a migration v1 contacts csv is getting processed by the
          migration service // TODO(Isaiah): Make this event more generic so we
          can use it for other types of data imports like
          'EventNameMigrationV1ImportStarted'
        EventNameMigrationV1ProcessExtensionOptionRow: >-
          Occurs when a migration v1 extension option row is being processed by
          the migration service
        EventNameMigrationV1ProcessExtensionOptions: >-
          Occurs when a migration v1 extension options csv is getting processed
          by the migration service
        EventNameMigrationV1ProcessMessageRow: >-
          Occurs when a migration v1 message row is being processed by the
          migration service
        EventNameMigrationV1ProcessMessageTemplateRow: >-
          Occurs when a migration v1 message template row is being processed by
          the migration service
        EventNameMigrationV1ProcessMessageTemplates: >-
          Occurs when a migration v1 message templates csv is getting processed
          by the migration service
        EventNameMigrationV1ProcessMessages: >-
          Occurs when a migration v1 messages csv is getting processed by the
          migration service
        EventNameMigrationV1ProcessOptOutRow: >-
          Occurs when a migration v1 opt out row is being processed by the
          migration service
        EventNameMigrationV1ProcessOptOuts: >-
          Occurs when a migration v1 opt outs csv is getting processed by the
          migration service
        EventNameMigrationV1Started: >-
          Occurs when a migration v1 process has started by the migration
          service
        EventNameOptOutCreated: >-
          Occurs when an inbound channel opts out of an outbound channel and is
          created by the opt out service
        EventNameOptOutDeleted: >-
          Occurs when an inbound channel opts back into an outbound channel and
          is deleted by the opt out service
        EventNameOptOutUpdated: >-
          Occurs when an inbound channel opt out needs to be updated and is
          updated by the opt out service
        EventNameOutboundChannelCreated: Occurs when an outbound channel is created by the channel service
        EventNameOutboundChannelDeleted: Occurs when an outbound channel is deleted by the channel service
        EventNameOutboundChannelUpdated: Occurs when an outbound channel is updated by the channel service
        EventNameRelayCreated: Occurs when a relay is created by the relay service
        EventNameRelayDeleted: Occurs when a relay is deleted by the relay service
        EventNameRelayTriggered: Occurs when a relay is triggered by the relay service
        EventNameRelayUpdated: Occurs when a relay is updated by the relay service
        EventNameScheduleCreated: Occurs when a schedule is created by the schedule service
        EventNameScheduleDeleted: Occurs when a schedule is deleted by the schedule service
        EventNameScheduleUpdated: Occurs when a schedule is updated by the schedule service
        EventNameSearchWorkspaceReindexRequest: >-
          Occurs when nightly search reindex requests a reindex for one
          workspace
        EventNameSigningSecretCreated: Occurs when a signing secret is created by the developer service
        EventNameSigningSecretDeleted: Occurs when a signing secret is deleted by the developer service
        EventNameSmsNumberCreated: Occurs when a sms number is created by the numbers service
        EventNameSmsNumberDeleted: Occurs when a sms number is deleted by the numbers service
        EventNameSmsNumberUpdated: Occurs when a sms number is updated by the numbers service
        EventNameStripeSubscriptionCanceled: Occurs when a stripe subscription is canceled by the stripe service
        EventNameStripeSubscriptionUpdated: Occurs when a stripe subscription is updated by the stripe service
        EventNameStripeWebhookReceived: Occurs when a stripe webhook is received by the stripe service
        EventNameSubscriptionCreated: Occurs when a subscription is created by the subscription service
        EventNameSubscriptionDeleted: Occurs when a subscription is deleted by the subscription service
        EventNameSubscriptionUpdated: Occurs when a subscription is updated by the subscription service
        EventNameTCRWebhookReceived: A TCR (Campaign Registry) webhook was received by the webhooks service
        EventNameTelgorithmPhoneNumberStatusWebhookReceived: >-
          Telgorithm phone number status webhook (hosting / port-in status
          changes)
        EventNameTenantCreated: Occurs when a tenant is created by the tenant service
        EventNameTenantDeleted: Occurs when a tenant is deleted by the tenant service
        EventNameTenantUpdated: Occurs when a tenant is updated by the tenant service
        EventNameTest: Occurs when a test event is created by the test service
        EventNameThreadCreated: Occurs when a thread is created by the comment service
        EventNameThreadDeleted: Occurs when a thread is deleted by the comment service
        EventNameThreadUpdated: Occurs when a thread is updated by the comment service
        EventNameUnreadConversationsCountUpdated: Occurs when a conversation status is updated to 'read', or 'unread'.
        EventNameUserConnected: Occurs when a user comes online
        EventNameUserCreated: Occurs when a user is created by the user service
        EventNameUserDeleted: Occurs when a user is deleted by the user service
        EventNameUserDisconnected: Occurs when a user goes offline
        EventNameUserHasJoinedTheChannel: >-
          Occurs when a user has joined a websocket channel (typically handled
          client side)
        EventNameUserHasLeftTheChannel: >-
          Occurs when a user has left a websocket channel (typically handled
          client side)
        EventNameUserLogin: >-
          Occurs when a user has passed Cognito auth check during sign-in or
          refresh
        EventNameUserMembershipCreated: >-
          Occurs when a user membership is created by the user memberships
          service
        EventNameUserMembershipDeleted: >-
          Occurs when a user membership is deleted by the user memberships
          service
        EventNameUserMembershipUpdated: >-
          Occurs when a user membership is updated by the user memberships
          service
        EventNameUserNotificationCreated: >-
          Occurs when a user notification is created by the user notification
          service
        EventNameUserNotificationDeleted: >-
          Occurs when a user notification is deleted by the user notification
          service
        EventNameUserNotificationUpdated: >-
          Occurs when a user notification is updated by the user notification
          service
        EventNameUserRoleCreated: Occurs when a user role is created by the user service
        EventNameUserRoleDeleted: Occurs when a user role is deleted by the user service
        EventNameUserRoleUpdated: Occurs when a user role is updated by the user service
        EventNameUserSettingCreated: Occurs when a user setting is created by the user settings service
        EventNameUserSettingDeleted: Occurs when a user setting is deleted by the user settings service
        EventNameUserSettingUpdated: Occurs when a user setting is updated by the user settings service
        EventNameUserStartedTyping: >-
          Occurs when a user is typing in a Conversation inside of the inbox.
          Used for typing indicators.
        EventNameUserStoppedTyping: >-
          Occurs when a user is no longer typing in a Conversation inside of the
          inbox. Used for typing indicators.
        EventNameUserUpdated: Occurs when a user is updated by the user service
        EventNameWebhookSubscriptionCreated: Occurs when a webhook subscription is created by the developer service
        EventNameWebhookSubscriptionDeleted: Occurs when a webhook subscription is deleted by the developer service
        EventNameWildcard: A wildcard event used to listen to all events
        EventNameWorkspaceCreated: Occurs when a workspace is created by the workspace service
        EventNameWorkspaceDeleted: Occurs when a workspace is deleted by the workspace service
        EventNameWorkspaceMoved: >-
          Occurs when a workspace is moved from one tenant to another by the
          workspace service
        EventNameWorkspaceSettingCreated: >-
          Occurs when a workspace setting is created by the workspace settings
          service
        EventNameWorkspaceSettingDeleted: >-
          Occurs when a workspace setting is deleted by the workspace settings
          service
        EventNameWorkspaceSettingUpdated: >-
          Occurs when a workspace setting is updated by the workspace settings
          service
        EventNameWorkspaceUpdated: Occurs when a workspace is updated by the workspace service
      x-enum-varnames:
        - EventNameAddRemoveOptOutRequest
        - EventNameAdminDatabaseSeed
        - EventNameAuthUserUpdated
        - EventNameBrandCreated
        - EventNameBandwidthOrderWebhookReceived
        - EventNameBrandDeleted
        - EventNameBrandUpdated
        - EventNameBroadcastCreated
        - EventNameBroadcastDeleted
        - EventNameBroadcastMessageSendRequest
        - EventNameBroadcastMessageSent
        - EventNameBroadcastUpdated
        - EventNameCallForwarded
        - EventNameCallReceived
        - EventNameCampaignCreated
        - EventNameCampaignDeleted
        - EventNameCampaignUpdated
        - EventNameClientDeployed
        - EventNameCommentCreated
        - EventNameCommentDeleted
        - EventNameCommentUpdated
        - EventNameConsentCreated
        - EventNameConsentDeleted
        - EventNameConsentUpdated
        - EventNameContactCreated
        - EventNameContactDeleted
        - EventNameContactUpdated
        - EventNameContactPropertyCreated
        - EventNameContactPropertyDeleted
        - EventNameContactPropertyUpdated
        - EventNameConversationAllUsersUnassigned
        - EventNameConversationClosed
        - EventNameConversationCreated
        - EventNameConversationDeleted
        - EventNameConversationLabelApplied
        - EventNameConversationLabelRemoved
        - EventNameConversationOpened
        - EventNameConversationUpdated
        - EventNameConversationUpdateLabelsAndUsers
        - EventNameConversationUsersAssigned
        - EventNameEventCreated
        - EventNameEventDeleted
        - EventNameEventUpdated
        - EventNameEventStreamWebhookReceived
        - EventNameExportCreated
        - EventNameExportShard
        - EventNameExportCompleted
        - EventNameFilterCreated
        - EventNameFilterDeleted
        - EventNameFilterUpdated
        - EventNameFlagCreated
        - EventNameFlagDeleted
        - EventNameFlagUpdated
        - EventNameImportCreated
        - EventNameImportShard
        - EventNameImportCompleted
        - EventNameInboundCallWebhookReceived
        - EventNameInboundChannelBlocked
        - EventNameInboundChannelCreated
        - EventNameInboundChannelDeleted
        - EventNameInboundChannelUpdated
        - EventNameInboundComplianceReplyRequest
        - EventNameInboundMessageWebhookReceived
        - EventNameInboundWebhookReceived
        - EventNameInvitationCreated
        - EventNameInvitationDeleted
        - EventNameInvitationUpdated
        - EventNameLabelCreated
        - EventNameLabelDeleted
        - EventNameLabelUpdated
        - EventNameMediaCreated
        - EventNameMediaDeleted
        - EventNameMediaUpdated
        - EventNameMessageBlocked
        - EventNameMessageCreated
        - EventNameMessageDeleted
        - EventNameMessageDelivered
        - EventNameMessageFailed
        - EventNameMessageReceived
        - EventNameMessageReceivedUserNotificationRequest
        - EventNameMessageScheduled
        - EventNameMessageScheduleDeleted
        - EventNameMessageScheduleUpdated
        - EventNameMessageSent
        - EventNameMessageSendRequest
        - EventNameMessageUpdated
        - EventNameMessageDraftCreated
        - EventNameMessageDraftDeleted
        - EventNameMessageDraftUpdated
        - EventNameMessagesExported
        - EventNameMessageTagCreated
        - EventNameMessageTagDeleted
        - EventNameMessageTagUpdated
        - EventNameMessageTemplateCreated
        - EventNameMessageTemplateDeleted
        - EventNameMessageTemplateUpdated
        - EventNameMessageStatusWebhookReceived
        - EventNameMigratePhoneBW
        - EventNameMigrateFormattedPhoneBW
        - EventNameMigrationV1Started
        - EventNameMigrationV1Completed
        - EventNameMigrationV1Download
        - EventNameMigrationV1DownloadComplete
        - EventNameMigrationV1ProcessContacts
        - EventNameMigrationV1ProcessContactRow
        - EventNameMigrationV1ProcessExtensionOptions
        - EventNameMigrationV1ProcessExtensionOptionRow
        - EventNameMigrationV1ProcessMessages
        - EventNameMigrationV1ProcessMessageRow
        - EventNameMigrationV1ProcessMessageTemplates
        - EventNameMigrationV1ProcessMessageTemplateRow
        - EventNameMigrationV1ProcessOptOuts
        - EventNameMigrationV1ProcessOptOutRow
        - EventNameOptOutCreated
        - EventNameOptOutDeleted
        - EventNameOptOutUpdated
        - EventNameOutboundChannelCreated
        - EventNameOutboundChannelDeleted
        - EventNameOutboundChannelUpdated
        - EventNameRelayCreated
        - EventNameRelayDeleted
        - EventNameRelayTriggered
        - EventNameRelayUpdated
        - EventNameScheduleCreated
        - EventNameScheduleDeleted
        - EventNameScheduleUpdated
        - EventNameSearchWorkspaceReindexRequest
        - EventNameSigningSecretCreated
        - EventNameSigningSecretDeleted
        - EventNameStripeWebhookReceived
        - EventNameStripeSubscriptionCanceled
        - EventNameStripeSubscriptionUpdated
        - EventNameSmsNumberCreated
        - EventNameSmsNumberDeleted
        - EventNameSmsNumberUpdated
        - EventNameSubscriptionCreated
        - EventNameSubscriptionDeleted
        - EventNameSubscriptionUpdated
        - EventNameTCRWebhookReceived
        - EventNameTelgorithmPhoneNumberStatusWebhookReceived
        - EventNameTenantCreated
        - EventNameTenantUpdated
        - EventNameTenantDeleted
        - EventNameThreadCreated
        - EventNameThreadUpdated
        - EventNameThreadDeleted
        - EventNameTest
        - EventNameUnreadConversationsCountUpdated
        - EventNameUserConnected
        - EventNameUserDisconnected
        - EventNameUserCreated
        - EventNameUserDeleted
        - EventNameUserHasJoinedTheChannel
        - EventNameUserHasLeftTheChannel
        - EventNameUserLogin
        - EventNameUserStartedTyping
        - EventNameUserStoppedTyping
        - EventNameUserUpdated
        - EventNameUserMembershipCreated
        - EventNameUserMembershipDeleted
        - EventNameUserMembershipUpdated
        - EventNameUserNotificationCreated
        - EventNameUserNotificationDeleted
        - EventNameUserNotificationUpdated
        - EventNameUserRoleCreated
        - EventNameUserRoleDeleted
        - EventNameUserRoleUpdated
        - EventNameUserSettingCreated
        - EventNameUserSettingDeleted
        - EventNameUserSettingUpdated
        - EventNameWebhookSubscriptionCreated
        - EventNameWebhookSubscriptionDeleted
        - EventNameWorkspaceCreated
        - EventNameWorkspaceDeleted
        - EventNameWorkspaceMoved
        - EventNameWorkspaceUpdated
        - EventNameWorkspaceSettingCreated
        - EventNameWorkspaceSettingDeleted
        - EventNameWorkspaceSettingUpdated
        - EventNameWildcard
    enums.DeveloperProvider:
      enum:
        - zapier
      type: string
      x-enum-varnames:
        - DeveloperProviderZapier
    entities.Tenant:
      properties:
        companyAddress:
          type: string
        companyDescription:
          type: string
        companyEmail:
          type: string
        companyLogo:
          type: string
        companyName:
          type: string
        companyPhone:
          type: string
        companyWebsite:
          type: string
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        id:
          type: string
        object:
          type: string
        updatedAt:
          type: string
        userMemberships:
          description: Relationships
          items:
            $ref: '#/components/schemas/entities.UserMembership'
          type: array
          uniqueItems: false
        workspaces:
          items:
            $ref: '#/components/schemas/entities.Workspace'
          type: array
          uniqueItems: false
      type: object
    entities.Workspace:
      properties:
        address:
          type: string
        avatarUrl:
          type: string
        color:
          type: string
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        description:
          type: string
        email:
          type: string
        id:
          type: string
        name:
          type: string
        object:
          type: string
        outboundChannels:
          description: Relationships
          items:
            $ref: '#/components/schemas/entities.OutboundChannel'
          type: array
          uniqueItems: false
        phone:
          type: string
        stateOrProvince:
          type: string
        stripeCustomerId:
          type: string
        stripeSubscriptionId:
          type: string
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          type: string
        updatedAt:
          type: string
        userMemberships:
          items:
            $ref: '#/components/schemas/entities.UserMembership'
          type: array
          uniqueItems: false
        userRoles:
          items:
            $ref: '#/components/schemas/entities.UserRole'
          type: array
          uniqueItems: false
        website:
          type: string
        workspaceSettings:
          items:
            $ref: '#/components/schemas/entities.WorkspaceSetting'
          type: array
          uniqueItems: false
      type: object
    gorm.DeletedAt:
      properties:
        time:
          type: string
        valid:
          description: Valid is true if Time is not NULL
          type: boolean
      type: object
    entities.UserMembership:
      properties:
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        id:
          type: string
        invitations:
          items:
            $ref: '#/components/schemas/entities.Invitation'
          type: array
          uniqueItems: false
        object:
          type: string
        permissions:
          $ref: '#/components/schemas/entities.ResourcePermissions'
        status:
          $ref: '#/components/schemas/enums.UserMembershipStatus'
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          type: string
        updatedAt:
          type: string
        user:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        userId:
          type: string
        userRole:
          $ref: '#/components/schemas/entities.UserRole'
        userRoleId:
          type: string
        userSettings:
          items:
            $ref: '#/components/schemas/entities.UserSetting'
          type: array
          uniqueItems: false
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          type: string
      type: object
    entities.OutboundChannel:
      properties:
        address:
          description: >-
            The address of the communication channel (phone number, email
            address, etc.)
          type: string
        communicationType:
          $ref: '#/components/schemas/enums.CommunicationType'
          description: The type of communication channel (sms, email, chat, etc.)
        createdAt:
          description: The date and time the record was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The date and time the record was soft deleted
        description:
          description: An optional  description of the communication channel
          type: string
        id:
          description: The ULID of the channel
          type: string
        name:
          description: The optional name of the channel
          type: string
        newMessagesCount:
          description: The number of conversations with status 'unread'
          type: integer
        object:
          description: The object type "OutboundChannel"
          type: string
        smsNumber:
          $ref: '#/components/schemas/entities.SmsNumber'
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: Relationships
        tenantId:
          description: The tenant id the channel belongs to
          type: string
        updatedAt:
          description: The date and time the record was last updated
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace id the channel belongs to
          type: string
      type: object
    entities.UserRole:
      properties:
        admin:
          type: boolean
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        description:
          type: string
        id:
          type: string
        managed:
          type: boolean
        name:
          type: string
        object:
          type: string
        permissions:
          $ref: '#/components/schemas/entities.ResourcePermissions'
        tenantId:
          type: string
        updatedAt:
          type: string
        userMemberships:
          description: Relationships
          items:
            $ref: '#/components/schemas/entities.UserMembership'
          type: array
          uniqueItems: false
        workspaceId:
          type: string
      type: object
    entities.WorkspaceSetting:
      properties:
        createdAt:
          description: The time the setting was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the setting was soft deleted
        enabled:
          description: >-
            null indicates the setting is disabled, time indicates when the
            setting was enabled
          type: string
        id:
          description: The unique identifier for the setting
          type: string
        object:
          description: The object type
          type: string
        tenantId:
          description: The tenant id that this setting belongs to
          type: string
        title:
          description: The display name of the setting
          type: string
        type:
          $ref: '#/components/schemas/enums.DataType'
          description: The type used to decode the generic 'Value' field
        updatedAt:
          description: The time the setting was last updated
          type: string
        value:
          $ref: '#/components/schemas/entities.JSONB'
          description: The the generic data for the specific setting type
        workspaceId:
          description: The workspace id that this setting belongs to
          type: string
      type: object
    entities.Invitation:
      properties:
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        expiredAt:
          type: string
        id:
          type: string
        object:
          type: string
        status:
          $ref: '#/components/schemas/enums.InvitationStatus'
        tenantId:
          type: string
        updatedAt:
          type: string
        userMembership:
          $ref: '#/components/schemas/entities.UserMembership'
          description: Relationships
        userMembershipId:
          type: string
        workspaceId:
          type: string
      type: object
    entities.ResourcePermissions:
      properties:
        features:
          additionalProperties:
            $ref: '#/components/schemas/enums.AuthorizationRole'
          description: A map of feature names to authorization roles
          type: object
        labels:
          additionalProperties:
            $ref: '#/components/schemas/enums.AuthorizationRole'
          description: A map of labels ids to authorization roles
          type: object
        outboundChannels:
          additionalProperties:
            $ref: '#/components/schemas/enums.AuthorizationRole'
          description: A map of outbound channels ids to authorization roles
          type: object
        teammates:
          additionalProperties:
            $ref: '#/components/schemas/enums.AuthorizationRole'
          description: A map of user ids to authorization roles
          type: object
      type: object
    enums.UserMembershipStatus:
      enum:
        - active
        - pending
        - expired
        - suspended
      type: string
      x-enum-varnames:
        - UserMembershipStatusActive
        - UserMembershipStatusPending
        - UserMembershipStatusExpired
        - UserMembershipStatusSuspended
    entities.User:
      properties:
        address:
          type: string
        avatarUrl:
          type: string
        cognitoId:
          type: string
        company:
          type: string
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        email:
          type: string
        emailVerified:
          type: boolean
        firstName:
          type: string
        id:
          type: string
        lastInboundMessage:
          $ref: '#/components/schemas/entities.Message'
        lastName:
          type: string
        lastOutboundMessage:
          $ref: '#/components/schemas/entities.Message'
        notificationTokens:
          description: Relationships
          items:
            $ref: '#/components/schemas/entities.NotificationToken'
          type: array
          uniqueItems: false
        object:
          type: string
        phone:
          type: string
        phoneVerified:
          type: boolean
        properties:
          $ref: '#/components/schemas/entities.JSONB'
        ssoProviders:
          items:
            type: string
          type: array
          uniqueItems: false
        updatedAt:
          type: string
        userMemberships:
          items:
            $ref: '#/components/schemas/entities.UserMembership'
          type: array
          uniqueItems: false
        username:
          type: string
      type: object
    entities.UserSetting:
      properties:
        createdAt:
          description: The time the setting was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the setting was soft deleted
        enabled:
          description: >-
            null indicates the setting is enabled, time indicates when the
            setting was disabled
          type: string
        id:
          description: The unique identifier for the setting
          type: string
        object:
          $ref: '#/components/schemas/enums.DataType'
          description: The object type
        tenantId:
          description: The tenant id that this setting belongs to
          type: string
        title:
          description: The display name of the setting
          type: string
        type:
          $ref: '#/components/schemas/enums.DataType'
          description: The type used to decode the generic 'Value' field
        updatedAt:
          description: The time the setting was last updated
          type: string
        userId:
          description: The user id that this setting belongs to
          type: string
        userMembership:
          $ref: '#/components/schemas/entities.UserMembership'
          description: Relationships
        userMembershipId:
          description: The user membership id that this setting belongs to
          type: string
        value:
          $ref: '#/components/schemas/entities.JSONB'
          description: The generic data for the specific setting type
        workspaceId:
          description: The workspace id that this setting belongs to
          type: string
      type: object
    enums.CommunicationType:
      enum:
        - chat
        - comment
        - short_code
        - sms
        - email
        - voice
      type: string
      x-enum-varnames:
        - CommunicationTypeChat
        - CommunicationTypeComment
        - CommunicationTypeShortCode
        - CommunicationTypeSMS
        - CommunicationTypeEmail
        - CommunicationTypeVoice
    entities.SmsNumber:
      properties:
        callForwardingNumber:
          description: CallForwardingNumber is the phone number to forward calls to
          type: string
        campaignId:
          description: >-
            CampaignID is the id of the campaign that the sms number is
            associated with, doesn't apply to byoc or canadian only traffic
          type: string
        createdAt:
          description: CreatedAt is the time the sms number was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: DeletedAt is the time the sms number was deleted
        id:
          description: ID is the primary key for the sms number
          type: string
        metaData:
          $ref: '#/components/schemas/entities.JSONB'
          description: >-
            MetaData is the metadata for the sms number, used to store any
            additional data for the sms number that is provider specific
        number:
          description: Number is the phone number of the sms number
          type: string
        object:
          description: Object is the type of object, in this case "SmsNumber"
          type: string
        outboundChannel:
          $ref: '#/components/schemas/entities.OutboundChannel'
        outboundChannelId:
          description: >-
            OutboundChannelID is the id of the outbound channel to use for the
            sms number, is nullable as numbers may not be assigned to an
            outbound channel
          type: string
        provider:
          $ref: '#/components/schemas/enums.NumberProvider'
          description: Provider is the provider of the sms number
        status:
          $ref: '#/components/schemas/enums.NumberStatus'
          description: >-
            Status is the status of the sms number, used to determine if the sms
            number is active or not, doesn't apply to byoc
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: Relationships
        tenantId:
          description: >-
            TenantID is the id of the tenant that the sms number is associated
            with, is nullable as numbers may not be assigned to a tenant
          type: string
        tollFree:
          description: >-
            TollFree is true if the sms number is a toll free number, doesn't
            apply to byoc
          type: boolean
        updatedAt:
          description: UpdatedAt is the time the sms number was updated
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: >-
            WorkspaceID is the id of the workspace that the sms number is
            associated with, is nullable as numbers may not be assigned to a
            workspace
          type: string
      type: object
    enums.DataType:
      enum:
        - BandwidthWebhook
        - Broadcast
        - BroadcastMessageRequest
        - Brand
        - CallLog
        - Campaign
        - Comment
        - Consent
        - Contact
        - ContactProperty
        - Conversation
        - ConversationPreferences
        - Event
        - Export
        - ExportShardInput
        - Filter
        - Flag
        - Group
        - Import
        - ImportShardInput
        - InboundCallReceivedWebhook
        - InboundChannel
        - InboundWebhookPayload
        - InboxAutomation
        - InboxDataPreference
        - InboxFeatureAccess
        - InboxNavigation
        - InboxPreferences
        - InboxSignature
        - Label
        - Map
        - Media
        - Message
        - MessageReceivedUserNotificationRequest
        - MessagesCreateDto
        - MessageDraft
        - MessageTemplate
        - MigrationV1
        - MigrationV1ContactRow
        - MigrationV1ExtensionOptionRow
        - MigrationV1MessageRow
        - MigrationV1MessageTemplateRow
        - MigrationV1OptOutRow
        - MigrationFailedRows
        - NewConversationStatus
        - NotificationToken
        - Number
        - OptOut
        - OutboundChannel
        - Relay
        - Schedule
        - SigningSecret
        - SmsNumber
        - StripeEvent
        - StripeSubscription
        - Subscription
        - Tag
        - TCRWebhook
        - TelgorithmWebhook
        - Tenant
        - Thread
        - TypingUser
        - TwilioWebhook
        - UnreadConversationsReport
        - User
        - UserMembership
        - UserNotification
        - UserNotificationPreferences
        - UserRole
        - UserSession
        - UserSetting
        - WebsocketIdentity
        - Workspace
        - WorkspaceAutomationSettings
        - WorkspaceBrand
        - WorkspaceSetting
      type: string
      x-enum-varnames:
        - DataTypeBandwidthWebhook
        - DataTypeBroadcast
        - DataTypeBroadcastMessageRequest
        - DataTypeBrand
        - DataTypeCallLog
        - DataTypeCampaign
        - DataTypeComment
        - DataTypeConsent
        - DataTypeContact
        - DataTypeContactProperty
        - DataTypeConversation
        - DataTypeConversationPreferences
        - DataTypeEvent
        - DataTypeExport
        - DataTypeExportShardInput
        - DataTypeFilter
        - DataTypeFlag
        - DataTypeGroup
        - DataTypeImport
        - DataTypeImportShardInput
        - DataTypeInboundCallReceivedWebhook
        - DataTypeInboundChannel
        - DataTypeInboundWebhookPayload
        - DataTypeInboxAutomation
        - DataTypeInboxDataPreference
        - DataTypeInboxFeatureAccess
        - DataTypeInboxNavigation
        - DataTypeInboxPreferences
        - DataTypeInboxSignature
        - DataTypeLabel
        - DataTypeMap
        - DataTypeMedia
        - DataTypeMessage
        - DataTypeMessageReceivedUserNotificationRequest
        - DataTypeMessagesCreateDto
        - DataTypeMessageDraft
        - DataTypeMessageTemplate
        - DataTypeMigrationV1
        - DataTypeMigrationV1ContactRow
        - DataTypeMigrationV1ExtensionOptionRow
        - DataTypeMigrationV1MessageRow
        - DataTypeMigrationV1MessageTemplateRow
        - DataTypeMigrationV1OptOutRow
        - DataTypeMigrationFailedRows
        - DataTypeNewConversationStatus
        - DataTypeNotificationToken
        - DataTypeNumber
        - DataTypeOptOut
        - DataTypeOutboundChannel
        - DataTypeRelay
        - DataTypeSchedule
        - DataTypeSigningSecret
        - DataTypeSmsNumber
        - DataTypeStripeEvent
        - DataTypeStripeSubscription
        - DataTypeSubscription
        - DataTypeTag
        - DataTypeTCRWebhook
        - DataTypeTelgorithmWebhook
        - DataTypeTenant
        - DataTypeThread
        - DataTypeTypingUser
        - DataTypeTwilioWebhook
        - DataTypeUnreadConversationsReport
        - DataTypeUser
        - DataTypeUserMembership
        - DataTypeUserNotification
        - DataTypeUserNotificationPreferences
        - DataTypeUserRole
        - DataTypeUserSession
        - DataTypeUserSetting
        - DataTypeWebsocketIdentity
        - DataTypeWorkspace
        - DataTypeWorkspaceAutomationSettings
        - DataTypeWorkspaceBrand
        - DataTypeWorkspaceSetting
    entities.JSONB:
      additionalProperties: {}
      type: object
    enums.InvitationStatus:
      enum:
        - active
        - pending
        - expired
        - suspended
      type: string
      x-enum-varnames:
        - InvitationStatusActive
        - InvitationStatusPending
        - InvitationStatusExpired
        - InvitationStatusSuspended
    enums.AuthorizationRole:
      enum:
        - owner
        - viewer
        - editor
        - blocked
      type: string
      x-enum-varnames:
        - AuthorizationRoleOwner
        - AuthorizationRoleViewer
        - AuthorizationRoleEditor
        - AuthorizationRoleBlocked
    entities.Message:
      properties:
        author:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        billable:
          description: Indicates if the message is billable.
          type: boolean
        broadcast:
          $ref: '#/components/schemas/entities.Broadcast'
        broadcastId:
          description: The broadcast that sent the message
          type: string
        communicationType:
          $ref: '#/components/schemas/enums.CommunicationType'
          description: The type of communication (sms, email, etc)
        conversation:
          $ref: '#/components/schemas/entities.Conversation'
        conversationId:
          description: The conversation the message belongs to
          type: string
        createdAt:
          description: The time the message was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the message was deleted
        deliveredAt:
          description: When the message was delivered to the recipient
          type: string
        fallbacks:
          description: A list of tag fallbacks to use if tag data is not found
          items:
            $ref: '#/components/schemas/entities.Tag'
          type: array
          uniqueItems: false
        from:
          description: The sender of the message (phone number, email, etc)
          type: string
        group:
          description: A list of addresses to send the group message to
          items:
            type: string
          type: array
          uniqueItems: false
        id:
          description: The unique identifier of the message
          type: string
        media:
          description: The media urls attached to the message
          items:
            type: string
          type: array
          uniqueItems: false
        multipartId:
          description: The provider ID of the multipart message
          type: string
        multipartNum:
          description: The number of the message part in a multipart message
          type: integer
        object:
          description: The object type
          type: string
        outbound:
          description: Indicates if the message is outbound or inbound
          type: boolean
        priority:
          $ref: '#/components/schemas/enums.MessagePriority'
          description: >-
            The priority of the message. A higher priority message will be sent
            before a lower priority message
        provider:
          $ref: '#/components/schemas/enums.MessageProvider'
          description: The provider used to send the message
        providerErr:
          description: An error string returned by the provider
          type: string
        providerId:
          description: The external provider message ID
          type: string
        providerRef:
          description: >-
            The reference we use to track workspace and message context in send
            callbacks
          type: string
        reactions:
          items:
            $ref: '#/components/schemas/entities.Reaction'
          type: array
          uniqueItems: false
        readAt:
          description: When the message was read at by the recipient
          type: string
        relay:
          $ref: '#/components/schemas/entities.Relay'
        relayId:
          description: The relay that sent the message
          type: string
        segmentCount:
          description: The number of sms segments in the message
          type: integer
        smsType:
          $ref: '#/components/schemas/enums.SmsType'
          description: Indicates if the message is an SMS or MMS
        standardErr:
          description: >-
            The MessageDesk error code used to standarize message provider
            errors
          type: integer
        status:
          $ref: '#/components/schemas/enums.MessageStatus'
          description: The status of the message (created, sent, delivered, failed, etc)
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          description: The tenant the message belongs to
          type: string
        text:
          description: The message text
          type: string
        thread:
          $ref: '#/components/schemas/entities.Thread'
          description: Child Thread where Thread->ParentID == Comment->ID
        to:
          description: The recipient of the message (phone number, email, etc)
          type: string
        updatedAt:
          description: The time the message was last updated
          type: string
        userId:
          description: >-
            The user who sent the outbound message. Empty indicates an inbound
            message which is not associated with a user
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace the message belongs to
          type: string
      type: object
    entities.NotificationToken:
      properties:
        createdAt:
          description: The time the notification token was created
          type: string
        id:
          description: The unique identifier for the notification token
          type: string
        object:
          $ref: '#/components/schemas/enums.DataType'
          description: The object type
        token:
          description: The actual token of the notification token
          type: string
        updatedAt:
          description: The time the notification token was last updated
          type: string
        user:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        userId:
          description: The user id that this notification token belongs to
          type: string
      type: object
    enums.NumberProvider:
      enum:
        - bandwidth
        - twilio
        - twilioByoc
        - telgorithm
      type: string
      x-enum-comments:
        NumberProviderTelgorithm: >-
          Telgorithm is our own numbers that MessageDesk owns in it's own
          Telgorithm account
        NumberProviderTwilio: >-
          Twilio is our own numbers that MessageDesk owns in it's own Twilio
          account
        NumberProviderTwilioBYOC: >-
          twilioByoc are numbers owned by a customer which have their own Twilio
          account that we access via pub/priv key
      x-enum-varnames:
        - NumberProviderBandwidth
        - NumberProviderTwilio
        - NumberProviderTwilioBYOC
        - NumberProviderTelgorithm
    enums.NumberStatus:
      enum:
        - assigned
        - failedHosting
        - failedPortIn
        - numberInactive
        - pendingCampaignAssociation
        - pendingHosting
        - pendingPortIn
        - provisioning
        - ready
      type: string
      x-enum-comments:
        NumberStatusAssigned: indicates the number is assigned and ready to be used
        NumberStatusFailedHosting: indicates the number failed hosting
        NumberStatusFailedPortIn: indicates the number failed port-in
        NumberStatusNumberInactive: >-
          indicates the number is inactive, could be intentional or due to
          snapback
        NumberStatusPendingCampaignAssociation: indicates the number is pending a campaign association
        NumberStatusPendingHosting: indicates the number is pending hosting
        NumberStatusPendingPortIn: indicates the number is pending a port-in
        NumberStatusProvisioning: indicates the number has been ordered, but not completed
        NumberStatusReady: >-
          indicates the number is ready to be used (ie is not assigned to a
          channel)
      x-enum-varnames:
        - NumberStatusAssigned
        - NumberStatusFailedHosting
        - NumberStatusFailedPortIn
        - NumberStatusNumberInactive
        - NumberStatusPendingCampaignAssociation
        - NumberStatusPendingHosting
        - NumberStatusPendingPortIn
        - NumberStatusProvisioning
        - NumberStatusReady
    entities.Broadcast:
      properties:
        conversationIds:
          description: The conversations the broadcast is sent to. This can be empty.
          items:
            type: string
          type: array
          uniqueItems: false
        createdAt:
          description: The time the broadcast was created
          type: string
        createdById:
          description: The user that created the broadcast
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the broadcast was deleted
        deliveredAt:
          description: The time the broadcast was finished sending
          type: string
        excludeConversationIds:
          description: The conversations the broadcast should ignore. This can be empty.
          items:
            type: string
          type: array
          uniqueItems: false
        excludeGroupIds:
          description: The group ids the broadcast should ignore. This can be empty.
          items:
            type: string
          type: array
          uniqueItems: false
        groupIds:
          description: The group ids the broadcast is sent to. This can be empty.
          items:
            type: string
          type: array
          uniqueItems: false
        id:
          description: The unique ulid of the broadcast
          type: string
        media:
          description: The list of media we use to assemble the broadcast message
          items:
            type: string
          type: array
          uniqueItems: false
        name:
          description: The name of the broadcast
          type: string
        object:
          description: The object type
          type: string
        scheduleId:
          description: The schedule id the broadcast belongs to
          type: string
        startedAt:
          description: The time the broadcast was started
          type: string
        status:
          $ref: '#/components/schemas/enums.BroadcastStatus'
          description: The current status of the broadcast
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: The tenant the broadcast belongs to
        tenantId:
          description: The tenant the broadcast belongs to
          type: string
        text:
          description: The test we use to assemble the broadcast message
          type: string
        totalDelivered:
          description: The total number of messages that were delivered
          type: integer
        totalFailed:
          description: The total number of messages that failed to send
          type: integer
        totalOptedOut:
          description: The total number of messages that were opted out and not sent
          type: integer
        totalSent:
          description: The total number of messages sent
          type: integer
        updatedAt:
          description: The time the broadcast was last updated
          type: string
        user:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
          description: The workspace the broadcast belongs to
        workspaceId:
          description: The workspace the broadcast belongs to
          type: string
      type: object
    entities.Conversation:
      properties:
        assignedUserIds:
          description: The ids of users who are assigned to the conversation
          items:
            type: string
          type: array
          uniqueItems: false
        communicationType:
          $ref: '#/components/schemas/enums.CommunicationType'
          description: The type of conversation
        createdAt:
          description: The time the conversation was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the conversation was soft deleted
        id:
          description: The unique ulid of the conversation
          type: string
        inboundChannelAddresses:
          description: >-
            Composite key of the Inbound Channel's addresses sorted and
            hyphenated
          type: string
        inboundChannels:
          items:
            $ref: '#/components/schemas/entities.InboundChannel'
          type: array
          uniqueItems: false
        labels:
          description: The label ids that the conversation belongs to
          items:
            type: string
          type: array
          uniqueItems: false
        lastInboundMessage:
          $ref: '#/components/schemas/entities.Message'
          description: The last inbound message posted to the conversation
        lastMessage:
          $ref: '#/components/schemas/entities.Message'
          description: The last message posted to the conversation
        lastMessageTime:
          description: Nullable timestamp of when the last message was sent
          type: string
        lastOutboundMessage:
          $ref: '#/components/schemas/entities.Message'
          description: The last outbound message posted to the conversation
        name:
          description: The optional name of the conversation
          type: string
        object:
          description: The object type
          type: string
        outboundChannel:
          $ref: '#/components/schemas/entities.OutboundChannel'
          description: Relationships
        outboundChannelId:
          description: The id of the outbound communication channel message are sent from
          type: string
        status:
          $ref: '#/components/schemas/enums.ConversationStatus'
          description: The status of the conversation
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          description: The tenant id the conversation belongs to
          type: string
        updatedAt:
          description: The time the conversation was last updated
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace id the conversation belongs to
          type: string
      type: object
    entities.Tag:
      properties:
        createdAt:
          description: The created at timestamp
          type: string
        dataType:
          $ref: '#/components/schemas/enums.DataType'
          description: The data entity type where the tag will retrieve real data
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The deleted at timestamp
        displayName:
          description: When set, this will be displayed instead of the template in the UI
          type: string
        fallback:
          description: The fallback value to use if the tag data is empty or not found
          type: string
        id:
          description: The ulid for the tag
          type: string
        key:
          description: >-
            The dot delimited key that will be used to retrieve the value for
            the tag
          type: string
        object:
          description: The object type of the tag
          type: string
        template:
          description: The templated text we search for in the message
          type: string
        updatedAt:
          description: The updated at timestamp
          type: string
        workspaceId:
          description: The workspace id the tag belongs to
          type: string
      type: object
    enums.MessagePriority:
      enum:
        - normal
        - high
      type: string
      x-enum-varnames:
        - MessagePriorityNormal
        - MessagePriorityHigh
    enums.MessageProvider:
      enum:
        - bandwidth
        - twilio
        - twilioByoc
        - telgorithm
      type: string
      x-enum-comments:
        MessageProviderTelgorithm: >-
          Telgorithm is our own numbers that MessageDesk owns in it's own
          Telgorithm account
        MessageProviderTwilio: >-
          twilio is our own numbers that MessageDesk owns in it's own Twilio
          account
        MessageProviderTwilioBYOC: >-
          twilioByoc are numbers owned by a customer which have their own Twilio
          account that we access via pub/priv key
      x-enum-varnames:
        - MessageProviderBandwidth
        - MessageProviderTwilio
        - MessageProviderTwilioBYOC
        - MessageProviderTelgorithm
    entities.Reaction:
      properties:
        content:
          description: The emoji used for the reaction
          type: string
        userIds:
          description: The list of user ids that reacted
          items:
            type: string
          type: array
          uniqueItems: false
      type: object
    entities.Relay:
      properties:
        actions:
          description: The actions to perform when the relay is executed
          items:
            $ref: '#/components/schemas/entities.RelayAction'
          type: array
          uniqueItems: false
        activeHours:
          $ref: '#/components/schemas/entities.RelayActiveHours'
          description: >-
            The day and times the relay is active (nullable). A null value
            indicates

            the relay is active at all times.
        color:
          description: The color of the relay
          type: string
        conditions:
          description: The conditions that must be met for the relay to execute
          items:
            $ref: '#/components/schemas/entities.RelayCondition'
          type: array
          uniqueItems: false
        createdAt:
          description: The time when the relay was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time when the relay was soft deleted
        description:
          description: The custom description of the relay
          type: string
        eventName:
          $ref: '#/components/schemas/enums.EventName'
          description: The required event name to trigger the relay
        icon:
          description: The icon of the relay
          type: string
        id:
          description: The unique ULID identifier of the relay
          type: string
        lastTriggeredAt:
          description: The last time the relay was triggered
          type: string
        name:
          description: The custom name of the relay
          type: string
        object:
          description: The object type of the relay
          type: string
        order:
          description: The order the relay is executed in
          type: integer
        pausedAt:
          description: The time when the relay was paused/disabled
          type: string
        relayType:
          $ref: '#/components/schemas/enums.RelayType'
          description: The type of relay
        stopOnSuccess:
          description: If true, the relay will stop processing if any action is successful
          type: boolean
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: Relationships
        tenantId:
          description: The tenant the relay belongs to
          type: string
        updatedAt:
          description: The time when the relay was last updated
          type: string
        userId:
          description: The user id required if relay type is 'user'
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace the relay belongs to
          type: string
      type: object
    enums.SmsType:
      enum:
        - sms
        - mms
      type: string
      x-enum-varnames:
        - SmsTypeSMS
        - SmsTypeMMS
    enums.MessageStatus:
      enum:
        - blocked
        - created
        - delivered
        - failed
        - queued
        - received
        - sent
        - unknown
      type: string
      x-enum-comments:
        MessageStatusBlocked: >-
          An inbound message has been blocked because the sender has been
          blocked
        MessageStatusCreated: An outbound message has been created, but not sent or queued
        MessageStatusDelivered: An outbound message has been delivered to the recipient
        MessageStatusFailed: An outbound message failed to send
        MessageStatusQueued: An outbound message has been queued for sending
        MessageStatusReceived: An inbound message has been received, and saved to the database.
        MessageStatusSent: An outbound message has been via one of our message providers
        MessageStatusUnknown: >-
          Message status is unknown because a provider sent us an unhandled
          status
      x-enum-varnames:
        - MessageStatusBlocked
        - MessageStatusCreated
        - MessageStatusDelivered
        - MessageStatusFailed
        - MessageStatusQueued
        - MessageStatusReceived
        - MessageStatusSent
        - MessageStatusUnknown
    entities.Thread:
      properties:
        comments:
          description: Children comments where Comment->ThreadID == Thread->ID
          items:
            $ref: '#/components/schemas/entities.Comment'
          type: array
          uniqueItems: false
        createdAt:
          description: The time the message was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the message was deleted
        id:
          description: The unique identifier of the message
          type: string
        lastReplyText:
          type: string
        object:
          description: The object type
          type: string
        parentId:
          type: string
        parentType:
          $ref: '#/components/schemas/enums.DataType'
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
          description: Relationships
        tenantId:
          description: The tenant the message belongs to
          type: string
        updatedAt:
          description: The time the message was last updated
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace the message belongs to
          type: string
      type: object
    enums.BroadcastStatus:
      enum:
        - created
        - sending
        - scheduled
        - completed
      type: string
      x-enum-varnames:
        - BroadcastStatusCreated
        - BroadcastStatusSending
        - BroadcastStatusScheduled
        - BroadcastStatusCompleted
    entities.InboundChannel:
      properties:
        address:
          description: The phone number, email address, chat ID, etc.
          type: string
        blockedAt:
          description: The data and time the inbound channel was blocked
          type: string
        blockedBy:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        blockedById:
          description: The id of the user that blocked the inbound channel
          type: string
        carrier:
          description: The provider of the inbound channel (e.g. ATT, Verizon, etc.)
          type: string
        communicationType:
          $ref: '#/components/schemas/enums.CommunicationType'
          description: The type of communication channel (e.g. SMS, Email, Chat, etc.)
        contact:
          $ref: '#/components/schemas/entities.Contact'
        contactId:
          description: The id of the contact
          type: string
        conversations:
          items:
            $ref: '#/components/schemas/entities.Conversation'
          type: array
          uniqueItems: false
        createdAt:
          description: The date and time the inbound channel was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The date and time the inbound channel was soft deleted
        id:
          description: The unique identifier for the inbound channel
          type: string
        isDefault:
          description: Indicates the default or preferred inbound channel
          type: boolean
        object:
          description: The object type
          type: string
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          description: The tenant the inbound channel belongs to
          type: string
        updatedAt:
          description: The date and time the inbound channel was last updated
          type: string
        verifiedAt:
          description: >-
            The date and time the inbound channel was verified. (i.e. the
            contact has

            completed a verififation workflow)
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace the inbound channel belongs to
          type: string
      type: object
    enums.ConversationStatus:
      enum:
        - closed
        - read
        - unread
        - replied
      type: string
      x-enum-varnames:
        - ConversationStatusClosed
        - ConversationStatusRead
        - ConversationStatusUnread
        - ConversationStatusReplied
    entities.RelayAction:
      properties:
        actionType:
          $ref: '#/components/schemas/enums.RelayActionType'
          description: The type of the action to perform
        data:
          $ref: '#/components/schemas/entities.JSONB'
          description: The data to pass to the action
        delay:
          $ref: '#/components/schemas/entities.RelayActionDelay'
          description: The delay in seconds to wait before executing the action
        eventData:
          description: >-
            Paths into the triggering event data used to populate dynamic action
            fields
          items:
            type: string
          type: array
          uniqueItems: false
        id:
          description: The unique ULID identifier of the action
          type: string
        order:
          description: The order of the action in the group
          minimum: 0
          type: integer
      required:
        - actionType
        - data
        - id
      type: object
    entities.RelayActiveHours:
      properties:
        flipLogic:
          type: boolean
        friday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        monday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        saturday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        sunday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        thursday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        timezone:
          $ref: '#/components/schemas/enums.Timezone'
        tuesday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
        wednesday:
          $ref: '#/components/schemas/entities.RelayDailyTimeRange'
      type: object
    entities.RelayCondition:
      properties:
        caseSensitive:
          description: If true, the match value will be checked case sensitively
          type: boolean
        id:
          description: The unique ULID identifier of the condition
          type: string
        logicalOperator:
          $ref: '#/components/schemas/enums.LogicalOperator'
          description: Logical operator for combining conditions in the group
        matchData:
          $ref: '#/components/schemas/entities.JSONB'
          description: Additional match criteria for use cases that require structured data
        matchValue:
          description: The value to check against the field
          maxLength: 255
          type: string
        operator:
          $ref: '#/components/schemas/enums.RelayOperator'
          description: The operator to use when checking the field against the value
        order:
          description: The order of the condition in the group
          minimum: 0
          type: integer
        useCase:
          $ref: '#/components/schemas/enums.RelayConditionUseCase'
          description: |-
            The type of condition to check
            The use case to use when checking the condition
      required:
        - id
        - logicalOperator
        - operator
        - useCase
      type: object
    enums.RelayType:
      enum:
        - workspace
        - user
      type: string
      x-enum-varnames:
        - RelayTypeWorkspace
        - RelayTypeUser
    entities.Comment:
      properties:
        author:
          $ref: '#/components/schemas/entities.User'
          description: Relationships
        conversation:
          $ref: '#/components/schemas/entities.Conversation'
        conversationId:
          description: The conversation the message belongs to
          type: string
        createdAt:
          description: The time the message was created
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
          description: The time the message was deleted
        id:
          description: The unique identifier of the message
          type: string
        media:
          description: The media urls attached to the message
          items:
            type: string
          type: array
          uniqueItems: false
        mentions:
          items:
            type: string
          type: array
          uniqueItems: false
        object:
          description: The object type
          type: string
        reactions:
          items:
            $ref: '#/components/schemas/entities.Reaction'
          type: array
          uniqueItems: false
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          description: The tenant the message belongs to
          type: string
        text:
          description: The message text
          type: string
        thread:
          $ref: '#/components/schemas/entities.Thread'
          description: Child Thread where Thread->ParentID == Comment->ID
        threadId:
          description: The parent Thread that this Comment belongs to
          type: string
        updatedAt:
          description: The time the message was last updated
          type: string
        userId:
          description: >-
            The user who sent the outbound message. Empty indicates an inbound
            message which is not associated with a user
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          description: The workspace the message belongs to
          type: string
      type: object
    entities.Contact:
      properties:
        addresses:
          items:
            $ref: '#/components/schemas/entities.Address'
          type: array
          uniqueItems: false
        avatarUrl:
          type: string
        company:
          type: string
        createdAt:
          type: string
        deletedAt:
          $ref: '#/components/schemas/gorm.DeletedAt'
        firstName:
          type: string
        flags:
          items:
            type: string
          type: array
          uniqueItems: false
        id:
          type: string
        inboundChannels:
          description: Relationships
          items:
            $ref: '#/components/schemas/entities.InboundChannel'
          type: array
          uniqueItems: false
        lastInboundMessage:
          $ref: '#/components/schemas/entities.Message'
        lastInboundMessageTime:
          type: string
        lastName:
          type: string
        lastOutboundMessage:
          $ref: '#/components/schemas/entities.Message'
        lastOutboundMessageTime:
          type: string
        object:
          type: string
        properties:
          $ref: '#/components/schemas/entities.JSONB'
        source:
          $ref: '#/components/schemas/enums.ContactSource'
        tenant:
          $ref: '#/components/schemas/entities.Tenant'
        tenantId:
          type: string
        updatedAt:
          type: string
        workspace:
          $ref: '#/components/schemas/entities.Workspace'
        workspaceId:
          type: string
      type: object
    enums.RelayActionType:
      enum:
        - assignTeammates
        - assignToSender
        - addLabelsToConversation
        - closeConversation
        - markConversationRead
        - markConversationUnread
        - openConversation
        - removeLabelsFromConversation
        - removeAllTeammatesFromConversation
        - removeTeammatesFromConversation
        - sendComment
        - sendMessage
        - sendWebhook
        - updateContactProperty
      type: string
      x-enum-varnames:
        - RelayActionTypeAssignTeammates
        - RelayActionTypeAssignToSender
        - RelayActionTypeAddLabelsToConversation
        - RelayActionTypeCloseConversation
        - RelayActionTypeMarkConversationRead
        - RelayActionTypeMarkConversationUnread
        - RelayActionTypeOpenConversation
        - RelayActionTypeRemoveLabelsFromConversation
        - RelayActionTypeRemoveAllTeammatesFromConversation
        - RelayActionTypeRemoveTeammatesFromConversation
        - RelayActionTypeSendComment
        - RelayActionTypeSendMessage
        - RelayActionTypeSendWebhook
        - RelayActionTypeUpdateContactProperty
    entities.RelayActionDelay:
      properties:
        delay:
          minimum: 1
          type: integer
        unit:
          $ref: '#/components/schemas/enums.RelayActionDelayUnit'
      required:
        - delay
        - unit
      type: object
    entities.RelayDailyTimeRange:
      properties:
        endTime:
          description: The end time of the daily time window
          type: string
        rangeType:
          $ref: '#/components/schemas/enums.RelayDailyTimeRangeType'
          description: >-
            Determines if the relay is run all day, closed all day, or a time
            range.
        startTime:
          description: The start time of the daily time window
          type: string
      required:
        - endTime
        - rangeType
        - startTime
      type: object
    enums.Timezone:
      enum:
        - America/Los_Angeles
        - America/Denver
        - America/Phoenix
        - America/Chicago
        - America/New_York
        - America/Anchorage
        - Pacific/Honolulu
        - UTC
        - America/Puerto_Rico
        - America/Halifax
      type: string
      x-enum-comments:
        AtlanticStandardTime: >-
          Canada has 6 timezones and this is 1 hour ahead of EST, canonically
          known as AtlanticStandardTime
        MoutainTimeAZ: Arizona doesn't follow DST so they have their own timezone
      x-enum-varnames:
        - PacificTime
        - MountainTime
        - MoutainTimeAZ
        - CentralTime
        - EasternTime
        - AlaskaTime
        - HawaiiTime
        - UTC
        - PuertoRicoTime
        - AtlanticStandardTime
    enums.LogicalOperator:
      enum:
        - AND
        - OR
      type: string
      x-enum-varnames:
        - LogicalOperatorAnd
        - LogicalOperatorOr
    enums.RelayOperator:
      enum:
        - contains
        - equals
        - notEquals
        - startsWith
        - endsWith
      type: string
      x-enum-varnames:
        - RelayOperatorContains
        - RelayOperatorEquals
        - RelayOperatorNotEquals
        - RelayOperatorStartsWith
        - RelayOperatorEndsWith
    enums.RelayConditionUseCase:
      enum:
        - MessageContainsText
        - FailureContainsText
        - CommentContainsText
        - OutboundChannelEquals
        - IsAnonymousConversation
        - IsNewConversation
        - IsUnassignedConversation
        - ConversationLabelEquals
        - ConversationLabelNameEquals
        - ConversationLabelActionEquals
        - TeammateAssigned
        - PropertyEqualsText
      type: string
      x-enum-varnames:
        - RelayConditionUseCaseMessageContainsText
        - RelayConditionUseCaseFailureContainsText
        - RelayConditionUseCaseCommentContainsText
        - RelayConditionUseCaseOutboundChannelEquals
        - RelayConditionUseCaseIsAnonymousConversation
        - RelayConditionUseCaseIsNewConversation
        - RelayConditionUseCaseIsUnassignedConversation
        - RelayConditionUseCaseConversationLabelEquals
        - RelayConditionUseCaseConversationLabelNameEquals
        - RelayConditionUseCaseConversationLabelActionEquals
        - RelayConditionUseCaseTeammateAssigned
        - RelayConditionUseCasePropertyEqualsText
    entities.Address:
      properties:
        city:
          type: string
        country:
          type: string
        countryCode:
          type: string
        defaultBilling:
          type: boolean
        defaultShipping:
          type: boolean
        id:
          type: string
        object:
          type: string
        postalCode:
          type: string
        postalCodeSuffix:
          type: string
        state:
          type: string
        street:
          type: string
      type: object
    enums.ContactSource:
      enum:
        - chat
        - client
        - crm
        - forms
        - import
        - qbo
        - seed
        - webhook
        - zapier
      type: string
      x-enum-varnames:
        - ContactSourceChat
        - ContactSourceClient
        - ContactSourceCrm
        - ContactSourceForms
        - ContactSourceImport
        - ContactSourceQbo
        - ContactSourceSeed
        - ContactSourceWebhook
        - ContactSourceZapier
    enums.RelayActionDelayUnit:
      enum:
        - minute
        - hour
        - day
        - week
        - month
        - year
      type: string
      x-enum-varnames:
        - RelayActionDelayUnitMinute
        - RelayActionDelayUnitHour
        - RelayActionDelayUnitDay
        - RelayActionDelayUnitWeek
        - RelayActionDelayUnitMonth
        - RelayActionDelayUnitYear
    enums.RelayDailyTimeRangeType:
      enum:
        - openAllDay
        - closedAllDay
        - timeRange
      type: string
      x-enum-varnames:
        - RelayDailyTimeRangeTypeOpenAllDay
        - RelayDailyTimeRangeTypeClosedAllDay
        - RelayDailyTimeRangeTypeTimeRange
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: >-
        An OAuth 2.0 access token, sent as `Authorization: Bearer <token>`.
        MessageDesk is the OAuth 2.0 provider (backed by AWS Cognito): an
        integration such as Zapier obtains the token through the
        authorization-code flow when a user connects their MessageDesk account.
        Access tokens are valid for 24 hours and are refreshed with the refresh
        token.
      scheme: bearer
      type: http

````