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

# Get Audit Logs

> Fetch all audit logs for a specific org.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json get /orgs/{org_id}/audit-logs
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
paths:
  /orgs/{org_id}/audit-logs:
    get:
      tags:
        - Orgs Audit-Logs
      summary: Get Audit Logs
      description: Fetch all audit logs for a specific org.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            $ref: '#/components/schemas/AuditLogActionFilterSchema'
          required: false
          description: Filter by action type
          name: action
          in: query
        - schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Filter logs from this date (inclusive), YYYY-MM-DD
          required: false
          description: Filter logs from this date (inclusive), YYYY-MM-DD
          name: from
          in: query
        - schema:
            type:
              - string
              - 'null'
            format: date-time
            description: Filter logs until this date (inclusive), YYYY-MM-DD
          required: false
          description: Filter logs until this date (inclusive), YYYY-MM-DD
          name: to
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Filter by user who performed the action
          required: false
          description: Filter by user who performed the action
          name: user_id
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Filter by affected assistant
          required: false
          description: Filter by affected assistant
          name: assistant_id
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Filter by affected agent
          required: false
          description: Filter by affected agent
          name: agent_id
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Filter by affected workflow
          required: false
          description: Filter by affected workflow
          name: workflow_id
          in: query
        - schema:
            type: string
            maxLength: 128
            description: Filter by affected connection
          required: false
          description: Filter by affected connection
          name: connection_id
          in: query
        - schema:
            type: number
          required: false
          description: Page number
          name: page
          in: query
        - schema:
            type: number
          required: false
          description: Number of items to take
          name: take
          in: query
        - schema:
            type: string
          required: false
          description: Next page token (Only used on special endpoints)
          name: next
          in: query
      responses:
        '200':
          description: An array of audit log entries.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AuditLogSchema'
components:
  schemas:
    AuditLogActionFilterSchema:
      type: string
      enum:
        - ALL
        - org.updated
        - org.deleted
        - org.disabled
        - org.enabled
        - org.restored
        - org.transferred
        - org.transferred_to
        - org.detached
        - org.detached_from
        - org.sub_org_created
        - org.sub_org_updated
        - org.sub_org_member_joined
        - org.sub_org_member_role_changed
        - member.invited
        - member.joined
        - member.removed
        - member.left
        - member.role_changed
        - role.created
        - role.updated
        - role.deleted
        - role.assigned
        - role.unassigned
        - assistant.created
        - assistant.updated
        - assistant.deleted
        - assistant.restored
        - assistant.duplicated
        - assistant.duplicated_from
        - agent.created
        - agent.updated
        - agent.deleted
        - agent.duplicated
        - action.created
        - action.deleted
        - action.enabled
        - action.disabled
        - channel.created
        - channel.deleted
        - channel.updated
        - channel.enabled
        - channel.disabled
        - broadcast.created
        - broadcast.deleted
        - broadcast.activated
        - broadcast.paused
        - domain.created
        - domain.deleted
        - email.domain.created
        - email.domain.deleted
        - sso.profile.created
        - sso.profile.updated
        - sso.profile.deleted
        - sso.profile.sessions.revoked
        - sso.domain.create_code_requested
        - sso.domain.delete_code_requested
        - sso.domain.created
        - sso.domain.updated
        - sso.domain.deleted
        - email.identity.created
        - email.identity.deleted
        - chat.deleted
        - workflow.created
        - workflow.deleted
        - workflow.restored
        - connection.created
        - connection.updated
        - connection.deleted
        - api_key.created
        - api_key.deleted
        - api_key.rotated
        - webhook.created
        - webhook.updated
        - webhook.deleted
        - webhook.secret_rotated
      description: Filter by action type
    AuditLogSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique audit log entry ID
        action:
          $ref: '#/components/schemas/AuditLogActionSchema'
        actor:
          allOf:
            - $ref: '#/components/schemas/UserLimitedSchema'
            - description: The user who performed the action
        user:
          allOf:
            - $ref: '#/components/schemas/UserLimitedSchema'
            - description: The user who performed the action
        assistant:
          allOf:
            - $ref: '#/components/schemas/PublicAssistantSchema'
            - description: Affected assistant ID
        agent:
          allOf:
            - $ref: '#/components/schemas/AgentLimitedSchema'
            - description: Affected agent
        workflow:
          $ref: '#/components/schemas/WorkflowPublicSchema'
        connection:
          $ref: '#/components/schemas/ConnectionPublicSchema'
        broadcast:
          $ref: '#/components/schemas/BroadcastPublicSchema'
        member:
          $ref: '#/components/schemas/OrgMemberWithLimitedUserSchema'
        org:
          $ref: '#/components/schemas/OrgPublicSchema'
        metadata:
          $ref: '#/components/schemas/AuditLogMetadataSchema'
        source:
          $ref: '#/components/schemas/AuditLogSourceSchema'
        ip:
          type:
            - string
            - 'null'
          description: IP address of the actor
        country:
          type:
            - string
            - 'null'
          description: Country code of the actor
        user_agent:
          type:
            - string
            - 'null'
          description: Browser user-agent string
        created_at:
          type: string
          format: date-time
          description: When the action was performed
      required:
        - id
        - action
        - source
        - ip
        - country
        - user_agent
        - created_at
    AuditLogActionSchema:
      type: string
      enum:
        - org.updated
        - org.deleted
        - org.disabled
        - org.enabled
        - org.restored
        - org.transferred
        - org.transferred_to
        - org.detached
        - org.detached_from
        - org.sub_org_created
        - org.sub_org_updated
        - org.sub_org_member_joined
        - org.sub_org_member_role_changed
        - member.invited
        - member.joined
        - member.removed
        - member.left
        - member.role_changed
        - role.created
        - role.updated
        - role.deleted
        - role.assigned
        - role.unassigned
        - assistant.created
        - assistant.updated
        - assistant.deleted
        - assistant.restored
        - assistant.duplicated
        - assistant.duplicated_from
        - agent.created
        - agent.updated
        - agent.deleted
        - agent.duplicated
        - action.created
        - action.deleted
        - action.enabled
        - action.disabled
        - channel.created
        - channel.deleted
        - channel.updated
        - channel.enabled
        - channel.disabled
        - broadcast.created
        - broadcast.deleted
        - broadcast.activated
        - broadcast.paused
        - domain.created
        - domain.deleted
        - email.domain.created
        - email.domain.deleted
        - sso.profile.created
        - sso.profile.updated
        - sso.profile.deleted
        - sso.profile.sessions.revoked
        - sso.domain.create_code_requested
        - sso.domain.delete_code_requested
        - sso.domain.created
        - sso.domain.updated
        - sso.domain.deleted
        - email.identity.created
        - email.identity.deleted
        - chat.deleted
        - workflow.created
        - workflow.deleted
        - workflow.restored
        - connection.created
        - connection.updated
        - connection.deleted
        - api_key.created
        - api_key.deleted
        - api_key.rotated
        - webhook.created
        - webhook.updated
        - webhook.deleted
        - webhook.secret_rotated
      description: The action that was performed
    UserLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type:
            - string
            - 'null'
        email:
          type: string
          format: email
        avatar:
          type:
            - string
            - 'null'
        seen_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - email
        - avatar
        - seen_at
      description: The assigned user for the conversation
    PublicAssistantSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        enabled:
          type: boolean
        avatar_url:
          type:
            - string
            - 'null'
        deleted:
          type: boolean
        config:
          $ref: '#/components/schemas/PublicAssistantConfigSchema'
      required:
        - id
        - name
        - enabled
        - avatar_url
        - deleted
        - config
      description: Schema for a public assistant
    AgentLimitedSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        icon:
          anyOf:
            - $ref: '#/components/schemas/PickerIconEmojiSchema'
            - type: string
              maxLength: 64
              pattern: ^[a-zA-Z0-9_-]+$
              description: >-
                The name of a curated icon a user can pick for a table, view,
                field, or other entity
              oneOf:
                - $ref: '#/components/schemas/PickerIconNameSchema'
            - type: 'null'
          description: >-
            A picked icon or emoji. Null = the generated face, unless a custom
            image is set.
        color:
          anyOf:
            - $ref: '#/components/schemas/ColorNameSchema'
            - type: 'null'
          description: >-
            The identity color, reused by every surface that carries the agent.
            Null when a custom image is set.
        shape:
          anyOf:
            - $ref: '#/components/schemas/AgentShapeSchema'
            - type: 'null'
          description: >-
            The silhouette of the generated face. Null when an icon or a custom
            image is set.
        avatar_url:
          type:
            - string
            - 'null'
          description: >-
            The agent as an image, either the custom picture or the PNG snapshot
            of its face or icon
      required:
        - id
        - name
        - icon
        - color
        - shape
        - avatar_url
      description: A reduced agent reference
    WorkflowPublicSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the workflow
        name:
          type: string
          description: Name of the workflow
        access:
          $ref: '#/components/schemas/WorkflowAccessTypeSchema'
        org_id:
          type: string
          description: Organization ID associated with the workflow
      required:
        - id
        - name
        - access
        - org_id
      description: Affected workflow ID
    ConnectionPublicSchema:
      type: object
      properties:
        id:
          type: string
          description: Connection ID
        type:
          $ref: '#/components/schemas/ConnectionTypeSchema'
        name:
          type:
            - string
            - 'null'
          description: Connection name
      required:
        - id
        - type
        - name
      description: Affected connection
    BroadcastPublicSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the broadcast
        name:
          type: string
          description: Name of the broadcast
      required:
        - id
        - name
      description: Affected broadcast
    OrgMemberWithLimitedUserSchema:
      type: object
      properties:
        id:
          type: string
          description: Member ID
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
        user:
          allOf:
            - $ref: '#/components/schemas/UserLimitedSchema'
            - description: Schema for a limited user
      required:
        - id
        - role
        - user
      description: Affected member
    OrgPublicSchema:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the org
        name:
          type: string
          description: Name of the org
        verified:
          type: boolean
          description: Verification status of the org
        logo_url:
          type:
            - string
            - 'null'
          description: URL of the organization logo
        plan:
          $ref: '#/components/schemas/OrgSubscriptionPlanSchema'
        config:
          $ref: '#/components/schemas/OrgConfigSchema'
        features:
          $ref: '#/components/schemas/OrgFeaturesConfigSchema'
        subscription_available:
          type: boolean
          description: >-
            Whether the org may still use paid features: it is subscribed, or
            its subscription ended inside the grace window. False once that
            window has passed.
        parent_org_id:
          type: string
          description: ID of the parent organization if this is a sub-org
      required:
        - id
        - name
        - verified
        - logo_url
      description: Public information about an org (organization)
    AuditLogMetadataSchema:
      oneOf:
        - $ref: '#/components/schemas/AuditLogOrgActionMemberInviteSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionMemberJoinSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionMemberRemoveSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionMemberLeftSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionMemberRoleChangeSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionRoleSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionRoleUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionRoleAssignmentSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionConnectionSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionConnectionUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAssistantSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAssistantUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAssistantRestoreSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAssistantDuplicatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAssistantDuplicatedFromSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAgentSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAgentUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionAgentDuplicatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionWorkflowSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionApiKeySchema'
        - $ref: '#/components/schemas/AuditLogOrgActionWebhookSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionActionSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionChannelSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionChannelUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionBroadcastSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionDomainSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionEmailDomainSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionEmailIdentitySchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSsoProfileSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSsoProfileUpdatedSchema'
        - $ref: >-
            #/components/schemas/AuditLogOrgActionSsoProfileSessionsRevokedSchema
        - $ref: '#/components/schemas/AuditLogOrgActionSsoDomainSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSsoDomainUpdatedSchema'
        - $ref: >-
            #/components/schemas/AuditLogOrgActionSsoDomainCreateCodeRequestedSchema
        - $ref: >-
            #/components/schemas/AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema
        - $ref: '#/components/schemas/AuditLogOrgActionChatSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgUpdateSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgDeleteSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgDisableSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgEnableSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgRestoreSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgTransferSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgTransferredToSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgDetachSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionOrgDetachedFromSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSubOrgCreatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSubOrgUpdatedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSubOrgMemberJoinedSchema'
        - $ref: '#/components/schemas/AuditLogOrgActionSubOrgMemberRoleChangedSchema'
      discriminator:
        propertyName: action
        mapping:
          member.invited:
            $ref: '#/components/schemas/AuditLogOrgActionMemberInviteSchema'
          member.joined:
            $ref: '#/components/schemas/AuditLogOrgActionMemberJoinSchema'
          member.removed:
            $ref: '#/components/schemas/AuditLogOrgActionMemberRemoveSchema'
          member.left:
            $ref: '#/components/schemas/AuditLogOrgActionMemberLeftSchema'
          member.role_changed:
            $ref: '#/components/schemas/AuditLogOrgActionMemberRoleChangeSchema'
          role.created:
            $ref: '#/components/schemas/AuditLogOrgActionRoleSchema'
          role.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionRoleSchema'
          role.updated:
            $ref: '#/components/schemas/AuditLogOrgActionRoleUpdatedSchema'
          role.assigned:
            $ref: '#/components/schemas/AuditLogOrgActionRoleAssignmentSchema'
          role.unassigned:
            $ref: '#/components/schemas/AuditLogOrgActionRoleAssignmentSchema'
          connection.created:
            $ref: '#/components/schemas/AuditLogOrgActionConnectionSchema'
          connection.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionConnectionSchema'
          connection.updated:
            $ref: '#/components/schemas/AuditLogOrgActionConnectionUpdatedSchema'
          assistant.created:
            $ref: '#/components/schemas/AuditLogOrgActionAssistantSchema'
          assistant.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionAssistantSchema'
          assistant.updated:
            $ref: '#/components/schemas/AuditLogOrgActionAssistantUpdatedSchema'
          assistant.restored:
            $ref: '#/components/schemas/AuditLogOrgActionAssistantRestoreSchema'
          assistant.duplicated:
            $ref: '#/components/schemas/AuditLogOrgActionAssistantDuplicatedSchema'
          assistant.duplicated_from:
            $ref: >-
              #/components/schemas/AuditLogOrgActionAssistantDuplicatedFromSchema
          agent.created:
            $ref: '#/components/schemas/AuditLogOrgActionAgentSchema'
          agent.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionAgentSchema'
          agent.updated:
            $ref: '#/components/schemas/AuditLogOrgActionAgentUpdatedSchema'
          agent.duplicated:
            $ref: '#/components/schemas/AuditLogOrgActionAgentDuplicatedSchema'
          workflow.created:
            $ref: '#/components/schemas/AuditLogOrgActionWorkflowSchema'
          workflow.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionWorkflowSchema'
          workflow.restored:
            $ref: '#/components/schemas/AuditLogOrgActionWorkflowSchema'
          api_key.created:
            $ref: '#/components/schemas/AuditLogOrgActionApiKeySchema'
          api_key.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionApiKeySchema'
          api_key.rotated:
            $ref: '#/components/schemas/AuditLogOrgActionApiKeySchema'
          webhook.created:
            $ref: '#/components/schemas/AuditLogOrgActionWebhookSchema'
          webhook.updated:
            $ref: '#/components/schemas/AuditLogOrgActionWebhookSchema'
          webhook.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionWebhookSchema'
          webhook.secret_rotated:
            $ref: '#/components/schemas/AuditLogOrgActionWebhookSchema'
          action.created:
            $ref: '#/components/schemas/AuditLogOrgActionActionSchema'
          action.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionActionSchema'
          action.enabled:
            $ref: '#/components/schemas/AuditLogOrgActionActionSchema'
          action.disabled:
            $ref: '#/components/schemas/AuditLogOrgActionActionSchema'
          channel.created:
            $ref: '#/components/schemas/AuditLogOrgActionChannelSchema'
          channel.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionChannelSchema'
          channel.enabled:
            $ref: '#/components/schemas/AuditLogOrgActionChannelSchema'
          channel.disabled:
            $ref: '#/components/schemas/AuditLogOrgActionChannelSchema'
          channel.updated:
            $ref: '#/components/schemas/AuditLogOrgActionChannelUpdatedSchema'
          broadcast.created:
            $ref: '#/components/schemas/AuditLogOrgActionBroadcastSchema'
          broadcast.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionBroadcastSchema'
          broadcast.activated:
            $ref: '#/components/schemas/AuditLogOrgActionBroadcastSchema'
          broadcast.paused:
            $ref: '#/components/schemas/AuditLogOrgActionBroadcastSchema'
          domain.created:
            $ref: '#/components/schemas/AuditLogOrgActionDomainSchema'
          domain.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionDomainSchema'
          email.domain.created:
            $ref: '#/components/schemas/AuditLogOrgActionEmailDomainSchema'
          email.domain.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionEmailDomainSchema'
          email.identity.created:
            $ref: '#/components/schemas/AuditLogOrgActionEmailIdentitySchema'
          email.identity.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionEmailIdentitySchema'
          sso.profile.created:
            $ref: '#/components/schemas/AuditLogOrgActionSsoProfileSchema'
          sso.profile.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionSsoProfileSchema'
          sso.profile.updated:
            $ref: '#/components/schemas/AuditLogOrgActionSsoProfileUpdatedSchema'
          sso.profile.sessions.revoked:
            $ref: >-
              #/components/schemas/AuditLogOrgActionSsoProfileSessionsRevokedSchema
          sso.domain.created:
            $ref: '#/components/schemas/AuditLogOrgActionSsoDomainSchema'
          sso.domain.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionSsoDomainSchema'
          sso.domain.updated:
            $ref: '#/components/schemas/AuditLogOrgActionSsoDomainUpdatedSchema'
          sso.domain.create_code_requested:
            $ref: >-
              #/components/schemas/AuditLogOrgActionSsoDomainCreateCodeRequestedSchema
          sso.domain.delete_code_requested:
            $ref: >-
              #/components/schemas/AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema
          chat.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionChatSchema'
          org.updated:
            $ref: '#/components/schemas/AuditLogOrgActionOrgUpdateSchema'
          org.deleted:
            $ref: '#/components/schemas/AuditLogOrgActionOrgDeleteSchema'
          org.disabled:
            $ref: '#/components/schemas/AuditLogOrgActionOrgDisableSchema'
          org.enabled:
            $ref: '#/components/schemas/AuditLogOrgActionOrgEnableSchema'
          org.restored:
            $ref: '#/components/schemas/AuditLogOrgActionOrgRestoreSchema'
          org.transferred:
            $ref: '#/components/schemas/AuditLogOrgActionOrgTransferSchema'
          org.transferred_to:
            $ref: '#/components/schemas/AuditLogOrgActionOrgTransferredToSchema'
          org.detached:
            $ref: '#/components/schemas/AuditLogOrgActionOrgDetachSchema'
          org.detached_from:
            $ref: '#/components/schemas/AuditLogOrgActionOrgDetachedFromSchema'
          org.sub_org_created:
            $ref: '#/components/schemas/AuditLogOrgActionSubOrgCreatedSchema'
          org.sub_org_updated:
            $ref: '#/components/schemas/AuditLogOrgActionSubOrgUpdatedSchema'
          org.sub_org_member_joined:
            $ref: '#/components/schemas/AuditLogOrgActionSubOrgMemberJoinedSchema'
          org.sub_org_member_role_changed:
            $ref: >-
              #/components/schemas/AuditLogOrgActionSubOrgMemberRoleChangedSchema
      description: Action-specific metadata
    AuditLogSourceSchema:
      type: string
      enum:
        - app
        - admin
        - api
        - system
        - ai
      description: Where the action originated from (app, admin, api, system, ai)
    PublicAssistantConfigSchema:
      type: object
      properties:
        conversation:
          $ref: '#/components/schemas/PublicAssistantConversationConfigSchema'
        widget:
          $ref: '#/components/schemas/PublicAssistantWidgetConfigSchema'
      required:
        - conversation
        - widget
      description: Schema for a public assistant configuration
    PickerIconEmojiSchema:
      type: string
      format: emoji
      description: >-
        The emoji of a curated icon a user can pick for a table, view, field, or
        other entity
    PickerIconNameSchema:
      type: string
      enum:
        - TableCellsIcon
        - DatabaseIcon
        - DocumentTextIcon
        - DocumentChartBarIcon
        - ClipboardDocumentListIcon
        - ClipboardDocumentCheckIcon
        - FolderIcon
        - ArchiveBoxIcon
        - InboxIcon
        - BookOpenIcon
        - BookmarkIcon
        - NewspaperIcon
        - RectangleStackIcon
        - PencilSquareIcon
        - UserIcon
        - UsersIcon
        - UserGroupIcon
        - UserPlusIcon
        - IdentificationIcon
        - FaceSmileIcon
        - HandThumbUpIcon
        - HeartIcon
        - StarIcon
        - CheckBadgeIcon
        - TrophyIcon
        - CrownIcon
        - ChatBubbleLeftIcon
        - ChatBubbleLeftRightIcon
        - EnvelopeIcon
        - EnvelopeOpenIcon
        - PhoneIcon
        - DevicePhoneMobileIcon
        - MegaphoneIcon
        - BellIcon
        - PaperAirplaneIcon
        - AtSymbolIcon
        - RssIcon
        - LifebuoyIcon
        - ShoppingCartIcon
        - ShoppingBagIcon
        - BuildingStorefrontIcon
        - CreditCardIcon
        - BanknotesIcon
        - CurrencyDollarIcon
        - CurrencyEuroIcon
        - ReceiptPercentIcon
        - WalletIcon
        - CoinsIcon
        - GiftIcon
        - TagIcon
        - TicketIcon
        - ScaleIcon
        - TruckIcon
        - CubeIcon
        - CalendarIcon
        - CalendarDaysIcon
        - CalendarDateRangeIcon
        - ClockIcon
        - FlagIcon
        - CheckCircleIcon
        - ListBulletIcon
        - QueueListIcon
        - FunnelIcon
        - ChartBarIcon
        - ChartPieIcon
        - PresentationChartLineIcon
        - ArrowTrendingUpIcon
        - BriefcaseIcon
        - WrenchScrewdriverIcon
        - Cog6ToothIcon
        - KeyIcon
        - LockClosedIcon
        - ShieldCheckIcon
        - BoltIcon
        - LightBulbIcon
        - BeakerIcon
        - BugAntIcon
        - CpuChipIcon
        - CodeBracketIcon
        - CommandLineIcon
        - ServerIcon
        - LinkIcon
        - HomeIcon
        - HomeModernIcon
        - BuildingOfficeIcon
        - BuildingOffice2Icon
        - BuildingLibraryIcon
        - MapPinIcon
        - MapIcon
        - GlobeAltIcon
        - GlobeAmericasIcon
        - RocketLaunchIcon
        - PlaneIcon
        - CarIcon
        - SunIcon
        - MoonIcon
        - FireIcon
        - SparklesIcon
        - CakeIcon
        - AcademicCapIcon
        - ScissorsIcon
        - SwatchIcon
        - PaintBrushIcon
        - CoffeeIcon
        - UtensilsIcon
        - LeafIcon
        - DumbbellIcon
        - HeartPulseIcon
        - PawPrintIcon
        - StethoscopeIcon
        - CameraIcon
        - PhotoIcon
        - FilmIcon
        - VideoCameraIcon
        - MicrophoneIcon
        - MusicalNoteIcon
        - SpeakerWaveIcon
        - PlayCircleIcon
        - TvIcon
        - RadioIcon
        - PuzzlePieceIcon
        - GamepadIcon
      description: >-
        The name of a curated icon a user can pick for a table, view, field, or
        other entity
    ColorNameSchema:
      type: string
      enum:
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - sky
        - blue
        - indigo
        - violet
        - purple
        - fuchsia
        - pink
        - rose
        - neutral
      description: The name of the color to use in the UI
    AgentShapeSchema:
      type: string
      enum:
        - square
        - round
        - pebble
        - slate
        - beam
        - bloom
        - arch
        - clave
      description: The silhouette of a generated agent face
    WorkflowAccessTypeSchema:
      type: string
      enum:
        - PRIVATE
        - PUBLIC_WRITE
        - PUBLIC_READ
      description: Access level of the workflow
    ConnectionTypeSchema:
      type: string
      enum:
        - SCHEDULER
        - WORKFLOWS
        - TOOLS
        - FILES
        - EMAILS
        - HTTP_CREDENTIALS
        - TABLES
        - PAGES
        - KNOWLEDGE
        - SKILLS
        - CONTACTS
        - SEGMENTS
        - ASSISTANTS
        - AGENTS
        - CHATS
        - INBOX
        - MEMBERS
        - BROADCASTS
        - ANALYTICS
        - AUDIT
        - PHONE
        - GMAIL
        - GOOGLE_SHEETS
        - GOOGLE_CALENDAR
        - GOOGLE_DRIVE
        - OUTLOOK_CALENDAR
        - AIRTABLE
        - NOTION
        - LINEAR
        - HUBSPOT
        - GOHIGHLEVEL
        - CAL
        - CALENDLY
        - RESEND
        - OAUTH
        - SLACK
        - TELEGRAM
        - TRELLO
        - FACEBOOK
        - WHATSAPP
        - INSTAGRAM
        - MESSENGER
        - TIKTOK
        - JAPIFON
        - SMPP
        - TWILIO
        - TELNYX
        - ZOHO
        - ZOHO_BOOKINGS
        - ZOHO_INVENTORY
        - ZOHO_CALENDAR
        - SALESFORCE
        - STRIPE
        - SHOPIFY
        - ZENDESK
        - MCP
        - OPENAPI
        - ODOO
        - WOOCOMMERCE
      description: Connection type
      example: SLACK
    OrgMemberRoleSchema:
      type: string
      enum:
        - ADMIN
        - DEVELOPER
        - MANAGER
        - STAFF
      description: Role of the org member within the org
    OrgSubscriptionPlanSchema:
      type: string
      enum:
        - free
        - business
      description: Type of subscription plan
    OrgConfigSchema:
      type: object
      properties:
        email:
          type:
            - string
            - 'null'
          maxLength: 128
          format: email
          description: Organization contact email; pass null to clear
        address:
          type: string
          maxLength: 128
          description: Physical address
        terms_url:
          type:
            - string
            - 'null'
          maxLength: 1024
          format: uri
          description: Terms of service URL; pass null to clear
        privacy_url:
          type:
            - string
            - 'null'
          maxLength: 1024
          format: uri
          description: Privacy policy URL; pass null to clear
        access:
          $ref: '#/components/schemas/OrgAccessConfigSchema'
        modules:
          $ref: '#/components/schemas/OrgModulesConfigSchema'
      description: Organization configuration settings
    OrgFeaturesConfigSchema:
      type: object
      properties:
        enterprise:
          type: boolean
        allow_overdraft:
          type: boolean
        workflows:
          type: boolean
        enable_japifon:
          type: boolean
        enable_smpp:
          type: boolean
        tables:
          type: boolean
        slack_access:
          type: boolean
        emails:
          type: boolean
        templates:
          type: boolean
        org_chats:
          type: boolean
        agents:
          type: boolean
      description: Org gate-keeping features configuration
    AuditLogOrgActionMemberInviteSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - member.invited
        email:
          type: string
          description: Email address of the invited user
        name:
          type: string
          description: Name of the invited user
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - email
        - role
    AuditLogOrgActionMemberJoinSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - member.joined
        member_id:
          type: string
          description: ID of the member who joined
        user_id:
          type: string
          description: ID of the user who joined
        email:
          type: string
          description: Email address of the user who joined
        name:
          type: string
          description: Name of the user who joined
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - member_id
        - user_id
        - email
        - role
    AuditLogOrgActionMemberRemoveSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - member.removed
        member_id:
          type: string
          description: ID of the member who was removed
        user_id:
          type: string
          description: ID of the user who was removed
        email:
          type: string
          description: Email address of the removed member
        name:
          type: string
          description: Name of the removed member
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - member_id
        - user_id
        - role
    AuditLogOrgActionMemberLeftSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - member.left
        email:
          type: string
          description: Email of the member who left
        name:
          type: string
          description: Name of the member who left
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
        member_id:
          type: string
          description: ID of the member who left
        user_id:
          type: string
          description: ID of the user who left
      required:
        - action
        - email
        - role
        - member_id
        - user_id
    AuditLogOrgActionMemberRoleChangeSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - member.role_changed
        member_id:
          type: string
          description: ID of the member who had their role changed
        user_id:
          type: string
          description: ID of the user who had their role changed
        email:
          type: string
          description: Email of the member whose role changed
        name:
          type: string
          description: Name of the member whose role changed
        from_role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
        to_role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - member_id
        - user_id
        - email
        - from_role
        - to_role
    AuditLogOrgActionRoleSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - role.created
            - role.deleted
        role_id:
          type: string
          description: ID of the custom role
        role_name:
          type: string
          description: Name of the custom role
      required:
        - action
        - role_id
        - role_name
    AuditLogOrgActionRoleUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - role.updated
        role_id:
          type: string
          description: ID of the custom role
        role_name:
          type: string
          description: Name of the custom role
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the role update
      required:
        - action
        - role_id
        - role_name
        - changes
    AuditLogOrgActionRoleAssignmentSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - role.assigned
            - role.unassigned
        role_id:
          type: string
          description: ID of the custom role
        role_name:
          type: string
          description: Name of the custom role
      required:
        - action
        - role_id
        - role_name
    AuditLogOrgActionConnectionSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - connection.created
            - connection.deleted
        connection_type:
          allOf:
            - $ref: '#/components/schemas/ConnectionTypeSchema'
            - description: Type of the connection (e.g. whatsapp, slack)
        connection_name:
          type: string
          description: Display name of the connection
        connection_id:
          type: string
          description: ID of the connection
        external_name:
          type: string
          description: External name of the connection
        external_id:
          type: string
          description: External ID of the connection
      required:
        - action
        - connection_type
        - connection_id
    AuditLogOrgActionConnectionUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - connection.updated
        connection_type:
          allOf:
            - $ref: '#/components/schemas/ConnectionTypeSchema'
            - description: Type of the connection (e.g. whatsapp, slack)
        connection_name:
          type: string
          description: Display name of the connection
        connection_id:
          type: string
          description: ID of the connection
        external_name:
          type: string
          description: External name of the connection
        external_id:
          type: string
          description: External ID of the connection
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the connection update
      required:
        - action
        - connection_type
        - connection_id
        - changes
    AuditLogOrgActionAssistantSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - assistant.created
            - assistant.deleted
        assistant_name:
          type: string
          description: Name of the assistant
        assistant_id:
          type: string
          description: ID of the assistant
      required:
        - action
        - assistant_id
    AuditLogOrgActionAssistantUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - assistant.updated
        assistant_name:
          type: string
          description: Name of the assistant
        assistant_id:
          type: string
          description: ID of the assistant
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the assistant update
      required:
        - action
        - assistant_id
        - changes
    AuditLogOrgActionAssistantRestoreSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - assistant.restored
        assistant_name:
          type: string
          description: Name of the restored assistant
        assistant_id:
          type: string
          description: ID of the restored assistant
      required:
        - action
        - assistant_name
        - assistant_id
    AuditLogOrgActionAssistantDuplicatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - assistant.duplicated
        assistant_id:
          type: string
          description: ID of the source assistant
        assistant_name:
          type: string
          description: Name of the source assistant
        new_assistant_id:
          type: string
          description: ID of the duplicated assistant
        new_assistant_name:
          type: string
          description: Name of the duplicated assistant
        target_org_id:
          type: string
          description: ID of the target org (only for cross-org)
        target_org_name:
          type: string
          description: Name of the target org (only for cross-org)
      required:
        - action
        - assistant_id
        - new_assistant_id
    AuditLogOrgActionAssistantDuplicatedFromSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - assistant.duplicated_from
        assistant_id:
          type: string
          description: ID of the new duplicated assistant
        assistant_name:
          type: string
          description: Name of the new duplicated assistant
        new_assistant_id:
          type: string
          description: ID of the new duplicated assistant
        new_assistant_name:
          type: string
          description: Name of the new duplicated assistant
        source_org_id:
          type: string
          description: ID of the source org
        source_org_name:
          type: string
          description: Name of the source org
      required:
        - action
        - assistant_id
        - new_assistant_id
    AuditLogOrgActionAgentSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - agent.created
            - agent.deleted
        agent_name:
          type: string
          description: Name of the agent
        agent_id:
          type: string
          description: ID of the agent
      required:
        - action
        - agent_id
    AuditLogOrgActionAgentUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - agent.updated
        agent_name:
          type: string
          description: Name of the agent
        agent_id:
          type: string
          description: ID of the agent
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the agent update
      required:
        - action
        - agent_id
        - changes
    AuditLogOrgActionAgentDuplicatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - agent.duplicated
        agent_id:
          type: string
          description: ID of the source agent
        agent_name:
          type: string
          description: Name of the source agent
        new_agent_id:
          type: string
          description: ID of the duplicated agent
        new_agent_name:
          type: string
          description: Name of the duplicated agent
      required:
        - action
        - agent_id
        - new_agent_id
    AuditLogOrgActionWorkflowSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - workflow.created
            - workflow.deleted
            - workflow.restored
        workflow_name:
          type: string
          description: Name of the workflow
        workflow_id:
          type: string
          description: ID of the workflow
      required:
        - action
        - workflow_id
    AuditLogOrgActionApiKeySchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - api_key.created
            - api_key.deleted
            - api_key.rotated
        key_name:
          type: string
          description: Name of the API key
        api_key_id:
          type: string
          description: ID of the API key
      required:
        - action
        - api_key_id
    AuditLogOrgActionWebhookSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - webhook.created
            - webhook.updated
            - webhook.deleted
            - webhook.secret_rotated
        webhook_id:
          type: string
          description: ID of the webhook endpoint
        url:
          type: string
          description: URL of the webhook endpoint
      required:
        - action
        - webhook_id
    AuditLogOrgActionActionSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - action.created
            - action.deleted
            - action.enabled
            - action.disabled
        action_name:
          type: string
          description: Name of the action
        action_id:
          type: string
          description: ID of the assistant or agent action
        action_type:
          $ref: '#/components/schemas/ConnectionActionSelectorSchema'
        assistant_name:
          type: string
          description: Name of the assistant
        assistant_id:
          type: string
          description: ID of the assistant
        agent_name:
          type: string
          description: Name of the agent
        agent_id:
          type: string
          description: ID of the agent
        connection_id:
          type: string
          description: ID of the connection
        connection_type:
          allOf:
            - $ref: '#/components/schemas/ConnectionTypeSchema'
            - description: Type of the connection
        connection_name:
          type: string
          description: Display name of the connection
        external_id:
          type: string
          description: External ID of the connection
        external_name:
          type: string
          description: External name of the connection
      required:
        - action
        - action_id
        - action_type
    AuditLogOrgActionChannelSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - channel.created
            - channel.deleted
            - channel.enabled
            - channel.disabled
        channel_id:
          type: string
          description: ID of the channel
        channel_type:
          type: string
          description: Type of the channel, as recorded when the action happened
        assistant_name:
          type: string
          description: Name of the assistant
        assistant_id:
          type: string
          description: ID of the assistant
        agent_name:
          type: string
          description: Name of the agent
        agent_id:
          type: string
          description: ID of the agent
        connection_id:
          type: string
          description: ID of the connection
        connection_type:
          allOf:
            - $ref: '#/components/schemas/ConnectionTypeSchema'
            - description: Type of the connection
        connection_name:
          type: string
          description: Display name of the connection
        external_id:
          type: string
          description: External ID of the connection
        external_name:
          type: string
          description: External name of the connection
      required:
        - action
        - channel_id
        - channel_type
    AuditLogOrgActionChannelUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - channel.updated
        channel_id:
          type: string
          description: ID of the channel
        channel_type:
          type: string
          description: Type of the channel, as recorded when the action happened
        assistant_name:
          type: string
          description: Name of the assistant
        assistant_id:
          type: string
          description: ID of the assistant
        agent_name:
          type: string
          description: Name of the agent
        agent_id:
          type: string
          description: ID of the agent
        connection_id:
          type: string
          description: ID of the connection
        connection_type:
          allOf:
            - $ref: '#/components/schemas/ConnectionTypeSchema'
            - description: Type of the connection
        connection_name:
          type: string
          description: Display name of the connection
        external_id:
          type: string
          description: External ID of the connection
        external_name:
          type: string
          description: External name of the connection
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the channel update
      required:
        - action
        - channel_id
        - channel_type
        - changes
    AuditLogOrgActionBroadcastSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - broadcast.created
            - broadcast.deleted
            - broadcast.activated
            - broadcast.paused
        broadcast_name:
          type: string
          description: Name of the broadcast
        broadcast_id:
          type: string
          description: ID of the broadcast
      required:
        - action
        - broadcast_id
    AuditLogOrgActionDomainSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - domain.created
            - domain.deleted
        domain_id:
          type: string
          description: ID of the org domain
        hostname:
          type: string
          description: Domain hostname
      required:
        - action
        - domain_id
        - hostname
    AuditLogOrgActionEmailDomainSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - email.domain.created
            - email.domain.deleted
        domain_id:
          type: string
          description: ID of the email domain
        domain_name:
          type: string
          description: Domain name
      required:
        - action
        - domain_id
        - domain_name
    AuditLogOrgActionEmailIdentitySchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - email.identity.created
            - email.identity.deleted
        email_id:
          type: string
          description: ID of the email identity
        email_address:
          type: string
          description: Email address
      required:
        - action
        - email_id
        - email_address
    AuditLogOrgActionSsoProfileSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.profile.created
            - sso.profile.deleted
        sso_profile_id:
          type: string
          description: ID of the SSO profile
        provider:
          $ref: '#/components/schemas/SsoProviderSchema'
        name:
          type: string
          description: Human-readable name of the SSO profile
      required:
        - action
        - sso_profile_id
        - provider
    AuditLogOrgActionSsoProfileUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.profile.updated
        sso_profile_id:
          type: string
          description: ID of the SSO profile
        provider:
          $ref: '#/components/schemas/SsoProviderSchema'
        name:
          type: string
          description: Human-readable name of the SSO profile
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the SSO profile update
      required:
        - action
        - sso_profile_id
        - provider
        - changes
    AuditLogOrgActionSsoProfileSessionsRevokedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.profile.sessions.revoked
        sso_profile_id:
          type: string
          description: ID of the SSO profile
        revoked:
          type: integer
          description: Number of sessions revoked
      required:
        - action
        - sso_profile_id
        - revoked
    AuditLogOrgActionSsoDomainSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.domain.created
            - sso.domain.deleted
        domain_id:
          type: string
          description: ID of the SSO domain
        domain:
          type: string
          description: Email domain name
      required:
        - action
        - domain_id
        - domain
    AuditLogOrgActionSsoDomainUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.domain.updated
        domain_id:
          type: string
          description: ID of the SSO domain
        domain:
          type: string
          description: Email domain name
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the SSO domain update
      required:
        - action
        - domain_id
        - domain
        - changes
    AuditLogOrgActionSsoDomainCreateCodeRequestedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.domain.create_code_requested
        domain:
          type: string
          description: Email domain the admin attempted to claim
      required:
        - action
        - domain
    AuditLogOrgActionSsoDomainDeleteCodeRequestedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - sso.domain.delete_code_requested
        domain_id:
          type: string
          description: ID of the SSO domain being removed
        domain:
          type: string
          description: Email domain being removed
      required:
        - action
        - domain_id
        - domain
    AuditLogOrgActionChatSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - chat.deleted
        chat_id:
          type: string
          description: ID of the deleted chat
      required:
        - action
        - chat_id
    AuditLogOrgActionOrgUpdateSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.updated
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the org update
      required:
        - action
        - changes
    AuditLogOrgActionOrgDeleteSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.deleted
      required:
        - action
    AuditLogOrgActionOrgDisableSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.disabled
      required:
        - action
    AuditLogOrgActionOrgEnableSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.enabled
      required:
        - action
    AuditLogOrgActionOrgRestoreSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.restored
      required:
        - action
    AuditLogOrgActionOrgTransferSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.transferred
        sub_org_name:
          type: string
          description: Name of the org that was attached
        sub_org_id:
          type: string
          description: ID of the org that was attached
      required:
        - action
        - sub_org_name
        - sub_org_id
    AuditLogOrgActionOrgTransferredToSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.transferred_to
        parent_org_name:
          type: string
          description: Name of the parent org we were attached to
        parent_org_id:
          type: string
          description: ID of the parent org we were attached to
      required:
        - action
        - parent_org_name
        - parent_org_id
    AuditLogOrgActionOrgDetachSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.detached
        sub_org_name:
          type: string
          description: Name of the org that was detached
        sub_org_id:
          type: string
          description: ID of the org that was detached
      required:
        - action
        - sub_org_name
        - sub_org_id
    AuditLogOrgActionOrgDetachedFromSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.detached_from
        parent_org_name:
          type: string
          description: Name of the parent org we were detached from
        parent_org_id:
          type: string
          description: ID of the parent org we were detached from
      required:
        - action
        - parent_org_name
        - parent_org_id
    AuditLogOrgActionSubOrgCreatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.sub_org_created
        sub_org_name:
          type: string
          description: Name of the created sub-organization
        sub_org_id:
          type: string
          description: ID of the created sub-organization
      required:
        - action
        - sub_org_name
        - sub_org_id
    AuditLogOrgActionSubOrgUpdatedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.sub_org_updated
        sub_org_name:
          type: string
          description: Name of the updated sub-organization
        sub_org_id:
          type: string
          description: ID of the updated sub-organization
        changes:
          type: array
          items:
            $ref: '#/components/schemas/AuditLogChangeSchema'
          description: Field-level diff of the sub-org update
      required:
        - action
        - sub_org_name
        - sub_org_id
        - changes
    AuditLogOrgActionSubOrgMemberJoinedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.sub_org_member_joined
        sub_org_name:
          type: string
          description: Name of the sub-organization
        sub_org_id:
          type: string
          description: ID of the sub-organization
        email:
          type: string
          description: Email of the member who joined
        name:
          type: string
          description: Name of the member who joined
        user_id:
          type: string
          description: ID of the user who joined
        role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - sub_org_name
        - sub_org_id
        - email
        - user_id
        - role
    AuditLogOrgActionSubOrgMemberRoleChangedSchema:
      type: object
      properties:
        action:
          type: string
          enum:
            - org.sub_org_member_role_changed
        sub_org_name:
          type: string
          description: Name of the sub-organization
        sub_org_id:
          type: string
          description: ID of the sub-organization
        email:
          type: string
          description: Email of the member whose role changed
        name:
          type: string
          description: Name of the member whose role changed
        user_id:
          type: string
          description: ID of the user whose role changed
        from_role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
        to_role:
          $ref: '#/components/schemas/OrgMemberRoleSchema'
      required:
        - action
        - sub_org_name
        - sub_org_id
        - email
        - user_id
        - from_role
        - to_role
    PublicAssistantConversationConfigSchema:
      type: object
      properties:
        thread_mode:
          $ref: '#/components/schemas/AssistantThreadModeSchema'
        welcome_banner:
          type: string
          maxLength: 256
          description: >-
            Static greeting text displayed in the UI when users start a new
            conversation
        suggested_messages:
          type: array
          items:
            type: string
            maxLength: 64
          maxItems: 5
          description: >-
            Suggested messages displayed to users when they start a new
            conversation
        auto_intro_message:
          type: string
          maxLength: 256
          description: >-
            First message automatically sent by the assistant only when a
            conversation begins via API call
        enable_auto_csat:
          type: boolean
          description: >-
            Whether the assistant should automatically score customer
            satisfaction (CSAT) when closing conversations
        enable_ai_replies:
          type: boolean
          description: >-
            Whether the AI generates replies. When false the assistant is
            human-only: incoming messages are still received and stored but the
            AI never responds, so a human answers.
      required:
        - thread_mode
      description: Schema for a public assistant conversation configuration
    PublicAssistantWidgetConfigSchema:
      type: object
      properties:
        mode:
          $ref: '#/components/schemas/AssistantWidgetModeSchema'
        appearance:
          $ref: '#/components/schemas/AssistantWidgetAppearanceSchema'
        position:
          $ref: '#/components/schemas/AssistantWidgetPositionSchema'
        omnibar_minimize_desktop:
          type: boolean
          description: >-
            Fold the omnibar into its compact centered button while visitors
            scroll on desktop too. On mobile viewports it always folds.
        hide_powered_by:
          type: boolean
        enable_dictation:
          type: boolean
        enable_file_uploads:
          type: boolean
        colors:
          $ref: '#/components/schemas/AssistantWidgetColorsConfigSchema'
        teaser:
          $ref: '#/components/schemas/AssistantWidgetTeaserConfigSchema'
        channels:
          type: object
          properties:
            items:
              type: array
              items:
                $ref: '#/components/schemas/PublicAssistantWidgetChannelSchema'
            label:
              type: string
            chat_button_label:
              type: string
          required:
            - items
      required:
        - channels
      description: Widget configuration with channel references resolved to links
    OrgAccessConfigSchema:
      type: object
      properties:
        session_ttl_seconds:
          anyOf:
            - type: number
              enum:
                - 0
            - type: integer
              minimum: 60
              maximum: 315360000
          description: >-
            Session lifetime in seconds for SSO logins. Use 0 to disable
            expiration (session never expires). Any non-zero value must be at
            least 60 seconds. Defaults to 0 (disabled).
        allow_google:
          type: boolean
          description: >-
            Whether Google sign-in is allowed for users whose email matches an
            SSO domain on this org (verified, with or without IdP). Defaults to
            true when unset.
        allow_microsoft:
          type: boolean
          description: >-
            Whether Microsoft sign-in is allowed for users whose email matches
            an SSO domain on this org (verified, with or without IdP). Defaults
            to true when unset.
        allow_apple:
          type: boolean
          description: >-
            Whether Apple sign-in is allowed for users whose email matches an
            SSO domain on this org (verified, with or without IdP). Defaults to
            true when unset.
        allow_email_code:
          type: boolean
          description: >-
            Whether email code sign-in is allowed for users whose email matches
            an SSO domain on this org (verified, with or without IdP). Defaults
            to true when unset.
        allow_invites:
          type: boolean
          description: >-
            Whether org admins can manually invite new members. Org-wide toggle,
            does not require a verified domain. Defaults to true when unset.
      description: >-
        Org-wide access policy. Governs how users authenticate and join the org.
        Only applies when at least one verified SSO is enabled.
    OrgModulesConfigSchema:
      type: object
      properties:
        enable_org_chats:
          type: boolean
        enable_inbox:
          type: boolean
        enable_analytics:
          type: boolean
        enable_assistants:
          type: boolean
        enable_agents:
          type: boolean
        enable_knowledge_base:
          type: boolean
        enable_broadcasts:
          type: boolean
        enable_channels:
          type: boolean
        enable_workflows:
          type: boolean
        enable_audience:
          type: boolean
        enable_tables:
          type: boolean
        enable_pages:
          type: boolean
        enable_balance_credits:
          type: boolean
      description: >-
        Per-module visibility toggles. Missing keys default to enabled on the
        client.
    AuditLogChangeSchema:
      type: object
      properties:
        field:
          type: string
          description: >-
            Dot-path name of the changed field (e.g. "enabled" or
            "config.issuer_url").
        old_value: {}
        new_value: {}
        truncated:
          type: boolean
          description: >-
            True if either value was truncated. Preview-only — not suitable for
            exact comparison.
      required:
        - field
    ConnectionActionSelectorSchema:
      type: string
      enum:
        - SCHEDULER:*
        - SCHEDULER:ON_SCHEDULE
        - SCHEDULER:TIMEZONES_LIST
        - WORKFLOWS:*
        - WORKFLOWS:WORKFLOWS_LIST
        - WORKFLOWS:WORKFLOW_ACTIONS
        - WORKFLOWS:CALL_WORKFLOW
        - TOOLS:*
        - TOOLS:HTTP_REQUEST
        - TOOLS:WEB_SEARCH
        - TOOLS:WEB_SCRAPING
        - FILES:*
        - FILES:DOWNLOAD_FILE
        - FILES:UPLOAD_FILE
        - FILES:CREATE_CSV
        - FILES:DELETE_FILE
        - FILES:MARKDOWN_TO_PDF
        - FILES:HTML_TO_PDF
        - TABLES:*
        - TABLES:MANAGE_RECORDS
        - TABLES:CREATE_RECORD
        - TABLES:UPDATE_RECORD
        - TABLES:DELETE_RECORD
        - TABLES:SEARCH_RECORDS
        - TABLES:LIST_TABLES
        - TABLES:GET_TABLE_SCHEMA
        - TABLES:GET_RECORD
        - TABLES:LIST_VIEWS
        - TABLES:GET_VIEW_ITEMS
        - TABLES:CREATE_TABLE
        - TABLES:UPDATE_TABLE
        - TABLES:DELETE_TABLE
        - TABLES:MANAGE_FIELDS
        - TABLES:MOVE_FIELD
        - TABLES:DELETE_FIELD
        - TABLES:CREATE_VIEW
        - TABLES:UPDATE_VIEW
        - TABLES:DELETE_VIEW
        - TABLES:DUPLICATE_VIEW
        - TABLES:MOVE_VIEW_ITEM
        - TABLES:LIST_VIEW_GROUPS
        - TABLES:AGGREGATE_RECORDS
        - TABLES:REORDER_VIEWS
        - TABLES:TABLES_LIST
        - TABLES:FIELDS_LIST
        - TABLES:RECORD_SCHEMA
        - PAGES:*
        - PAGES:LIST_PAGES
        - PAGES:GET_PAGE
        - PAGES:CREATE_PAGE
        - PAGES:UPDATE_PAGE
        - PAGES:DELETE_PAGE
        - PAGES:CREATE_BLOCK
        - PAGES:UPDATE_BLOCK
        - PAGES:MOVE_BLOCK
        - PAGES:DELETE_BLOCK
        - PAGES:PAGES_LIST
        - KNOWLEDGE:*
        - KNOWLEDGE:SEARCH
        - KNOWLEDGE:GET_CHUNK
        - KNOWLEDGE:LIST_CONTENTS
        - KNOWLEDGE:GET_CONTENT
        - KNOWLEDGE:GET_CONTENT_TEXT
        - KNOWLEDGE:FIND_IN_CONTENT
        - KNOWLEDGE:REPLACE_IN_CONTENT
        - KNOWLEDGE:GET_STATS
        - KNOWLEDGE:ADD_CONTENT
        - KNOWLEDGE:UPDATE_CONTENT
        - KNOWLEDGE:REINDEX_CONTENT
        - KNOWLEDGE:DELETE_CONTENT
        - ASSISTANTS:*
        - ASSISTANTS:LIST
        - ASSISTANTS:GET
        - ASSISTANTS:CREATE
        - ASSISTANTS:UPDATE
        - ASSISTANTS:REPLACE
        - ASSISTANTS:GET_MODELS
        - ASSISTANTS:UPDATE_SETTINGS
        - ASSISTANTS:LIST_KNOWLEDGE
        - ASSISTANTS:LINK_KNOWLEDGE
        - ASSISTANTS:UNLINK_KNOWLEDGE
        - ASSISTANTS:LIST_CHANNELS
        - ASSISTANTS:CREATE_CHANNEL
        - ASSISTANTS:UPDATE_CHANNEL
        - ASSISTANTS:DELETE_CHANNEL
        - ASSISTANTS:LIST_ACTIONS
        - ASSISTANTS:CREATE_ACTION
        - ASSISTANTS:UPDATE_ACTION
        - ASSISTANTS:DELETE_ACTION
        - ASSISTANTS:SET_CONTACT_FIELD
        - ASSISTANTS:REMOVE_CONTACT_FIELD
        - AGENTS:*
        - AGENTS:LIST
        - AGENTS:GET
        - AGENTS:CREATE
        - AGENTS:UPDATE
        - AGENTS:LIST_ROUTINES
        - AGENTS:CREATE_ROUTINE
        - AGENTS:CANCEL_ROUTINE
        - CHATS:*
        - CHATS:LIST
        - CHATS:GET
        - INBOX:*
        - INBOX:LIST_CHATS
        - INBOX:GET_MESSAGES
        - INBOX:REPLY
        - INBOX:ASSIGN
        - INBOX:SET_STATUS
        - INBOX:MARK_RESOLVED
        - INBOX:REOPEN
        - MEMBERS:*
        - MEMBERS:LIST
        - BROADCASTS:*
        - BROADCASTS:LIST
        - BROADCASTS:GET
        - BROADCASTS:CREATE
        - BROADCASTS:UPDATE
        - BROADCASTS:DUPLICATE
        - BROADCASTS:DELETE
        - BROADCASTS:SET_STATE
        - BROADCASTS:SET_CHANNEL_TEMPLATE
        - BROADCASTS:ADD_RECIPIENTS
        - BROADCASTS:GET_RECIPIENT_COUNTS
        - BROADCASTS:RETRY_RECIPIENTS
        - BROADCASTS:REMOVE_RECIPIENTS
        - BROADCASTS:LIST_FIELDS
        - BROADCASTS:SET_FIELD
        - BROADCASTS:SET_FIELD_ENTRIES
        - BROADCASTS:SCHEDULE
        - BROADCASTS:CANCEL
        - BROADCASTS:ACTIVATE
        - BROADCASTS:PAUSE
        - BROADCASTS:SEND_TEST
        - BROADCASTS:GET_ANALYTICS
        - BROADCASTS:LIST_RECIPIENTS
        - ANALYTICS:*
        - ANALYTICS:ORG_SUMMARY
        - ANALYTICS:ASSISTANTS_PERFORMANCE
        - ANALYTICS:TEAM_PERFORMANCE
        - ANALYTICS:RESPONSE_TIMES
        - ANALYTICS:CHANNELS_BREAKDOWN
        - ANALYTICS:CONTACTS_GROWTH
        - ANALYTICS:CONTACTS_BY_CHANNEL
        - ANALYTICS:TOP_SEGMENTS
        - ANALYTICS:WORKFLOWS_PERFORMANCE
        - AUDIT:*
        - AUDIT:LIST
        - SKILLS:*
        - SKILLS:LIST
        - SKILLS:GET
        - SKILLS:CREATE
        - SKILLS:UPDATE
        - SKILLS:REPLACE
        - CONTACTS:*
        - CONTACTS:SEARCH
        - CONTACTS:GET
        - CONTACTS:UPDATE
        - CONTACTS:DELETE
        - CONTACTS:MERGE
        - CONTACTS:UPDATE_SEGMENTS
        - CONTACTS:LIST_ACTIVITIES
        - CONTACTS:LIST_COMMENTS
        - CONTACTS:ADD_COMMENT
        - CONTACTS:LIST_MEMORIES
        - CONTACTS:LIST_FILES
        - CONTACTS:LIST_SUPPRESSIONS
        - CONTACTS:ADD_SUPPRESSIONS
        - CONTACTS:REMOVE_SUPPRESSIONS
        - CONTACTS:IMPORT
        - SEGMENTS:*
        - SEGMENTS:LIST
        - SEGMENTS:GET
        - SEGMENTS:CREATE
        - SEGMENTS:UPDATE
        - SEGMENTS:DELETE
        - EMAILS:*
        - EMAILS:ON_EMAIL_STATUS_CHANGE
        - EMAILS:SEND_EMAIL
        - EMAILS:LIST_SENDERS
        - MCP:*
        - MCP:TOOLS_LIST
        - MCP:TOOL_SCHEMA
        - MCP:TOOL_CALL
        - MCP:TOOLS
        - OPENAPI:*
        - OPENAPI:OPERATIONS_LIST
        - OPENAPI:OPERATION_SCHEMA
        - OPENAPI:OPERATION_CALL
        - OPENAPI:TOOLS
        - GOOGLE_SHEETS:*
        - GOOGLE_SHEETS:ON_SPREADSHEETS_NEW_ROW
        - GOOGLE_SHEETS:SPREADSHEETS_SEARCH
        - GOOGLE_SHEETS:SPREADSHEETS_LIST
        - GOOGLE_SHEETS:SPREADSHEETS_FILES_LIST
        - GOOGLE_SHEETS:WORKSHEETS_LIST
        - GOOGLE_SHEETS:SPREADSHEETS_APPEND_ROW
        - GOOGLE_SHEETS:SPREADSHEETS_UPDATE_ROW
        - GOOGLE_CALENDAR:*
        - GOOGLE_CALENDAR:ON_NEW_EVENT
        - GOOGLE_CALENDAR:CALENDARS_LIST
        - GOOGLE_CALENDAR:FREEBUSY_QUERY
        - GOOGLE_CALENDAR:EVENTS_SEARCH
        - GOOGLE_CALENDAR:EVENTS_GET
        - GOOGLE_CALENDAR:EVENTS_CREATE
        - GOOGLE_CALENDAR:EVENTS_UPDATE
        - GOOGLE_CALENDAR:EVENTS_DELETE
        - GOOGLE_CALENDAR:EVENTS_QUICK_ADD
        - OUTLOOK_CALENDAR:*
        - OUTLOOK_CALENDAR:CALENDARS_LIST
        - OUTLOOK_CALENDAR:EVENTS_LIST
        - OUTLOOK_CALENDAR:FREEBUSY_QUERY
        - OUTLOOK_CALENDAR:EVENTS_SEARCH
        - OUTLOOK_CALENDAR:EVENTS_GET
        - OUTLOOK_CALENDAR:EVENTS_CREATE
        - OUTLOOK_CALENDAR:EVENTS_UPDATE
        - OUTLOOK_CALENDAR:EVENTS_DELETE
        - GOOGLE_DRIVE:*
        - GOOGLE_DRIVE:FILES_SEARCH
        - GOOGLE_DRIVE:FILES_LIST
        - GOOGLE_DRIVE:FILES_GET
        - GOOGLE_DRIVE:FILES_DOWNLOAD
        - GOOGLE_DRIVE:FILES_CREATE
        - GOOGLE_DRIVE:FILES_UPDATE
        - GOOGLE_DRIVE:FILES_DELETE
        - GOOGLE_DRIVE:FOLDERS_CREATE
        - AIRTABLE:*
        - AIRTABLE:BASES_LIST
        - AIRTABLE:TABLES_LIST
        - AIRTABLE:TABLE_SCHEMA
        - AIRTABLE:RECORDS_SEARCH
        - AIRTABLE:RECORD_GET
        - AIRTABLE:RECORD_CREATE
        - AIRTABLE:RECORD_UPDATE
        - AIRTABLE:RECORD_DELETE
        - AIRTABLE:COLLABORATORS_LIST
        - NOTION:*
        - NOTION:DATA_SOURCES_LIST
        - NOTION:DATA_SOURCE_SCHEMA
        - NOTION:USERS_LIST
        - NOTION:SEARCH
        - NOTION:RECORDS_SEARCH
        - NOTION:RECORD_GET
        - NOTION:RECORD_CREATE
        - NOTION:RECORD_UPDATE
        - NOTION:PAGES_SEARCH
        - NOTION:PAGES_AND_RECORDS_LIST
        - NOTION:PAGE_GET
        - NOTION:PAGE_CREATE
        - NOTION:PAGE_UPDATE
        - NOTION:PAGE_CONTENT_APPEND
        - NOTION:COMMENTS_LIST
        - NOTION:COMMENT_CREATE
        - LINEAR:*
        - LINEAR:TEAMS_LIST
        - LINEAR:STATES_LIST
        - LINEAR:USERS_LIST
        - LINEAR:LABELS_LIST
        - LINEAR:ISSUES_SEARCH
        - LINEAR:ISSUE_GET
        - LINEAR:ISSUE_CREATE
        - LINEAR:ISSUE_UPDATE
        - LINEAR:ISSUE_COMMENT_CREATE
        - TRELLO:*
        - TRELLO:BOARDS_LIST
        - TRELLO:BOARD_GET
        - TRELLO:LISTS_LIST
        - TRELLO:CARDS_SEARCH
        - TRELLO:CARD_GET
        - TRELLO:CARD_CREATE
        - TRELLO:CARD_UPDATE
        - TRELLO:CARD_MOVE
        - TRELLO:CARD_COMMENT
        - TRELLO:CARD_DELETE
        - TRELLO:MEMBERS_LIST
        - TRELLO:LABELS_LIST
        - HUBSPOT:*
        - HUBSPOT:CONTACTS_SEARCH
        - HUBSPOT:CONTACT_GET
        - HUBSPOT:CONTACT_CREATE
        - HUBSPOT:CONTACT_UPDATE
        - HUBSPOT:CONTACT_PROPERTIES_LIST
        - HUBSPOT:COMPANIES_SEARCH
        - HUBSPOT:COMPANY_GET
        - HUBSPOT:COMPANY_CREATE
        - HUBSPOT:COMPANY_UPDATE
        - HUBSPOT:COMPANY_PROPERTIES_LIST
        - HUBSPOT:DEALS_SEARCH
        - HUBSPOT:DEAL_GET
        - HUBSPOT:DEAL_CREATE
        - HUBSPOT:DEAL_UPDATE
        - HUBSPOT:DEAL_PROPERTIES_LIST
        - HUBSPOT:DEAL_PIPELINES_LIST
        - HUBSPOT:DEAL_STAGES_LIST
        - HUBSPOT:MEETINGS_SEARCH
        - HUBSPOT:MEETING_GET
        - HUBSPOT:MEETING_CREATE
        - HUBSPOT:MEETING_UPDATE
        - HUBSPOT:MEETING_DELETE
        - SALESFORCE:*
        - SALESFORCE:OBJECTS_LIST
        - SALESFORCE:LEADS_SEARCH
        - SALESFORCE:LEAD_GET
        - SALESFORCE:LEAD_CREATE
        - SALESFORCE:LEAD_UPDATE
        - SALESFORCE:LEAD_DELETE
        - SALESFORCE:CONTACTS_SEARCH
        - SALESFORCE:CONTACT_GET
        - SALESFORCE:CONTACT_CREATE
        - SALESFORCE:CONTACT_UPDATE
        - SALESFORCE:CONTACT_DELETE
        - SALESFORCE:ACCOUNTS_SEARCH
        - SALESFORCE:ACCOUNT_GET
        - SALESFORCE:ACCOUNT_CREATE
        - SALESFORCE:ACCOUNT_UPDATE
        - SALESFORCE:ACCOUNT_DELETE
        - SALESFORCE:OPPORTUNITIES_SEARCH
        - SALESFORCE:OPPORTUNITY_GET
        - SALESFORCE:OPPORTUNITY_CREATE
        - SALESFORCE:OPPORTUNITY_UPDATE
        - SALESFORCE:OPPORTUNITY_DELETE
        - ZOHO:*
        - ZOHO:MODULES_LIST
        - ZOHO:MODULE_FIELDS
        - ZOHO:RECORDS_SEARCH
        - ZOHO:RECORD_GET
        - ZOHO:RECORD_CREATE
        - ZOHO:RECORD_UPDATE
        - ZOHO:RECORD_DELETE
        - ZOHO:USERS_LIST
        - ZOHO:TAGS_LIST
        - ZOHO:PIPELINES_LIST
        - ZOHO:DEAL_STAGES_LIST
        - ZOHO:LEADS_SEARCH
        - ZOHO:LEAD_GET
        - ZOHO:LEAD_CREATE
        - ZOHO:LEAD_UPDATE
        - ZOHO:LEAD_DELETE
        - ZOHO:LEAD_CONVERT
        - ZOHO:CONTACTS_SEARCH
        - ZOHO:CONTACT_GET
        - ZOHO:CONTACT_CREATE
        - ZOHO:CONTACT_UPDATE
        - ZOHO:CONTACT_DELETE
        - ZOHO:CONTACT_TAGS_ADD
        - ZOHO:CONTACT_TAGS_REMOVE
        - ZOHO:ACCOUNTS_SEARCH
        - ZOHO:ACCOUNT_GET
        - ZOHO:ACCOUNT_CREATE
        - ZOHO:ACCOUNT_UPDATE
        - ZOHO:ACCOUNT_DELETE
        - ZOHO:DEALS_SEARCH
        - ZOHO:DEAL_GET
        - ZOHO:DEAL_CREATE
        - ZOHO:DEAL_UPDATE
        - ZOHO:DEAL_DELETE
        - ZOHO:CALENDAR_EVENTS_LIST
        - ZOHO:CALENDAR_EVENT_CREATE
        - ZOHO:CALENDAR_EVENT_UPDATE
        - ZOHO:CALENDAR_EVENT_DELETE
        - ZOHO:ATTACHMENTS_UPLOAD
        - ZOHO:ATTACHMENTS_LIST
        - ZOHO:ATTACHMENTS_DOWNLOAD
        - ZOHO:ATTACHMENTS_DELETE
        - ZOHO_BOOKINGS:*
        - ZOHO_BOOKINGS:WORKSPACES_LIST
        - ZOHO_BOOKINGS:SERVICES_LIST
        - ZOHO_BOOKINGS:STAFF_LIST
        - ZOHO_BOOKINGS:RESOURCES_LIST
        - ZOHO_BOOKINGS:AVAILABILITY_GET
        - ZOHO_BOOKINGS:APPOINTMENTS_SEARCH
        - ZOHO_BOOKINGS:APPOINTMENT_GET
        - ZOHO_BOOKINGS:APPOINTMENT_BOOK
        - ZOHO_BOOKINGS:APPOINTMENT_RESCHEDULE
        - ZOHO_BOOKINGS:APPOINTMENT_UPDATE
        - ZOHO_BOOKINGS:APPOINTMENT_CANCEL
        - ZOHO_BOOKINGS:CUSTOMER_CREATE
        - ZOHO_INVENTORY:*
        - ZOHO_INVENTORY:ITEMS_SEARCH
        - ZOHO_INVENTORY:ITEM_GET
        - ZOHO_INVENTORY:ITEM_CREATE
        - ZOHO_INVENTORY:ITEM_UPDATE
        - ZOHO_INVENTORY:ITEM_IMAGE_UPLOAD
        - ZOHO_INVENTORY:ITEM_IMAGE_DELETE
        - ZOHO_INVENTORY:CONTACTS_SEARCH
        - ZOHO_INVENTORY:CONTACT_GET
        - ZOHO_INVENTORY:CONTACT_CREATE
        - ZOHO_INVENTORY:CONTACT_UPDATE
        - ZOHO_INVENTORY:SALES_ORDERS_SEARCH
        - ZOHO_INVENTORY:SALES_ORDER_GET
        - ZOHO_INVENTORY:SALES_ORDER_CREATE
        - ZOHO_INVENTORY:SALES_ORDER_UPDATE
        - ZOHO_INVENTORY:INVOICES_SEARCH
        - ZOHO_INVENTORY:INVOICE_GET
        - ZOHO_INVENTORY:INVOICE_CREATE
        - ZOHO_INVENTORY:INVOICE_SEND
        - ZOHO_CALENDAR:*
        - ZOHO_CALENDAR:CALENDARS_LIST
        - ZOHO_CALENDAR:FREEBUSY_GET
        - ZOHO_CALENDAR:EVENTS_SEARCH
        - ZOHO_CALENDAR:EVENT_GET
        - ZOHO_CALENDAR:EVENT_CREATE
        - ZOHO_CALENDAR:EVENT_UPDATE
        - ZOHO_CALENDAR:EVENT_DELETE
        - GOHIGHLEVEL:*
        - GOHIGHLEVEL:CONTACTS_SEARCH
        - GOHIGHLEVEL:CONTACT_GET
        - GOHIGHLEVEL:CONTACT_CREATE
        - GOHIGHLEVEL:CONTACT_UPDATE
        - GOHIGHLEVEL:CONTACT_DELETE
        - GOHIGHLEVEL:CONTACT_TAGS_ADD
        - GOHIGHLEVEL:CONTACT_TAGS_REMOVE
        - GOHIGHLEVEL:OPPORTUNITIES_SEARCH
        - GOHIGHLEVEL:OPPORTUNITY_GET
        - GOHIGHLEVEL:OPPORTUNITY_CREATE
        - GOHIGHLEVEL:OPPORTUNITY_UPDATE
        - GOHIGHLEVEL:OPPORTUNITY_DELETE
        - GOHIGHLEVEL:PIPELINES_LIST
        - GOHIGHLEVEL:PIPELINE_STAGES_LIST
        - GOHIGHLEVEL:CALENDARS_LIST
        - GOHIGHLEVEL:CALENDAR_FREE_SLOTS
        - GOHIGHLEVEL:CALENDAR_BLOCKED_SLOTS
        - GOHIGHLEVEL:CALENDAR_EVENTS_LIST
        - GOHIGHLEVEL:CALENDAR_EVENT_CREATE
        - GOHIGHLEVEL:CALENDAR_EVENT_UPDATE
        - GOHIGHLEVEL:CALENDAR_EVENT_DELETE
        - GOHIGHLEVEL:CAMPAIGNS_LIST
        - GOHIGHLEVEL:CUSTOM_FIELDS
        - GOHIGHLEVEL:TAGS_LIST
        - GOHIGHLEVEL:COUNTRIES_LIST
        - GOHIGHLEVEL:USERS_LIST
        - CAL:*
        - CAL:SLOTS_GET
        - CAL:BOOKINGS_LIST
        - CAL:BOOKING_GET
        - CAL:BOOKING_CREATE
        - CAL:BOOKING_UPDATE
        - CAL:BOOKING_CANCEL
        - CAL:EVENTS_LIST
        - CALENDLY:*
        - CALENDLY:AVAILABLE_TIMES_GET
        - CALENDLY:EVENTS_SEARCH
        - CALENDLY:EVENT_GET
        - CALENDLY:EVENT_CREATE
        - CALENDLY:EVENT_CANCEL
        - CALENDLY:SCHEDULING_LINK_CREATE
        - CALENDLY:EVENT_TYPES_LIST
        - CALENDLY:USERS_LIST
        - SLACK:*
        - SLACK:ON_MENTION
        - SLACK:ON_CHANNEL_NEW_MESSAGE
        - SLACK:SEARCH
        - SLACK:CHANNELS_LIST
        - SLACK:CHANNELS_LIST_WITH_ANY
        - SLACK:CHANNELS_MESSAGES_LIST
        - SLACK:CHANNELS_SEND_MESSAGE
        - SLACK:CHANNELS_REPLY_MESSAGE
        - TELEGRAM:*
        - TELEGRAM:ON_NEW_MESSAGE
        - TELEGRAM:SEND_MESSAGE
        - INSTAGRAM:*
        - INSTAGRAM:ON_NEW_MESSAGE
        - INSTAGRAM:SEND_MESSAGE
        - MESSENGER:*
        - MESSENGER:ON_NEW_MESSAGE
        - MESSENGER:SEND_MESSAGE
        - MESSENGER:PAGES_LIST
        - TIKTOK:*
        - TIKTOK:ON_NEW_MESSAGE
        - TIKTOK:SEND_MESSAGE
        - WHATSAPP:*
        - WHATSAPP:ON_NEW_MESSAGE
        - WHATSAPP:ON_MESSAGE_STATUS_CHANGE
        - WHATSAPP:SEND_MESSAGE
        - WHATSAPP:SEND_MESSAGE_TEMPLATE
        - WHATSAPP:SEND_CONVERSION_EVENT
        - WHATSAPP:PHONE_NUMBERS_LIST
        - WHATSAPP:TEMPLATES_LIST
        - WHATSAPP:GET_TEMPLATES
        - WHATSAPP:GET_TEMPLATE
        - WHATSAPP:CREATE_TEMPLATE
        - WHATSAPP:GET_TEMPLATE_LIBRARY
        - WHATSAPP:CREATE_TEMPLATE_FROM_LIBRARY
        - WHATSAPP:EDIT_TEMPLATE
        - WHATSAPP:DELETE_TEMPLATE
        - WHATSAPP:DATASETS_LIST
        - GMAIL:*
        - GMAIL:ON_NEW_EMAIL
        - GMAIL:SEND_EMAIL
        - GMAIL:REPLY_EMAIL
        - GMAIL:FROM_EMAIL_LIST
        - GMAIL:LABELS_LIST
        - JAPIFON:*
        - JAPIFON:ON_NEW_MESSAGE
        - JAPIFON:MESSAGE_SEND
        - SMPP:*
        - SMPP:SEND_MESSAGE
        - SMPP:ON_MESSAGE_STATUS_CHANGE
        - TWILIO:*
        - TWILIO:ON_NEW_MESSAGE
        - TWILIO:SEND_MESSAGE
        - TWILIO:PHONE_NUMBERS_LIST
        - TELNYX:*
        - TELNYX:ON_NEW_MESSAGE
        - TELNYX:SEND_MESSAGE
        - TELNYX:PHONE_NUMBERS_LIST
        - RESEND:*
        - RESEND:ON_NEW_EMAIL
        - RESEND:SEND_EMAIL
        - STRIPE:*
        - STRIPE:CUSTOMERS_SEARCH
        - STRIPE:CUSTOMER_GET
        - STRIPE:CUSTOMER_CREATE
        - STRIPE:CUSTOMER_UPDATE
        - STRIPE:CHECKOUT_SESSION_CREATE
        - STRIPE:CHECKOUT_SESSION_GET
        - STRIPE:BILLING_PORTAL_SESSION_CREATE
        - STRIPE:CURRENCIES_LIST
        - STRIPE:PRICES_LIST
        - STRIPE:PAYMENT_LINK_CREATE
        - STRIPE:PAYMENT_LINK_GET
        - STRIPE:PAYMENT_GET
        - STRIPE:PAYMENT_REFUND
        - STRIPE:PAYMENTS_LIST
        - STRIPE:SUBSCRIPTION_CREATE
        - STRIPE:SUBSCRIPTION_GET
        - STRIPE:SUBSCRIPTION_UPDATE
        - STRIPE:SUBSCRIPTION_CANCEL
        - STRIPE:SUBSCRIPTIONS_LIST
        - STRIPE:INVOICE_CREATE
        - STRIPE:INVOICE_GET
        - STRIPE:INVOICE_SEND
        - STRIPE:INVOICES_LIST
        - SHOPIFY:*
        - SHOPIFY:PRODUCTS_SEARCH
        - SHOPIFY:PRODUCT_GET
        - SHOPIFY:PRODUCT_VARIANTS_SEARCH
        - SHOPIFY:ORDERS_SEARCH
        - SHOPIFY:ORDER_GET
        - SHOPIFY:ORDER_CREATE
        - SHOPIFY:ORDER_UPDATE
        - SHOPIFY:CUSTOMERS_SEARCH
        - SHOPIFY:CUSTOMER_GET
        - SHOPIFY:CUSTOMER_CREATE
        - SHOPIFY:CUSTOMER_UPDATE
        - SHOPIFY:INVENTORY_LEVELS_LIST
        - ZENDESK:*
        - ZENDESK:TICKET_SEARCH
        - ZENDESK:TICKET_GET
        - ZENDESK:TICKET_CREATE
        - ZENDESK:TICKET_UPDATE
        - ZENDESK:TICKET_REPLY
        - ZENDESK:TICKET_ADD_NOTE
        - ZENDESK:TICKET_COMMENTS_LIST
        - ZENDESK:TICKETS_LIST
        - ODOO:*
        - ODOO:LEADS_SEARCH
        - ODOO:LEAD_GET
        - ODOO:LEAD_CREATE
        - ODOO:LEAD_UPDATE
        - ODOO:LEAD_DELETE
        - ODOO:LEAD_CONVERT
        - ODOO:OPPORTUNITIES_SEARCH
        - ODOO:OPPORTUNITY_GET
        - ODOO:OPPORTUNITY_CREATE
        - ODOO:OPPORTUNITY_UPDATE
        - ODOO:OPPORTUNITY_DELETE
        - ODOO:CONTACTS_SEARCH
        - ODOO:STAGES_LIST
        - ODOO:TAGS_LIST
        - ODOO:CALENDARS_LIST
        - ODOO:CALENDAR_EVENTS_LIST
        - ODOO:CALENDAR_EVENT_CREATE
        - ODOO:CALENDAR_EVENT_UPDATE
        - ODOO:CALENDAR_EVENT_DELETE
        - ODOO:RECORDS_SEARCH
        - ODOO:ATTACHMENTS_UPLOAD
        - ODOO:ATTACHMENTS_LIST
        - ODOO:ATTACHMENTS_DOWNLOAD
        - ODOO:ATTACHMENTS_DELETE
        - WOOCOMMERCE:*
        - WOOCOMMERCE:PRODUCTS_SEARCH
        - WOOCOMMERCE:PRODUCT_GET
        - WOOCOMMERCE:PRODUCT_VARIATIONS_SEARCH
        - WOOCOMMERCE:CUSTOMERS_SEARCH
        - WOOCOMMERCE:CUSTOMER_GET
        - WOOCOMMERCE:CUSTOMER_CREATE
        - WOOCOMMERCE:CUSTOMER_UPDATE
        - WOOCOMMERCE:ORDERS_SEARCH
        - WOOCOMMERCE:ORDER_GET
        - WOOCOMMERCE:ORDER_CREATE
        - WOOCOMMERCE:ORDER_UPDATE
        - WOOCOMMERCE:ORDER_NOTE_CREATE
        - WOOCOMMERCE:COUPON_GET
        - WOOCOMMERCE:PRODUCT_CATEGORIES_LIST
      description: Type of the connection action
    SsoProviderSchema:
      type: string
      enum:
        - SAML
        - OIDC
      description: Identity provider protocol
    AssistantThreadModeSchema:
      type: string
      enum:
        - new
        - continue
      description: >-
        The thread mode of the assistant, either "new" for new threads or
        "continue" for continuing existing threads
    AssistantWidgetModeSchema:
      type: string
      enum:
        - button
        - omnibar
        - auto
      default: button
      description: >-
        Default shape of the embedded widget: corner bubble button, centered
        omnibar, or auto (omnibar until the visitor has a conversation). A mode
        attribute on the embed element overrides it, and a visitor’s own
        header-toggle pick outranks both on desktop; mobile has no toggle and
        always follows the attribute or this setting.
    AssistantWidgetAppearanceSchema:
      type: string
      enum:
        - auto
        - light
        - dark
      default: auto
      description: 'Theme of the widget: follow the visitor system or force one'
    AssistantWidgetPositionSchema:
      type: string
      enum:
        - right
        - left
      default: right
      description: >-
        Corner where the bubble launcher is anchored (the omnibar is always
        centered). A position attribute on the embed element overrides it.
    AssistantWidgetColorsConfigSchema:
      type: object
      properties:
        accent:
          type: string
          pattern: ^#[0-9a-f]{6}$/i
          description: Accent color used inside the chat (buttons, visitor messages, links)
        launcher_background:
          type: string
          pattern: ^#[0-9a-f]{6}$/i
          description: >-
            Background color of the widget button; the icon color adapts
            automatically
      default: {}
      description: Color overrides for the widget
    AssistantWidgetTeaserConfigSchema:
      type: object
      properties:
        enabled:
          type: boolean
        message:
          type: string
          maxLength: 140
          description: Short invitation shown next to the closed widget button
        modes:
          type: string
          enum:
            - all
            - button
            - omnibar
          default: all
          description: >-
            Which widget modes show the teaser: both, only the bubble button, or
            only the omnibar
        suggestions:
          type: string
          enum:
            - all
            - button
            - omnibar
            - none
          default: button
          description: >-
            Which widget modes show the suggested replies with the teaser, or
            none. Defaults to the bubble button; the omnibar already shows them
            when focused, independent of this setting.
        delay_seconds:
          type: integer
          minimum: 0
          maximum: 120
          default: 3
          description: Seconds to wait before showing the teaser
        frequency:
          $ref: '#/components/schemas/AssistantWidgetTeaserFrequencySchema'
        devices:
          $ref: '#/components/schemas/AssistantWidgetTeaserDevicesSchema'
        version:
          type: integer
          minimum: 1
          default: 1
          description: Bump to show the teaser again to visitors who already dismissed it
      default: {}
      description: >-
        Proactive teaser configuration for the widget. The suggested replies
        shown with the teaser come from conversation.suggested_messages.
    PublicAssistantWidgetChannelSchema:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/AssistantWidgetChannelTypeSchema'
        label:
          type: string
        url:
          type: string
      required:
        - type
        - url
      description: A resolved widget channel link
    AssistantWidgetTeaserFrequencySchema:
      type: string
      enum:
        - once_per_visitor
        - once_per_session
        - every_visit
      default: once_per_visitor
      description: How often the teaser can show again to the same visitor
    AssistantWidgetTeaserDevicesSchema:
      type: string
      enum:
        - all
        - desktop
        - mobile
      default: desktop
      description: Devices where the teaser shows
    AssistantWidgetChannelTypeSchema:
      type: string
      enum:
        - whatsapp
        - messenger
        - instagram
        - telegram
        - email
        - phone
        - link
      description: Type of a widget channel link
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````