---
openapi: 3.1.0
info:
  title: Carom API
  version: 1.0.0
  description: 'Main Hanami JSON API. UUID identifiers; ISO 8601 dates and timestamps.
    x-api-key-access is read (either key tier), write (read_write tier), or none (no
    API key authentication). Public operations override security with an empty array.
    x-error-codes contains an enum of known reachable error codes; x-error-code-registry
    maps registered codes to HTTP status. Error codes are not exhaustive for dynamic
    provider failures. Authenticated requests are rate limited per credential: 600
    requests per minute for each API key, and 1,200 per minute for a user across all
    of their sessions. Over the limit, the API answers 429 rate_limited with a Retry-After
    header in seconds.'
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
- url: https://api.carom.io
security:
- bearerAuth: []
tags:
- name: access_tokens
  description: Access tokens operations
- name: accounts
  description: Accounts operations
- name: agent_configurations
  description: Agent configurations operations
- name: api_keys
  description: Api keys operations
- name: attachments
  description: Attachments operations
- name: calendar_events
  description: Calendar events operations
- name: calendars
  description: Calendars operations
- name: contacts
  description: Contacts operations
- name: conversations
  description: Conversations operations
- name: daily_briefings
  description: Daily briefings operations
- name: dashboard
  description: Dashboard operations
- name: deals
  description: Deals operations
- name: device_tokens
  description: Device tokens operations
- name: drafts
  description: Drafts operations
- name: duplicates
  description: Duplicates operations
- name: files
  description: Files operations
- name: groups
  description: Groups operations
- name: mailboxes
  description: Mailboxes operations
- name: milestones
  description: Milestones operations
- name: notifications
  description: Notifications operations
- name: organizations
  description: Organizations operations
- name: pipelines
  description: Pipelines operations
- name: proposals
  description: Proposals operations
- name: records
  description: Records operations
- name: search
  description: Search operations
- name: sessions
  description: Sessions operations
- name: share_requests
  description: Share requests operations
- name: socket_tickets
  description: Socket tickets operations
- name: spaces
  description: Spaces operations
- name: tags
  description: Tags operations
- name: tasks
  description: Tasks operations
- name: terms_assents
  description: Terms assents operations
- name: threads
  description: Threads operations
- name: timeline
  description: Timeline operations
- name: uploads
  description: Uploads operations
- name: users
  description: Users operations
- name: waitlistees
  description: Waitlistees operations
paths:
  "/access_tokens":
    post:
      operationId: post_access_tokens
      summary: access_tokens / create
      tags:
      - access_tokens
      x-api-key-access: none
      security: []
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AccessTokensCreateRequest"
      x-error-codes:
        enum:
        - could_not_save_access_token
        - could_not_save_refresh_token
        - duplicate_refresh_attempted
        - error
        - expired_refresh_token
        - invalid_refresh_token
        - invalid_request
        - rate_limited
        - record_not_found
        - token_revoked
        - token_theft_detected
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/RefreshExchangeResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Exchange a refresh token from the JSON body or refresh_token cookie.
        The response includes a raw refresh_token only when one was presented in the
        body. Also rotates the HttpOnly refresh cookie.
  "/api_keys":
    get:
      operationId: get_api_keys
      summary: api_keys / index
      tags:
      - api_keys
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/APIKeyListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_api_keys
      summary: api_keys / create
      tags:
      - api_keys
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ApiKeysCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/APIKeyWithSecretResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/api_keys/{id}":
    delete:
      operationId: delete_api_keys_id
      summary: api_keys / destroy
      tags:
      - api_keys
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - forbidden
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/agent_configurations":
    get:
      operationId: get_agent_configurations
      summary: agent_configurations / index
      tags:
      - agent_configurations
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AgentConfigurationsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/agent_configurations/{agent_slug}":
    patch:
      operationId: patch_agent_configurations_agent_slug
      summary: agent_configurations / update
      tags:
      - agent_configurations
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AgentConfigurationsUpdateRequest"
      parameters:
      - name: agent_slug
        in: path
        required: true
        description: Any other slug is a 404 `record_not_found`.
        schema:
          type: string
          enum:
          - auto_tag
          - auto_task
          - auto_summarize
          - auto_deal
          - auto_enrich
          - auto_meeting
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AgentConfigurationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/accounts/{id}":
    get:
      operationId: get_accounts_id
      summary: accounts / show
      tags:
      - accounts
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - billing_unavailable
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AccountBillingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
    patch:
      operationId: patch_accounts_id
      summary: accounts / update
      tags:
      - accounts
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AccountsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AccountResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_accounts_id
      summary: accounts / destroy
      tags:
      - accounts
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AccountsDestroyRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - billing_unavailable
        - could_not_mark_as_closed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/accounts/throttle_check":
    get:
      operationId: get_accounts_throttle_check
      summary: accounts / throttle_check
      tags:
      - accounts
      x-api-key-access: none
      security: []
      x-error-codes:
        enum:
        - error
        - invalid_credentials
        - invalid_request
        - permission_denied
        - record_not_found
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ThrottleCheckResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '500':
          "$ref": "#/components/responses/Error500"
  "/accounts":
    post:
      operationId: post_accounts
      summary: accounts / create
      tags:
      - accounts
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AccountsCreateRequest"
      x-error-codes:
        enum:
        - account_creation_failed
        - card_declined
        - could_not_create_stripe_account
        - could_not_save_access_token
        - could_not_save_refresh_token
        - documents_required
        - email_address_in_use
        - error
        - identity_already_linked
        - incomplete_acceptance
        - invalid_acceptance_method
        - invalid_email_address
        - invalid_request
        - invalid_signup_token
        - invitation_required
        - mailbox_creation_failed
        - owner_assignment_failed
        - provider_lookup_unavailable
        - rate_limited
        - record_not_found
        - session_creation_failed
        - stripe_account_creation_failed
        - subscription_failed
        - unknown_document
        - unsupported_provider
        - user_creation_failed
        - work_account_required
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AccountWithOwnerSessionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '402':
          "$ref": "#/components/responses/Error402"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
        '503':
          "$ref": "#/components/responses/Error503"
  "/accounts/{id}/initialize":
    get:
      operationId: get_accounts_id_initialize
      summary: accounts / initialize
      tags:
      - accounts
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - mailbox_not_connected
        - outbound_disabled
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/InitializationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_accounts_id_initialize
      summary: accounts / initialize
      tags:
      - accounts
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - mailbox_not_connected
        - outbound_disabled
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/accounts/credit_cards":
    post:
      operationId: post_accounts_credit_cards
      summary: accounts / credit_cards / create
      tags:
      - accounts
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - setup_intent_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CardSetupResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
    patch:
      operationId: patch_accounts_credit_cards
      summary: accounts / credit_cards / update
      tags:
      - accounts
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AccountsCreditCardsUpdateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - customer_update_failed
        - error
        - invalid_request
        - payment_method_attach_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - recovery_request_failed
        - subscription_update_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SuccessResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/attachments/{id}/presigned_urls":
    post:
      operationId: post_attachments_id_presigned_urls
      summary: attachments / presigned_urls / create
      tags:
      - attachments
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - source_fetch_failed
        - source_handle_unavailable
        - source_too_large
        - storage_unavailable
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PresignedUrlResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '413':
          "$ref": "#/components/responses/Error413"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/calendars":
    get:
      operationId: get_calendars
      summary: calendars / index
      tags:
      - calendars
      x-api-key-access: read
      parameters:
      - name: mailbox_id
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendars/{id}":
    patch:
      operationId: patch_calendars_id
      summary: calendars / update
      tags:
      - calendars
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CalendarsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Mailbox owner only, like PATCH /mailboxes/{id}; other users, including
        account admins, get 403 permission_denied.
  "/users/{user_id}/calendar_subscriptions":
    post:
      operationId: post_users_user_id_calendar_subscriptions
      summary: users / calendar_subscriptions / create
      tags:
      - users
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersCalendarSubscriptionsCreateRequest"
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarSubscriptionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/{user_id}/calendar_subscriptions/{id}":
    patch:
      operationId: patch_users_user_id_calendar_subscriptions_id
      summary: users / calendar_subscriptions / update
      tags:
      - users
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersCalendarSubscriptionsUpdateRequest"
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarSubscriptionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_users_user_id_calendar_subscriptions_id
      summary: users / calendar_subscriptions / destroy
      tags:
      - users
      x-api-key-access: write
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/comments":
    get:
      operationId: get_organizations_organization_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_organizations_organization_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/comments":
    get:
      operationId: get_files_file_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_files_file_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/comments":
    get:
      operationId: get_contacts_contact_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_contacts_contact_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{calendar_event_id}/comments":
    get:
      operationId: get_calendar_events_calendar_event_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_calendar_events_calendar_event_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/comments":
    get:
      operationId: get_threads_thread_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_threads_thread_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/spaces/{space_id}/comments":
    get:
      operationId: get_spaces_space_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_spaces_space_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{deal_id}/comments":
    get:
      operationId: get_deals_deal_id_comments
      summary: records / comments / index
      tags:
      - records
      x-api-key-access: read
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_deals_deal_id_comments
      summary: records / comments / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsCreateRequest"
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - comment_creation_failed
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/comments/{id}":
    patch:
      operationId: patch_comments_id
      summary: records / comments / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CommentResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_comments_id
      summary: records / comments / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts":
    get:
      operationId: get_contacts
      summary: contacts / index
      tags:
      - contacts
      x-api-key-access: read
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
        description: Substring match on a contact's name, background notes, or any of
          its email addresses.
      - "$ref": "#/components/parameters/ContactVisibilityScope"
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - name: sort
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: 'Supported sorts: priority, last_contact, thread_count, name.
          Unknown or missing values use priority; the envelope still echoes the supplied
          value.'
      - name: order
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - asc
          - desc
          - null
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque continuation token from collection.page_info.next_cursor.
          Omit to start at the head. A token minted by another list or under another
          sort or order returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Reserved. A nonblank value returns 400 unsupported_cursor_direction.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unsupported_cursor_direction
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ContactsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Cursor-paginated. Use collection.page_info for continuation. Fixed
        page size of 50.
    post:
      operationId: post_contacts
      summary: contacts / create
      tags:
      - contacts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ContactsUpdateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - duplicate_association_record
        - error
        - invalid_request
        - missing_email
        - missing_name_or_email
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unable_to_save_associations
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/count":
    get:
      operationId: get_contacts_count
      summary: contacts / count
      tags:
      - contacts
      x-api-key-access: read
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
        description: Substring match on a contact's name, background notes, or any of
          its email addresses.
      - "$ref": "#/components/parameters/ContactVisibilityScope"
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: cap
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
        description: Positive count ceiling. When exceeded, count.total equals cap,
          count.capped is true and count.exact is false.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}/discussion":
    get:
      operationId: get_contacts_id_discussion
      summary: contacts / discussion / show
      tags:
      - contacts
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DiscussionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}":
    get:
      operationId: get_contacts_id
      summary: contacts / show
      tags:
      - contacts
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExpandedContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_contacts_id
      summary: contacts / update
      tags:
      - contacts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ContactsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - duplicate_association_record
        - error
        - invalid_request
        - missing_email
        - missing_name_or_email
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unable_to_save_associations
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_contacts_id
      summary: contacts / delete
      tags:
      - contacts
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - contact_has_deals
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}/global":
    patch:
      operationId: patch_contacts_id_global
      summary: contacts / global
      tags:
      - contacts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ContactsGlobalRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - cannot_unglobalize
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}/duplicates":
    get:
      operationId: get_contacts_id_duplicates
      summary: duplicates / index
      tags:
      - duplicates
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DuplicatesIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/duplicates/{duplicate_id}/reject":
    post:
      operationId: post_contacts_contact_id_duplicates_duplicate_id_reject
      summary: duplicates / reject
      tags:
      - duplicates
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: duplicate_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/duplicates/{duplicate_id}/unreject":
    post:
      operationId: post_contacts_contact_id_duplicates_duplicate_id_unreject
      summary: duplicates / unreject
      tags:
      - duplicates
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: duplicate_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}/merge":
    post:
      operationId: post_contacts_id_merge
      summary: contacts / merge
      tags:
      - contacts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ContactsMergeRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - contacts_not_editable
        - error
        - invalid_request
        - merge_failed
        - missing_source_contacts
        - permission_denied
        - rate_limited
        - record_not_found
        - target_in_sources
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/dashboard":
    get:
      operationId: get_dashboard
      summary: dashboard / index
      tags:
      - dashboard
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DashboardResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/daily_briefing":
    get:
      operationId: get_daily_briefing
      summary: daily_briefings / show
      tags:
      - daily_briefings
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DailyBriefingShowResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_daily_briefing
      summary: daily_briefings / create
      tags:
      - daily_briefings
      x-api-key-access: write
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DailyBriefingResponse"
        '202':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DailyBriefingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/count":
    get:
      operationId: get_calendar_events_count
      description: Exact count with the same record, visibility and list filters;
        pagination is ignored.
      summary: calendar_events / count
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: space_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: organization_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: contact_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: deal_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: calendar_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: start_date
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: end_date
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - "$ref": "#/components/parameters/Scope"
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events":
    get:
      operationId: get_calendar_events
      description: Events filtered by record and existing calendar filters. Deal membership
        follows its counterparty. An open-ended date-only start_date selects starts
        on or after local midnight in the viewer time zone; bounded windows retain
        overlap semantics.
      summary: calendar_events / index
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: space_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: organization_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: contact_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: deal_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: calendar_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: start_date
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: end_date
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - "$ref": "#/components/parameters/Scope"
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque token from collection.page_info.next_cursor; pages later
          in time. A token minted by another list returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque token from collection.page_info.prev_cursor; pages earlier
          in time and takes precedence over next_cursor. A token minted by another
          list returns 400 invalid_cursor.
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          default: 100
        description: Results per request; clamped to 1–250.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarEventsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{id}/discussion":
    get:
      operationId: get_calendar_events_id_discussion
      summary: calendar_events / discussion / show
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DiscussionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{id}":
    get:
      operationId: get_calendar_events_id
      summary: calendar_events / show
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CalendarEventResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{calendar_event_id}/brief":
    get:
      operationId: get_calendar_events_calendar_event_id_brief
      summary: calendar_events / briefs / show
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/BriefListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_calendar_events_calendar_event_id_brief
      summary: calendar_events / briefs / create
      tags:
      - calendar_events
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/CalendarEventsBriefsCreateRequest"
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/BriefResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{calendar_event_id}/transcript":
    get:
      operationId: get_calendar_events_calendar_event_id_transcript
      summary: calendar_events / transcripts / show
      description: 404 `no_transcript` means the viewer can see the meeting but it
        has no transcript; 404 `record_not_found` means the meeting does not exist
        or is not visible.
      tags:
      - calendar_events
      x-api-key-access: read
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - no_transcript
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MeetingTranscriptResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files":
    get:
      operationId: get_files
      summary: files / index
      tags:
      - files
      x-api-key-access: read
      parameters:
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - "$ref": "#/components/parameters/SpaceScope"
      - name: include_decorative
        in: query
        required: false
        description: Include signature logos, tracking pixels and quoted-history images (attachments with `decorative`). Defaults to false.
        schema:
          type: boolean
      - name: type
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: sender
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - "$ref": "#/components/parameters/Scope"
      - name: first_sent_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: last_sent_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: participant
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - name: sort
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - name
          - size
          - attachment_count
          - last_sent_at
          -
      - name: order
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - asc
          - desc
          -
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque continuation token from collection.page_info.next_cursor.
          Omit to start at the head. A token minted by another list or under another
          sort or order returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Reserved. A nonblank value returns 400 unsupported_cursor_direction.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unsupported_cursor_direction
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FilesIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Cursor-paginated. Use collection.page_info for continuation. Fixed
        page size of 50. A contact_id, organization_id or space_id the caller cannot
        see is 404 record_not_found. A visible scope record with no reachable addresses
        (including a contact whose interactions are not shared with the caller) lists
        nothing.
  "/files/count":
    get:
      operationId: get_files_count
      summary: files / count
      tags:
      - files
      x-api-key-access: read
      parameters:
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - "$ref": "#/components/parameters/SpaceScope"
      - name: include_decorative
        in: query
        required: false
        description: Include signature logos, tracking pixels and quoted-history images (attachments with `decorative`). Defaults to false.
        schema:
          type: boolean
      - name: type
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: sender
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - "$ref": "#/components/parameters/Scope"
      - name: first_sent_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: last_sent_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: participant
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: cap
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
        description: Positive count ceiling. When exceeded, count.total equals cap,
          count.capped is true and count.exact is false.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{id}":
    get:
      operationId: get_files_id
      summary: files / show
      tags:
      - files
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FileResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_files_id
      summary: files / update
      tags:
      - files
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/FilesUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/FileResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{id}/download":
    get:
      operationId: get_files_id_download
      summary: files / download
      tags:
      - files
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: attachment_id
        in: query
        required: true
        schema:
          type: string
          minLength: 1
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - source_fetch_failed
        - source_handle_unavailable
        - source_too_large
        - storage_unavailable
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            "*/*":
              schema:
                type: string
                format: binary
          headers:
            Content-Disposition:
              schema:
                type: string
              description: Attachment filename, including UTF-8 filename*.
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '413':
          "$ref": "#/components/responses/Error413"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
      description: Returns attachment bytes. Content-Type follows the file extension, falling
        back to application/octet-stream. attachment_id must belong to the file named in the path.
  "/threads/{thread_id}/flag":
    post:
      operationId: post_threads_thread_id_flag
      summary: threads / flags / create
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_threads_thread_id_flag
      summary: threads / flags / destroy
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/groups":
    get:
      operationId: get_groups
      summary: groups / index
      tags:
      - groups
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GroupsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_groups
      summary: groups / create
      tags:
      - groups
      x-api-key-access: write
      parameters:
      - "$ref": "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/GroupsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - idempotency_key_in_use
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GroupResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '409':
          "$ref": "#/components/responses/Error409"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/groups/{id}":
    get:
      operationId: get_groups_id
      summary: groups / show
      tags:
      - groups
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GroupResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_groups_id
      summary: groups / update
      tags:
      - groups
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/GroupsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/GroupResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_groups_id
      summary: groups / destroy
      tags:
      - groups
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/mailboxes":
    get:
      operationId: get_mailboxes
      summary: mailboxes / index
      tags:
      - mailboxes
      x-api-key-access: read
      parameters:
      - name: expanded
        in: query
        required: false
        schema:
          type: boolean
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxesIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_mailboxes
      summary: mailboxes / create
      tags:
      - mailboxes
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MailboxesCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - billable_add_disabled
        - error
        - invalid_email_address
        - invalid_request
        - mailbox_already_exists
        - mailbox_creation_failed
        - permission_denied
        - provider_lookup_unavailable
        - rate_limited
        - record_not_found
        - subscription_failed
        - terms_acceptance_required
        - unauthorized
        - user_deactivated
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '503':
          "$ref": "#/components/responses/Error503"
  "/mailboxes/{id}":
    get:
      operationId: get_mailboxes_id
      summary: mailboxes / show
      tags:
      - mailboxes
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: grants
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_grants
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxWithAdminDataResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_mailboxes_id
      summary: mailboxes / destroy
      tags:
      - mailboxes
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_delete
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_mailboxes_id
      summary: mailboxes / update
      tags:
      - mailboxes
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MailboxesUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_policy
        - invalid_request
        - no_updates
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/mailboxes/{id}/lock":
    patch:
      operationId: patch_mailboxes_id_lock
      summary: mailboxes / lock
      tags:
      - mailboxes
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - mailbox_lock_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/mailboxes/{id}/unlock":
    patch:
      operationId: patch_mailboxes_id_unlock
      summary: mailboxes / unlock
      tags:
      - mailboxes
      x-api-key-access: none
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MailboxesUnlockRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - globalize_contacts_failed
        - invalid_request
        - mailbox_unlock_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/mailboxes/{id}/connect":
    patch:
      operationId: patch_mailboxes_id_connect
      summary: mailboxes / connect
      tags:
      - mailboxes
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MailboxesConnectRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - authorization_not_persisted
        - billable_add_disabled
        - error
        - invalid_oauth_state
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - required_permissions_missing
        - terms_acceptance_required
        - token_exchange_failed
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/mailboxes/{mailbox_id}/imports":
    post:
      operationId: post_mailboxes_mailbox_id_imports
      summary: mailboxes / imports / create
      tags:
      - mailboxes
      x-api-key-access: write
      parameters:
      - name: mailbox_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - mailbox_not_connected
        - outbound_disabled
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Start a full import. Owner only; other users get 403 permission_denied,
        even on a team-visible mailbox. The first import applies the mailbox's saved
        contact_policy and interaction_sharing, so set them with PATCH /mailboxes/{id}
        before calling this.
  "/mailboxes/{mailbox_id}/grants":
    get:
      operationId: get_mailboxes_mailbox_id_grants
      summary: mailboxes / grants / index
      tags:
      - mailboxes
      x-api-key-access: read
      parameters:
      - name: mailbox_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxGrantListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_mailboxes_mailbox_id_grants
      summary: mailboxes / grants / create
      tags:
      - mailboxes
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MailboxesGrantsCreateRequest"
      parameters:
      - name: mailbox_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_level
        - invalid_principal
        - invalid_request
        - permission_denied
        - principal_not_in_account
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxGrantResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/mailboxes/{mailbox_id}/grants/{id}":
    delete:
      operationId: delete_mailboxes_mailbox_id_grants_id
      summary: mailboxes / grants / destroy
      tags:
      - mailboxes
      x-api-key-access: none
      parameters:
      - name: mailbox_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/drafts":
    get:
      operationId: get_drafts
      summary: drafts / index
      tags:
      - drafts
      x-api-key-access: read
      parameters:
      - name: thread_id
        in: query
        required: false
        schema:
          type: string
          minLength: 1
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DraftListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_drafts
      summary: drafts / create
      tags:
      - drafts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DraftsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_draft_type
        - invalid_request
        - missing_thread_id
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DraftResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/drafts/{id}":
    get:
      operationId: get_drafts_id
      summary: drafts / show
      tags:
      - drafts
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DraftResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_drafts_id
      summary: drafts / update
      tags:
      - drafts
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DraftsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - capability_not_granted
        - error
        - invalid_request
        - mailbox_not_authorized
        - not_editable_status
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DraftResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_drafts_id
      summary: drafts / destroy
      tags:
      - drafts
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - not_editable_status
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/drafts/{id}/send":
    post:
      operationId: post_drafts_id_send
      summary: drafts / send
      tags:
      - drafts
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - enqueue_failed
        - error
        - invalid_email_address
        - invalid_request
        - missing_body
        - no_recipients
        - not_sendable_status
        - outbound_disabled
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - too_many_recipients
        - unauthorized
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DraftResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/users/{user_id}/mailbox_subscriptions":
    post:
      operationId: post_users_user_id_mailbox_subscriptions
      summary: users / mailbox_subscriptions / create
      tags:
      - users
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersMailboxSubscriptionsCreateRequest"
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxSubscriptionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/{user_id}/mailbox_subscriptions/{id}":
    patch:
      operationId: patch_users_user_id_mailbox_subscriptions_id
      summary: users / mailbox_subscriptions / update
      tags:
      - users
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersMailboxSubscriptionsUpdateRequest"
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MailboxSubscriptionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_users_user_id_mailbox_subscriptions_id
      summary: users / mailbox_subscriptions / destroy
      tags:
      - users
      x-api-key-access: write
      parameters:
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/milestones":
    get:
      operationId: get_milestones
      summary: milestones / index
      tags:
      - milestones
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MilestonesIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_milestones
      summary: milestones / create
      tags:
      - milestones
      x-api-key-access: write
      parameters:
      - "$ref": "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MilestonesCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - idempotency_key_in_use
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MilestoneResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '409':
          "$ref": "#/components/responses/Error409"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/milestones/{id}":
    get:
      operationId: get_milestones_id
      summary: milestones / show
      tags:
      - milestones
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MilestoneResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_milestones_id
      summary: milestones / update
      tags:
      - milestones
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/MilestonesUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/MilestoneResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_milestones_id
      summary: milestones / delete
      tags:
      - milestones
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications":
    get:
      operationId: get_notifications
      summary: notifications / index
      tags:
      - notifications
      x-api-key-access: read
      parameters:
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated notification event names from NotificationRepo::FILTERABLE_EVENTS.
      - name: status
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - unread
          -
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          default: 50
        description: Results per request; positive values capped at 100. Zero or negative
          values use 50.
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque continuation token from collection.page_info.next_cursor.
          Omit to start at the head. A token minted by another list returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Reserved. A nonblank value returns 400 unsupported_cursor_direction.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unsupported_cursor_direction
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Cursor-paginated. Use collection.page_info for continuation.
  "/notifications/snapshot":
    get:
      operationId: get_notifications_snapshot
      summary: notifications / snapshot
      tags:
      - notifications
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationSnapshot"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/count":
    get:
      operationId: get_notifications_count
      summary: notifications / count
      tags:
      - notifications
      x-api-key-access: read
      parameters:
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated notification event names from NotificationRepo::FILTERABLE_EVENTS.
      - name: status
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - unread
          -
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/seen":
    post:
      operationId: post_notifications_seen
      summary: notifications / seen
      tags:
      - notifications
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/read":
    post:
      operationId: post_notifications_read
      summary: notifications / read
      tags:
      - notifications
      x-api-key-access: write
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationReadCounts"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/{id}/read":
    post:
      operationId: post_notifications_id_read
      summary: notifications / read_one
      tags:
      - notifications
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/{id}/unread":
    post:
      operationId: post_notifications_id_unread
      summary: notifications / unread
      tags:
      - notifications
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/{id}/undismiss":
    post:
      operationId: post_notifications_id_undismiss
      summary: notifications / undismiss
      tags:
      - notifications
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/NotificationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/{id}/dismiss":
    post:
      operationId: post_notifications_id_dismiss
      summary: notifications / dismiss_one
      description: Dismisses the one notification named in the path. Takes no body;
        bulk dismissal is POST /notifications/dismiss. Returns 404 record_not_found
        when the current user is not a recipient of the notification.
      tags:
      - notifications
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/notifications/dismiss":
    post:
      operationId: post_notifications_dismiss
      summary: notifications / dismiss
      tags:
      - notifications
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/NotificationsDismissRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/device_tokens":
    post:
      operationId: post_device_tokens
      summary: device_tokens / create
      tags:
      - device_tokens
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DeviceTokensCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - conflict
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DeviceTokenResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_device_tokens
      summary: device_tokens / destroy
      tags:
      - device_tokens
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DeviceTokensDestroyRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations":
    get:
      operationId: get_organizations
      summary: organizations / index
      tags:
      - organizations
      x-api-key-access: read
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - name: sort
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: 'Supported sorts: name, contact_count, thread_count, file_count.
          Unknown or missing values use name; the envelope still echoes the supplied
          value.'
      - name: order
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - asc
          - desc
          - null
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque continuation token from collection.page_info.next_cursor.
          Omit to start at the head. A token minted by another list or under another
          sort or order returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Reserved. A nonblank value returns 400 unsupported_cursor_direction.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unsupported_cursor_direction
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OrganizationsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Cursor-paginated. Use collection.page_info for continuation. Fixed
        page size of 50.
    post:
      operationId: post_organizations
      summary: organizations / create
      tags:
      - organizations
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/OrganizationsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OrganizationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/count":
    get:
      operationId: get_organizations_count
      summary: organizations / count
      tags:
      - organizations
      x-api-key-access: read
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: cap
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
        description: Positive count ceiling. When exceeded, count.total equals cap,
          count.capped is true and count.exact is false.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{id}/discussion":
    get:
      operationId: get_organizations_id_discussion
      summary: organizations / discussion / show
      tags:
      - organizations
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DiscussionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{id}":
    get:
      operationId: get_organizations_id
      summary: organizations / show
      tags:
      - organizations
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ExpandedOrganizationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_organizations_id
      summary: organizations / update
      tags:
      - organizations
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/OrganizationsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/OrganizationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_organizations_id
      summary: organizations / delete
      tags:
      - organizations
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - organization_has_deals
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/pin":
    post:
      operationId: post_contacts_contact_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_contacts_contact_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/pin":
    post:
      operationId: post_organizations_organization_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_organizations_organization_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/milestones/{milestone_id}/pin":
    post:
      operationId: post_milestones_milestone_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: milestone_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_milestones_milestone_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: milestone_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/pin":
    post:
      operationId: post_files_file_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_files_file_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/spaces/{space_id}/pin":
    post:
      operationId: post_spaces_space_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_spaces_space_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: space_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/pipelines/{pipeline_id}/pin":
    post:
      operationId: post_pipelines_pipeline_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: pipeline_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_pipelines_pipeline_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: pipeline_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{deal_id}/pin":
    post:
      operationId: post_deals_deal_id_pin
      summary: records / pin / create
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_deals_deal_id_pin
      summary: records / pin / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/comments/{comment_id}/reactions":
    post:
      operationId: post_comments_comment_id_reactions
      summary: records / comments / reactions / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsReactionsCreateRequest"
      parameters:
      - name: comment_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ReactionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/comments/{comment_id}/reactions/{id}":
    delete:
      operationId: delete_comments_comment_id_reactions_id
      summary: records / comments / reactions / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: comment_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_comments_comment_id_reactions_id
      summary: records / comments / reactions / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsCommentsReactionsCreateRequest"
      parameters:
      - name: comment_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ReactionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/read":
    post:
      operationId: post_threads_thread_id_read
      summary: threads / reads / create
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_threads_thread_id_read
      summary: threads / reads / destroy
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/search":
    post:
      operationId: post_search
      summary: search / create
      tags:
      - search
      x-api-key-access: read
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SearchCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SearchResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/sessions":
    get:
      operationId: get_sessions
      summary: sessions / index
      tags:
      - sessions
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SessionsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_sessions
      summary: sessions / create
      tags:
      - sessions
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsCreateRequest"
      x-error-codes:
        enum:
        - account_closed
        - could_not_save_access_token
        - could_not_save_refresh_token
        - error
        - invalid_handoff_code
        - invalid_invitation
        - invalid_oauth_state
        - invalid_request
        - invitation_email_mismatch
        - missing_params
        - oauth_exchange_failed
        - rate_limited
        - record_not_found
        - session_creation_failed
        - unsupported_provider
        - user_deactivated
        - work_account_required
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SessionCreateResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Redeem a handoff_code, or provider + oauth_code + oauth_state.
        Native handoff authentication includes session.refresh_token; web authentication
        uses the HttpOnly cookie.
  "/sessions/demo":
    post:
      operationId: post_sessions_demo
      summary: sessions / demo / create
      tags:
      - sessions
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsDemoCreateRequest"
      x-error-codes:
        enum:
        - error
        - invalid_credentials
        - invalid_email_address
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DemoCreatedResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/sessions/demo/claim":
    post:
      operationId: post_sessions_demo_claim
      summary: sessions / demo / claim
      tags:
      - sessions
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsDemoClaimRequest"
      x-error-codes:
        enum:
        - could_not_save_access_token
        - could_not_save_refresh_token
        - error
        - invalid_credentials
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - session_creation_failed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CurrentSessionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/sessions/demo/switch":
    post:
      operationId: post_sessions_demo_switch
      summary: sessions / demo / switch
      tags:
      - sessions
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsDemoSwitchRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_save_access_token
        - could_not_save_refresh_token
        - error
        - forbidden
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - session_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CurrentSessionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/sessions/lookup":
    post:
      operationId: post_sessions_lookup
      summary: sessions / lookup
      tags:
      - sessions
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsLookupRequest"
      x-error-codes:
        enum:
        - error
        - invalid_credentials
        - invalid_email_address
        - invalid_request
        - missing_email
        - permission_denied
        - provider_lookup_unavailable
        - rate_limited
        - record_not_found
        - unsupported_provider
        - unsupported_redirect_uri
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SessionLookupResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '503':
          "$ref": "#/components/responses/Error503"
  "/sessions/{id}":
    delete:
      operationId: delete_sessions_id
      summary: sessions / destroy
      tags:
      - sessions
      x-api-key-access: none
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SessionsDestroyRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: string
            const: current
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_revoke_access_token
        - could_not_revoke_refresh_token
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/socket_tickets":
    post:
      operationId: post_socket_tickets
      summary: socket_tickets / create
      tags:
      - socket_tickets
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SocketTicketResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/shares":
    post:
      operationId: post_files_file_id_shares
      summary: records / shares / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesCreateRequest"
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - no_recipients
        - operation_failed
        - permission_denied
        - rate_limited
        - recipient_not_in_account
        - record_not_found
        - share_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/shares/{id}":
    patch:
      operationId: patch_files_file_id_shares_id
      summary: records / shares / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesUpdateRequest"
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_files_file_id_shares_id
      summary: records / shares / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/shares":
    post:
      operationId: post_threads_thread_id_shares
      summary: records / shares / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesCreateRequest"
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - no_recipients
        - operation_failed
        - permission_denied
        - rate_limited
        - recipient_not_in_account
        - record_not_found
        - share_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/shares/{id}":
    patch:
      operationId: patch_threads_thread_id_shares_id
      summary: records / shares / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesUpdateRequest"
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_threads_thread_id_shares_id
      summary: records / shares / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/shares":
    post:
      operationId: post_contacts_contact_id_shares
      summary: records / shares / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesCreateRequest"
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - no_recipients
        - operation_failed
        - permission_denied
        - rate_limited
        - recipient_not_in_account
        - record_not_found
        - share_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/shares/{id}":
    patch:
      operationId: patch_contacts_contact_id_shares_id
      summary: records / shares / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesUpdateRequest"
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_contacts_contact_id_shares_id
      summary: records / shares / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/shares":
    post:
      operationId: post_organizations_organization_id_shares
      summary: records / shares / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesCreateRequest"
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - no_recipients
        - operation_failed
        - permission_denied
        - rate_limited
        - recipient_not_in_account
        - record_not_found
        - share_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/shares/{id}":
    patch:
      operationId: patch_organizations_organization_id_shares_id
      summary: records / shares / update
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsSharesUpdateRequest"
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_organizations_organization_id_shares_id
      summary: records / shares / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{id}/share_requests":
    post:
      operationId: post_contacts_id_share_requests
      summary: share_requests / create
      tags:
      - share_requests
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ShareRequestsCreateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - duplicate_share_request
        - error
        - ineligible_recipients
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareRequestResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/share_requests":
    get:
      operationId: get_share_requests
      summary: share_requests / index
      tags:
      - share_requests
      x-api-key-access: read
      parameters:
      - name: role
        in: query
        required: false
        schema:
          type: string
          enum:
          - requester
          - recipient
          default: recipient
        description: requester selects the requester view; recipient (the default)
          selects the recipient inbox view. Any other value is 400 invalid_request.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareRequestIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/share_requests/{id}":
    patch:
      operationId: patch_share_requests_id
      summary: share_requests / amend
      tags:
      - share_requests
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ShareRequestsAmendRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - ineligible_recipients
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ShareRequestResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_share_requests_id
      summary: share_requests / withdraw
      tags:
      - share_requests
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/share_requests/{id}/respond":
    post:
      operationId: post_share_requests_id_respond
      summary: share_requests / respond
      tags:
      - share_requests
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ShareRequestsRespondRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - already_responded
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - invalid_share_scope
        - no_recipients
        - permission_denied
        - rate_limited
        - recipient_not_in_account
        - record_not_found
        - share_creation_failed
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/pipelines":
    get:
      operationId: get_pipelines
      summary: pipelines / index
      tags:
      - pipelines
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PipelineListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_pipelines
      summary: pipelines / create
      tags:
      - pipelines
      x-api-key-access: write
      parameters:
      - "$ref": "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PipelinesCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - idempotency_key_in_use
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PipelineResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '409':
          "$ref": "#/components/responses/Error409"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/pipelines/{id}/report":
    get:
      operationId: get_pipelines_id_report
      summary: pipelines / report
      tags:
      - pipelines
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PipelineReportResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/pipelines/{id}":
    get:
      operationId: get_pipelines_id
      summary: pipelines / show
      tags:
      - pipelines
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PipelineResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_pipelines_id
      summary: pipelines / update
      tags:
      - pipelines
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/PipelinesUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/PipelineUpdateResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_pipelines_id
      summary: pipelines / delete
      tags:
      - pipelines
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - pipeline_not_empty
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals":
    get:
      operationId: get_deals
      summary: deals / index
      tags:
      - deals
      x-api-key-access: read
      parameters:
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - mine
          - open
          - closing-soon
          - closed
          -
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: pipeline_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: pipeline_stage_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: status
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: 'Comma-separated statuses: open, won, lost.'
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - name: contact_ids
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: organization_ids
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: owner_user_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: expected_close_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: ISO 8601 date or timestamp.
      - name: closed_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: ISO 8601 date or timestamp.
      - name: started_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date
      - name: started_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date
      - "$ref": "#/components/parameters/Tags"
      - name: page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 1
      - name: per_page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 50
        description: Page size; values above 100 are clamped to 100.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_deals
      summary: deals / create
      tags:
      - deals
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DealsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/summary":
    get:
      operationId: get_deals_summary
      summary: deals / summary
      tags:
      - deals
      x-api-key-access: read
      parameters:
      - name: slice
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - mine
          - open
          - closing-soon
          - closed
          -
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: pipeline_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: pipeline_stage_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - name: contact_ids
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: organization_ids
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: owner_user_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Comma-separated UUIDs; at most 50.
      - name: expected_close_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: ISO 8601 date or timestamp.
      - name: closed_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: ISO 8601 date or timestamp.
      - name: started_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date
      - name: started_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date
      - "$ref": "#/components/parameters/Tags"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealSummaryResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/report":
    get:
      operationId: get_deals_report
      summary: deals / report
      tags:
      - deals
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealReportResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{id}/discussion":
    get:
      operationId: get_deals_id_discussion
      summary: deals / discussion / show
      tags:
      - deals
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DiscussionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{id}":
    get:
      operationId: get_deals_id
      summary: deals / show
      tags:
      - deals
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_deals_id
      summary: deals / update
      tags:
      - deals
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/DealsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DealResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_deals_id
      summary: deals / delete
      tags:
      - deals
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals":
    get:
      operationId: get_proposals
      summary: proposals / index
      description: Decided `assistant` (chat) proposals are omitted unless `agent=assistant`
        or `conversation_id` is given; pending ones are listed like any agent's.
      tags:
      - proposals
      x-api-key-access: read
      parameters:
      - name: agent
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - assistant
          - auto_deal
          - auto_meeting
          - auto_task
          -
      - name: exclude_agent
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - assistant
          - auto_deal
          - auto_meeting
          - auto_task
          -
      - name: status
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: 'Comma-separated statuses: pending, accepted, rejected, expired,
          superseded, auto_applied, resolved. Default pending.'
      - name: sort
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - created_at
          - resolved_at
          -
      - name: conversation_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: record_type
        in: query
        required: false
        description: Send with `record_id`; either one alone is a 400 `invalid_request`.
        schema:
          type:
          - string
          - 'null'
          enum:
          - deal
          - task
          - draft
          - contact
          - calendar_event
          - organization
          - file
          - thread
          - space
          -
      - name: record_id
        in: query
        required: false
        description: Send with `record_type`; either one alone is a 400 `invalid_request`.
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: pipeline_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 1
      - name: per_page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 50
        description: Page size; values above 100 are clamped to 100.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals/unseen_count":
    get:
      operationId: get_proposals_unseen_count
      summary: proposals / unseen_count
      description: Counts the caller's background-agent `auto_applied` proposals applied
        after their last look. Chat (`assistant`) actions are never counted.
      tags:
      - proposals
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalUnseenCount"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals/seen":
    post:
      operationId: post_proposals_seen
      summary: proposals / seen
      tags:
      - proposals
      x-api-key-access: write
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals/{id}":
    get:
      operationId: get_proposals_id
      summary: proposals / show
      tags:
      - proposals
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals/{id}/accept":
    post:
      operationId: post_proposals_id_accept
      summary: proposals / accept
      tags:
      - proposals
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ProposalsAcceptRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - proposal_already_resolved
        - proposal_expired
        - proposal_stale
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Accepts corrected display/payload fields allowed for this action_type.
        task.create takes `payload.assigned_user_ids`, a non-empty array of active user
        ids in the account. API keys cannot accept email.send proposals (403 api_key_insufficient).
  "/proposals/{id}/reject":
    post:
      operationId: post_proposals_id_reject
      summary: proposals / reject
      tags:
      - proposals
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ProposalsRejectRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - proposal_already_resolved
        - proposal_expired
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/proposals/{id}/undo":
    post:
      operationId: post_proposals_id_undo
      summary: proposals / undo
      tags:
      - proposals
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - proposal_already_undone
        - proposal_not_applied
        - proposal_not_undoable
        - proposal_stale
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ProposalResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/conversations":
    get:
      operationId: get_conversations
      summary: conversations / index
      tags:
      - conversations
      x-api-key-access: read
      parameters:
      - name: page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 1
      - name: per_page
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 50
        description: Page size; values above 100 are clamped to 100.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_conversations
      summary: conversations / create
      tags:
      - conversations
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ConversationsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_context
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/conversations/{id}":
    get:
      operationId: get_conversations_id
      summary: conversations / show
      tags:
      - conversations
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationShowResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_conversations_id
      summary: conversations / destroy
      tags:
      - conversations
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/conversations/{id}/messages":
    get:
      operationId: get_conversations_id_messages
      summary: conversations / messages / index
      tags:
      - conversations
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
        description: Message UUID; return messages older than this message.
      - name: limit
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
          minimum: 1
          default: 50
        description: Results per request; clamped to 1–100.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationMessageListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_conversations_id_messages
      summary: conversations / messages / create
      tags:
      - conversations
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ConversationsMessagesCreateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - conversation_archived
        - error
        - feature_disabled
        - invalid_message
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - turn_in_progress
        - unauthorized
      responses:
        '202':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationMessageAcceptedResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/conversations/{id}/messages/{message_id}/feedback":
    post:
      operationId: post_conversations_id_messages_message_id_feedback
      summary: conversations / messages / feedback / create
      tags:
      - conversations
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ConversationsMessagesFeedbackCreateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: message_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ConversationMessageResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/spaces":
    get:
      operationId: get_spaces
      summary: spaces / index
      description: Returns every visible space in one unpaginated list.
      tags:
      - spaces
      x-api-key-access: read
      parameters:
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: slice
        in: query
        required: false
        schema:
          type: string
      - name: sort
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: order
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SpacesIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_spaces
      summary: spaces / create
      tags:
      - spaces
      x-api-key-access: write
      parameters:
      - "$ref": "#/components/parameters/IdempotencyKey"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SpacesCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - idempotency_key_in_use
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SpaceResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '409':
          "$ref": "#/components/responses/Error409"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/spaces/{id}":
    get:
      operationId: get_spaces_id
      summary: spaces / show
      tags:
      - spaces
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SpaceResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_spaces_id
      summary: spaces / update
      tags:
      - spaces
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/SpacesUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SpaceResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_spaces_id
      summary: spaces / destroy
      tags:
      - spaces
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/spaces/{id}/discussion":
    get:
      operationId: get_spaces_id_discussion
      summary: spaces / discussion / show
      tags:
      - spaces
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DiscussionResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads":
    get:
      operationId: get_threads
      summary: threads / index
      tags:
      - threads
      x-api-key-access: read
      parameters:
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - "$ref": "#/components/parameters/SpaceScope"
      - "$ref": "#/components/parameters/ThreadSlice"
      - "$ref": "#/components/parameters/Scope"
      - name: subject
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: mailbox_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: participant
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: flagged
        in: query
        required: false
        schema:
          type: boolean
      - name: unread
        in: query
        required: false
        schema:
          type: boolean
      - name: category
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - personal
          - promotion
          - update
          - forum
          -
      - name: unresolved
        in: query
        required: false
        schema:
          type: boolean
      - name: first_sent_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: last_sent_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: has_attachment
        in: query
        required: false
        schema:
          type: boolean
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: next_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Opaque continuation token from collection.page_info.next_cursor.
          Omit to start at the head. A token minted by another list, or under another
          slice's sort (inbox sorts by last received, every other slice by last sent),
          returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
        description: Reserved. A nonblank value returns 400 unsupported_cursor_direction.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unsupported_cursor_direction
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ThreadsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      description: Cursor-paginated. Use collection.page_info for continuation. Fixed
        page size of 50. A contact_id, organization_id or space_id the caller cannot
        see is 404 record_not_found. A visible scope record with no reachable addresses
        (including a contact whose interactions are not shared with the caller) lists
        nothing.
  "/threads/count":
    get:
      operationId: get_threads_count
      summary: threads / count
      tags:
      - threads
      x-api-key-access: read
      parameters:
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - "$ref": "#/components/parameters/SpaceScope"
      - "$ref": "#/components/parameters/ThreadSlice"
      - "$ref": "#/components/parameters/Scope"
      - name: subject
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: mailbox_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: participant
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: flagged
        in: query
        required: false
        schema:
          type: boolean
      - name: unread
        in: query
        required: false
        schema:
          type: boolean
      - name: category
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          enum:
          - personal
          - promotion
          - update
          - forum
          -
      - name: unresolved
        in: query
        required: false
        schema:
          type: boolean
      - name: first_sent_before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: last_sent_after
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - name: has_attachment
        in: query
        required: false
        schema:
          type: boolean
      - "$ref": "#/components/parameters/Tags"
      - "$ref": "#/components/parameters/TagOperator"
      - name: cap
        in: query
        required: false
        schema:
          type:
          - integer
          - 'null'
        description: Positive count ceiling. When exceeded, count.total equals cap,
          count.capped is true and count.exact is false.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{id}":
    get:
      operationId: get_threads_id
      summary: threads / show
      description: A session request marks the thread read for the current user and
        returns read true. A request authenticated with an API key (any tier) never
        marks the thread read and returns the stored read state.
      tags:
      - threads
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: load_full_messages
        in: query
        required: false
        schema:
          type:
          - boolean
          - 'null'
        description: 'Accepted but currently unused: the action always invokes the
          same load operation.'
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ThreadWithContactResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/open":
    get:
      operationId: get_threads_open
      summary: threads / open
      tags:
      - threads
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/InboxResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/resolution":
    post:
      operationId: post_threads_thread_id_resolution
      summary: threads / resolution / create
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_threads_thread_id_resolution
      summary: threads / resolution / destroy
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/snooze":
    post:
      operationId: post_threads_thread_id_snooze
      summary: threads / snooze / create
      tags:
      - threads
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/ThreadsSnoozeCreateRequest"
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SnoozeResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_threads_thread_id_snooze
      summary: threads / snooze / destroy
      tags:
      - threads
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/taggings":
    post:
      operationId: post_contacts_contact_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/contacts/{contact_id}/taggings/{id}":
    delete:
      operationId: delete_contacts_contact_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: contact_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{calendar_event_id}/taggings":
    post:
      operationId: post_calendar_events_calendar_event_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/calendar_events/{calendar_event_id}/taggings/{id}":
    delete:
      operationId: delete_calendar_events_calendar_event_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: calendar_event_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/taggings":
    post:
      operationId: post_organizations_organization_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/organizations/{organization_id}/taggings/{id}":
    delete:
      operationId: delete_organizations_organization_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: organization_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/taggings":
    post:
      operationId: post_files_file_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/files/{file_id}/taggings/{id}":
    delete:
      operationId: delete_files_file_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: file_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/taggings":
    post:
      operationId: post_threads_thread_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/threads/{thread_id}/taggings/{id}":
    delete:
      operationId: delete_threads_thread_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: thread_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{deal_id}/taggings":
    post:
      operationId: post_deals_deal_id_taggings
      summary: records / taggings / create
      tags:
      - records
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/RecordsTaggingsCreateRequest"
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaggingResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/deals/{deal_id}/taggings/{id}":
    delete:
      operationId: delete_deals_deal_id_taggings_id
      summary: records / taggings / destroy
      tags:
      - records
      x-api-key-access: write
      parameters:
      - name: deal_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Tag UUID, not the tagging row UUID.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/tags":
    get:
      operationId: get_tags
      summary: tags / index
      tags:
      - tags
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TagsIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_tags
      summary: tags / create
      tags:
      - tags
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TagsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - tag_name_taken
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TagResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/tags/{id}":
    get:
      operationId: get_tags_id
      summary: tags / show
      tags:
      - tags
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TagResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_tags_id
      summary: tags / update
      tags:
      - tags
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TagsUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - tag_name_taken
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TagResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_tags_id
      summary: tags / destroy
      tags:
      - tags
      x-api-key-access: write
      requestBody:
        required: false
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TagsDestroyRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/terms_assents":
    post:
      operationId: post_terms_assents
      summary: terms_assents / create
      tags:
      - terms_assents
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TermsAssentsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - documents_required
        - error
        - incomplete_acceptance
        - invalid_acceptance_method
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - unknown_document
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TermsAssentListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/tasks/count":
    get:
      operationId: get_tasks_count
      description: Exact count with the same record, visibility and list filters;
        pagination is ignored.
      summary: tasks / count
      tags:
      - tasks
      x-api-key-access: read
      parameters:
      - name: space_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: organization_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: contact_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: assigned_user_ids
        in: query
        required: false
        schema:
          anyOf:
          - anyOf:
            - type: array
              items:
                type: string
                format: uuid
            - type: string
          - type: 'null'
      - "$ref": "#/components/parameters/TaskSlice"
      - name: deal_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: calendar_event_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: completed
        in: query
        required: false
        schema:
          type: boolean
          default: false
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CountResultResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/tasks":
    get:
      operationId: get_tasks
      description: Tasks ordered by due ascending (undated last), created_at ascending,
        then id. Position-only cursors require clients to resend filters; completed
        defaults to false.
      summary: tasks / index
      tags:
      - tasks
      x-api-key-access: read
      parameters:
      - name: space_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: organization_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: contact_id
        in: query
        required: false
        schema:
          type: string
          format: uuid
      - name: assigned_user_ids
        in: query
        required: false
        schema:
          anyOf:
          - anyOf:
            - type: array
              items:
                type: string
                format: uuid
            - type: string
          - type: 'null'
      - "$ref": "#/components/parameters/TaskSlice"
      - name: deal_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: calendar_event_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: query
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          maxLength: 500
      - name: completed
        in: query
        required: false
        schema:
          type: boolean
          default: false
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 25
          maximum: 100
      - name: next_cursor
        in: query
        required: false
        schema:
          type: string
        description: Opaque token from collection.page_info.next_cursor. A token minted
          by another list returns 400 invalid_cursor.
      - name: prev_cursor
        in: query
        required: false
        schema:
          type: string
        description: Opaque token from collection.page_info.prev_cursor; pages backward.
          A token minted by another list returns 400 invalid_cursor.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_cursor
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TasksIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_tasks
      summary: tasks / create
      tags:
      - tasks
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TaskCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - missing_params
        - operation_failed
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaskResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/tasks/{id}":
    get:
      operationId: get_tasks_id
      summary: tasks / show
      tags:
      - tasks
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaskResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_tasks_id
      summary: tasks / update
      tags:
      - tasks
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/TasksCreateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/TaskResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_tasks_id
      summary: tasks / delete
      tags:
      - tasks
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/timeline":
    get:
      operationId: get_timeline
      summary: timeline / load
      tags:
      - timeline
      x-api-key-access: read
      parameters:
      - "$ref": "#/components/parameters/Scope6"
      - name: types
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
      - "$ref": "#/components/parameters/ContactScope"
      - "$ref": "#/components/parameters/SpaceScope"
      - "$ref": "#/components/parameters/OrganizationScope"
      - name: deal_id
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: uuid
      - name: before
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          format: date-time
        description: ISO 8601 timestamp; only items older than it are returned. To
          page, send the previous response's oldest_timestamp. An unparseable value
          is 400 invalid_request.
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      description: At most one of contact_id, space_id, organization_id and deal_id;
        several is 400 invalid_request. A record id outranks scope.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/DashboardTimeline"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/uploads":
    post:
      operationId: post_uploads
      summary: uploads / create
      tags:
      - uploads
      x-api-key-access: write
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              "$ref": "#/components/schemas/UploadsCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - image_decode_failed
        - image_dimensions_too_large
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - storage_unavailable
        - terms_acceptance_required
        - unauthorized
        - unsupported_image_type
        - upload_too_large
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UploadResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '413':
          "$ref": "#/components/responses/Error413"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
  "/users":
    get:
      operationId: get_users
      summary: users / index
      tags:
      - users
      x-api-key-access: read
      parameters:
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - active
          - all
          - deactivated
          minLength: 1
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UsersIndexResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    post:
      operationId: post_users
      summary: users / create
      tags:
      - users
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersCreateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - billable_add_disabled
        - email_address_in_use
        - enqueue_failed
        - error
        - invalid_request
        - permission_denied
        - provider_lookup_unavailable
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - user_creation_failed
        - user_deactivated
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserWithConfigurationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
        '502':
          "$ref": "#/components/responses/Error502"
        '503':
          "$ref": "#/components/responses/Error503"
  "/users/current":
    get:
      operationId: get_users_current
      summary: users / current
      tags:
      - users
      x-api-key-access: read
      parameters:
      - name: user
        in: query
        required: false
        schema:
          type: object
          properties:
            id:
              type: string
              minLength: 1
              format: uuid
          required:
          - id
        style: deepObject
        explode: true
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/CurrentUserResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/current/launchpad":
    get:
      operationId: get_users_current_launchpad
      summary: users / launchpad / show
      tags:
      - users
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/LaunchpadResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/current/launchpad/dismiss":
    post:
      operationId: post_users_current_launchpad_dismiss
      summary: users / launchpad / dismiss
      tags:
      - users
      x-api-key-access: none
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/Ok"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/current/assistant_memories":
    get:
      operationId: get_users_current_assistant_memories
      summary: users / assistant_memories / index
      tags:
      - users
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AssistantMemoryListResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/current/assistant_memories/{id}":
    delete:
      operationId: delete_users_current_assistant_memories_id
      summary: users / assistant_memories / destroy
      tags:
      - users
      x-api-key-access: write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/current/assistant_settings":
    get:
      operationId: get_users_current_assistant_settings
      summary: users / assistant_settings / show
      tags:
      - users
      x-api-key-access: read
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AssistantSettingsResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_users_current_assistant_settings
      summary: users / assistant_settings / update
      tags:
      - users
      x-api-key-access: write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/AssistantSettingsUpdateRequest"
      x-error-codes:
        enum:
        - api_access_disabled
        - api_access_read_only
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/AssistantSettingsResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/{id}":
    get:
      operationId: get_users_id
      summary: users / show
      tags:
      - users
      x-api-key-access: read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    patch:
      operationId: patch_users_id
      summary: users / update
      tags:
      - users
      x-api-key-access: none
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/UsersUpdateRequest"
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserWithConfigurationResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
    delete:
      operationId: delete_users_id
      summary: users / destroy
      tags:
      - users
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_delete
        - error
        - invalid_request
        - permission_denied
        - private_data_cleanup_failed
        - rate_limited
        - record_not_found
        - sole_owner_required
        - terms_acceptance_required
        - unauthorized
        - user_deactivation_failed
      responses:
        '204':
          description: No content
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
      deprecated: true
      description: Deactivates the user. Does not purge their data.
  "/users/{id}/deactivate":
    post:
      operationId: post_users_id_deactivate
      summary: users / deactivate
      tags:
      - users
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_delete
        - error
        - invalid_request
        - permission_denied
        - private_data_cleanup_failed
        - rate_limited
        - record_not_found
        - sole_owner_required
        - terms_acceptance_required
        - unauthorized
        - user_deactivation_failed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/{id}/reactivate":
    post:
      operationId: post_users_id_reactivate
      summary: users / reactivate
      tags:
      - users
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - billable_add_disabled
        - error
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - user_not_deactivated
        - user_reactivation_failed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '422':
          "$ref": "#/components/responses/Error422"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/users/{id}/purge":
    post:
      operationId: post_users_id_purge
      summary: users / purge
      tags:
      - users
      x-api-key-access: none
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
      x-error-codes:
        enum:
        - api_access_disabled
        - api_key_insufficient
        - could_not_delete
        - deletion_ledger_failed
        - error
        - invalid_request
        - permission_denied
        - private_data_cleanup_failed
        - rate_limited
        - record_not_found
        - terms_acceptance_required
        - unauthorized
        - user_not_deactivated
        - user_purge_failed
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/UserResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '409':
          "$ref": "#/components/responses/Error409"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/waitlistees/{invitation_code}":
    get:
      operationId: get_waitlistees_invitation_code
      summary: waitlistees / show
      tags:
      - waitlistees
      x-api-key-access: none
      security: []
      parameters:
      - name: invitation_code
        in: path
        required: true
        schema:
          type: string
      x-error-codes:
        enum:
        - error
        - invalid_credentials
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WaitlisteeShowResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
  "/waitlistees":
    post:
      operationId: post_waitlistees
      summary: waitlistees / create
      tags:
      - waitlistees
      x-api-key-access: none
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              "$ref": "#/components/schemas/WaitlisteesCreateRequest"
      x-error-codes:
        enum:
        - error
        - invalid_credentials
        - invalid_email_address
        - invalid_request
        - permission_denied
        - rate_limited
        - record_not_found
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/WaitlisteeCreateResponse"
        '400':
          "$ref": "#/components/responses/Error400"
        '401':
          "$ref": "#/components/responses/Error401"
        '403':
          "$ref": "#/components/responses/Error403"
        '404':
          "$ref": "#/components/responses/Error404"
        '406':
          "$ref": "#/components/responses/Error406"
        '415':
          "$ref": "#/components/responses/Error415"
        '429':
          "$ref": "#/components/responses/Error429"
        '500':
          "$ref": "#/components/responses/Error500"
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Session access token or API key (carom_sk_...). Both use Authorization:
        Bearer <token>.'
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 255
        pattern: "^[\\x20-\\x7E]+$"
      description: Optional client-chosen key. A repeat of the same key by the same user
        on the same route within 24 hours replays the first successful response instead
        of creating again; while the first request is still running, a repeat answers
        409 idempotency_key_in_use.
    Scope:
      name: scope
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
      description: Visibility scope consumed by this endpoint; blank means no scope
        filter.
    Tags:
      name: tags
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
      description: Comma-separated tag UUIDs, at most 50. Blank means no tag filter.
    TagOperator:
      name: tag_operator
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        enum:
        - any
        - all
        -
        default: any
      description: Match any or all supplied tags. Defaults to any.
    ContactScope:
      name: contact_id
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        format: uuid
      description: Scope the list to this visible record. Blank means unscoped.
    OrganizationScope:
      name: organization_id
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        format: uuid
      description: Scope the list to this visible record. Blank means unscoped.
    SpaceScope:
      name: space_id
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        format: uuid
      description: Scope the list to this visible record. Blank means unscoped.
    ThreadSlice:
      name: slice
      in: query
      required: false
      schema:
        type: string
        enum:
        - inbox
        - today
        - workweek
        - flagged
        - unread
        - unreplied
        - awaiting
        - has_attachment
        - unresolved
        - snoozed
        - pinned-contacts
        - shared
      description: Named thread list. Blank means no slice; any other value is a 400
        invalid_request. inbox also orders by last received time.
    TaskSlice:
      name: slice
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        enum:
        - overdue
        - today
        - tomorrow
        - this_week
        - next_week
        - later
        - contacts
        - organizations
        - emails
        - files
        -
      description: Due-date slices are evaluated in the user's time zone. Other values
        apply no slice.
    Scope6:
      name: scope
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        enum:
        - all
        - interacted
        - pinned
        -
      description: Visibility scope consumed by this endpoint; blank means no scope
        filter.
    ContactVisibilityScope:
      name: scope
      in: query
      required: false
      schema:
        type:
        - string
        - 'null'
        enum:
        - global
        - personal
        - null
      description: global selects global contacts; personal selects personal contacts.
        Other values are unfiltered.
  schemas:
    TimelineItem:
      type: object
      properties:
        type:
          type:
          - string
          - 'null'
        id:
          type: string
          format: uuid
        kind:
          type:
          - string
          - 'null'
        timestamp:
          type:
          - string
          - 'null'
          format: date-time
        title:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        deal:
          type:
          - object
          - 'null'
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            amount:
              type:
              - number
              - 'null'
            currency:
              type: string
            pipeline_id:
              type: string
              format: uuid
            from_stage:
              type:
              - object
              - 'null'
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
                position:
                  type: integer
              required:
              - id
              - name
              - position
            to_stage:
              type: object
              properties:
                id:
                  type: string
                  format: uuid
                name:
                  type: string
                position:
                  type: integer
              required:
              - id
              - name
              - position
          required:
          - id
          - name
          - amount
          - currency
          - pipeline_id
          - from_stage
          - to_stage
        agent:
          type:
          - string
          - 'null'
        proposal_id:
          type:
          - string
          - 'null'
          format: uuid
        contact:
          anyOf:
          - "$ref": "#/components/schemas/Contact"
          - type: 'null'
        user:
          anyOf:
          - "$ref": "#/components/schemas/User"
          - type: 'null'
        tag:
          anyOf:
          - "$ref": "#/components/schemas/Tag"
          - type: 'null'
        file:
          anyOf:
          - "$ref": "#/components/schemas/TimelineFile"
          - type: 'null'
      required:
      - type
      - id
      - kind
      - timestamp
      - title
      - description
      - deal
      - agent
      - proposal_id
      - contact
      - user
      - tag
      - file
    Contact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        global:
          type:
          - boolean
          - 'null'
        name:
          type:
          - string
          - 'null'
        background:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        task_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        has_duplicates:
          type:
          - boolean
          - 'null'
        contact_type:
          type: string
        email_addresses:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmailAddresses"
        interaction_histories:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactInteractionHistories"
        social_profiles:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactSocialProfiles"
        numbers:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactNumbers"
        websites:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactWebsites"
        locations:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactLocations"
        employments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmployments"
        avatar:
          anyOf:
          - "$ref": "#/components/schemas/ContactAvatar"
          - type: 'null'
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
        shares:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Share"
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
      required:
      - id
      - global
      - name
      - background
      - user_id
      - task_count
      - pinned
      - has_duplicates
      - contact_type
      - email_addresses
      - interaction_histories
      - social_profiles
      - numbers
      - websites
      - locations
      - employments
      - avatar
      - tasks
      - comments
      - shares
      - tags
    ContactEmailAddresses:
      type: object
      properties:
        id:
          type: string
          format: uuid
        value:
          type:
          - string
          - 'null'
        primary:
          type:
          - boolean
          - 'null'
      required:
      - id
      - value
      - primary
    ContactInteractionHistories:
      type: object
      properties:
        mailbox:
          anyOf:
          - "$ref": "#/components/schemas/InteractionMailbox"
          - type: 'null'
        mailbox_id:
          type: string
          format: uuid
        average_thread_lag:
          type:
          - integer
          - 'null'
        coefficient_of_variation:
          type:
          - number
          - 'null'
        response_rate:
          type:
          - number
          - 'null'
        thread_count:
          type:
          - integer
          - 'null'
        file_count:
          type:
          - integer
          - 'null'
        average_thread_length:
          type:
          - number
          - 'null'
        average_participant_count:
          type:
          - number
          - 'null'
        response_rate_lower_bound:
          type:
          - number
          - 'null'
        response_rate_upper_bound:
          type:
          - number
          - 'null'
        priority:
          type:
          - number
          - 'null'
        monthly_messages:
          type:
          - object
          - 'null'
          additionalProperties:
            type: integer
        first_contact:
          type:
          - string
          - 'null'
          format: date-time
        last_contact:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - mailbox
      - mailbox_id
      - average_thread_lag
      - coefficient_of_variation
      - response_rate
      - thread_count
      - file_count
      - average_thread_length
      - average_participant_count
      - response_rate_lower_bound
      - response_rate_upper_bound
      - priority
      - monthly_messages
      - first_contact
      - last_contact
    InteractionMailbox:
      type: object
      description: >-
        Identifies the mailbox an interaction_histories row belongs to. Pooled
        interaction rows reach viewers who cannot view the mailbox itself, so this
        embed carries no owner-only policy field and no account-wide count. Read
        those from GET /mailboxes instead.
      properties:
        id:
          type: string
          format: uuid
        email_address:
          type:
          - string
          - 'null'
        name:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
      required:
      - id
      - email_address
      - name
      - user_id
    Mailbox:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        email_address:
          type:
          - string
          - 'null'
        subscription_count:
          type:
          - integer
          - 'null'
        thread_count:
          type:
          - integer
          - 'null'
        calendar_event_count:
          type:
          - integer
          - 'null'
        contact_count:
          type:
          - integer
          - 'null'
        file_count:
          type:
          - integer
          - 'null'
        primary:
          type:
          - boolean
          - 'null'
        authorized:
          type:
          - boolean
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        view_policy:
          type: string
        send_policy:
          type: string
        contact_policy:
          type: string
        interaction_sharing:
          type: string
        label_sync:
          type: boolean
        contacts_sync:
          type: boolean
        contacts_synced_at:
          type:
          - string
          - 'null'
          format: date-time
        sync_state:
          type:
          - string
          - 'null'
        configuration:
          anyOf:
          - "$ref": "#/components/schemas/MailboxConfiguration"
          - type: 'null'
        user_sendable:
          type: boolean
        user_sendability_reason:
          type:
          - string
          - 'null'
          enum:
          - connection_not_authorized
          - user_permission_denied
          - capability_not_granted
          -
        connection_status:
          type: string
          enum:
          - connected
          - incomplete
          - error
          - disconnected
        capabilities:
          type: object
          properties:
            mail_read:
              type: boolean
            mail_send:
              type: boolean
            mail_modify:
              type: boolean
            calendar_read:
              type: boolean
            contacts_read:
              type: boolean
          required:
          - mail_read
          - mail_send
          - mail_modify
          - calendar_read
          - contacts_read
        missing_required_capabilities:
          type: array
          items:
            type: string
      required:
      - id
      - name
      - email_address
      - subscription_count
      - thread_count
      - calendar_event_count
      - contact_count
      - file_count
      - primary
      - authorized
      - user_id
      - view_policy
      - send_policy
      - contact_policy
      - interaction_sharing
      - label_sync
      - contacts_sync
      - contacts_synced_at
      - sync_state
      - configuration
      - connection_status
      - capabilities
      - missing_required_capabilities
    MailboxConfiguration:
      type: object
      properties:
        discoverable:
          type:
          - boolean
          - 'null'
        provider:
          type:
          - string
          - 'null'
        granted_scopes:
          type:
          - array
          - 'null'
          items:
            type: string
        error_detail:
          type:
          - object
          - 'null'
          properties:
            code:
              type: string
            message:
              type: string
            category:
              type: string
              enum:
              - auth
              - scope
              - permission
              - provider
              - rate_limit
              - unknown
            retriable:
              type: boolean
          required:
          - code
          - message
          - category
          - retriable
      required:
      - discoverable
      - provider
      - granted_scopes
      - error_detail
    ContactSocialProfiles:
      type: object
      properties:
        id:
          type: string
          format: uuid
        network:
          type:
          - string
          - 'null'
        handle:
          type:
          - string
          - 'null'
      required:
      - id
      - network
      - handle
    ContactNumbers:
      type: object
      properties:
        id:
          type: string
          format: uuid
        value:
          type:
          - string
          - 'null'
        kind:
          type:
          - string
          - 'null'
      required:
      - id
      - value
      - kind
    ContactWebsites:
      type: object
      properties:
        id:
          type: string
          format: uuid
        url:
          type:
          - string
          - 'null'
        title:
          type:
          - string
          - 'null'
      required:
      - id
      - url
      - title
    ContactLocations:
      type: object
      properties:
        id:
          type: string
          format: uuid
        street_number:
          type:
          - string
          - 'null'
        street:
          type:
          - string
          - 'null'
        apartment:
          type:
          - string
          - 'null'
        city:
          type:
          - string
          - 'null'
        state:
          type:
          - string
          - 'null'
        state_code:
          type:
          - string
          - 'null'
        country_code:
          type:
          - string
          - 'null'
        country:
          type:
          - string
          - 'null'
        time_zone:
          type:
          - string
          - 'null'
        utc_offset:
          type:
          - number
          - 'null'
      required:
      - id
      - street_number
      - street
      - apartment
      - city
      - state
      - state_code
      - country_code
      - country
      - time_zone
      - utc_offset
    ContactEmployments:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type:
          - string
          - 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
      required:
      - id
      - title
      - organization
    ContactEmploymentsOrganization:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
      required:
      - id
      - name
    ContactAvatar:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source_url:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
      required:
      - id
      - source_url
      - file_name
    Task:
      type: object
      properties:
        id:
          type: string
          format: uuid
        assignment:
          type:
          - string
          - 'null'
        assigned_user_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        assigned_group_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        description:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        milestone_id:
          type:
          - string
          - 'null'
          format: uuid
        contact_id:
          type:
          - string
          - 'null'
          format: uuid
        file_id:
          type:
          - string
          - 'null'
          format: uuid
        thread_id:
          type:
          - string
          - 'null'
          format: uuid
        organization_id:
          type:
          - string
          - 'null'
          format: uuid
        calendar_event_id:
          type:
          - string
          - 'null'
          format: uuid
        space_id:
          type:
          - string
          - 'null'
          format: uuid
        deal_id:
          type:
          - string
          - 'null'
          format: uuid
        ai_generated:
          type:
          - boolean
          - 'null'
        ai_generation_justification:
          type:
          - string
          - 'null'
        ai_completed:
          type:
          - boolean
          - 'null'
        ai_completion_justification:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
        effective_at:
          type:
          - string
          - 'null'
          format: date-time
        due:
          type:
          - string
          - 'null'
          format: date
        due_sortable:
          type:
          - string
          - 'null'
          format: date
        thread:
          anyOf:
          - "$ref": "#/components/schemas/TaskThread"
          - type: 'null'
        contact:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
        milestone:
          anyOf:
          - "$ref": "#/components/schemas/TaskMilestone"
          - type: 'null'
        file:
          anyOf:
          - "$ref": "#/components/schemas/TaskFile"
          - type: 'null'
        calendar_event:
          anyOf:
          - "$ref": "#/components/schemas/TaskCalendarEvent"
          - type: 'null'
        deal:
          anyOf:
          - "$ref": "#/components/schemas/TaskDeal"
          - type: 'null'
      required:
      - id
      - assignment
      - assigned_user_ids
      - assigned_group_ids
      - description
      - user_id
      - milestone_id
      - contact_id
      - file_id
      - thread_id
      - organization_id
      - calendar_event_id
      - space_id
      - deal_id
      - ai_generated
      - ai_generation_justification
      - ai_completed
      - ai_completion_justification
      - created_at
      - updated_at
      - completed_at
      - effective_at
      - due
      - due_sortable
    TaskCalendarEvent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        start_datetime:
          type:
          - string
          - 'null'
          format: date-time
        all_day_start_date:
          type:
          - string
          - 'null'
          format: date
      required:
      - id
      - name
      - start_datetime
      - all_day_start_date
    TaskDeal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
          - open
          - won
          - lost
      required:
      - id
      - name
      - status
    TaskThread:
      type: object
      properties:
        id:
          type: string
          format: uuid
        subject:
          type:
          - string
          - 'null'
        snippet:
          type:
          - string
          - 'null'
        has_attachments:
          type:
          - boolean
          - 'null'
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - subject
      - snippet
      - has_attachments
      - first_sent_at
      - last_sent_at
    TaskMilestone:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        due:
          type:
          - string
          - 'null'
          format: date
      required:
      - id
      - name
      - description
      - due
    TaskFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
        extension:
          type:
          - string
          - 'null'
      required:
      - id
      - name
      - file_name
      - extension
    Comment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        text:
          type:
          - string
          - 'null'
        parent_comment_id:
          type:
          - string
          - 'null'
          format: uuid
        html_content:
          type:
          - string
          - 'null'
        json_content:
          description: Serialized TipTap editor document; used to derive mentions.
          type:
          - string
          - 'null'
        contact_id:
          type:
          - string
          - 'null'
          format: uuid
        organization_id:
          type:
          - string
          - 'null'
          format: uuid
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        file_id:
          type:
          - string
          - 'null'
          format: uuid
        thread_id:
          type:
          - string
          - 'null'
          format: uuid
        calendar_event_id:
          type:
          - string
          - 'null'
          format: uuid
        space_id:
          type:
          - string
          - 'null'
          format: uuid
        deal_id:
          type:
          - string
          - 'null'
          format: uuid
        agent:
          type:
          - string
          - 'null'
        status:
          type: string
        refs:
          type: array
          items:
            "$ref": "#/components/schemas/CitationReference"
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        blocks:
          type: array
          items:
            "$ref": "#/components/schemas/MessageBlock"
        mentions:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/CommentMentions"
        reactions:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/CommentReactions"
      required:
      - id
      - text
      - parent_comment_id
      - html_content
      - json_content
      - contact_id
      - organization_id
      - user_id
      - file_id
      - thread_id
      - calendar_event_id
      - space_id
      - deal_id
      - agent
      - status
      - refs
      - created_at
      - updated_at
      - blocks
      - mentions
      - reactions
    CommentMentions:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type:
          - string
          - 'null'
          format: uuid
      required:
      - id
      - user_id
    CommentReactions:
      type: object
      properties:
        id:
          type: string
          format: uuid
        text:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
      required:
      - id
      - text
      - user_id
    Share:
      type: object
      properties:
        id:
          type: string
          format: uuid
        note:
          type:
          - string
          - 'null'
        sharer_id:
          type: string
          format: uuid
        scope:
          type:
          - string
          - 'null'
        share_through:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        user:
          anyOf:
          - "$ref": "#/components/schemas/User"
          - type: 'null'
        group:
          anyOf:
          - "$ref": "#/components/schemas/Group"
          - type: 'null'
      required:
      - id
      - note
      - sharer_id
      - scope
      - share_through
      - created_at
      - user
      - group
    User:
      type: object
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        email_address:
          type:
          - string
          - 'null'
        is_admin:
          type:
          - boolean
          - 'null'
        is_owner:
          type:
          - boolean
          - 'null'
        can_connect_email_account:
          type:
          - boolean
          - 'null'
          description: Present only on the users endpoints (list, show, current,
            create, update, deactivate, reactivate, purge) for session callers.
            Omitted for API-key callers and wherever a user is embedded in another
            record.
        initialized:
          type:
          - boolean
          - 'null'
          description: Same presence rule as can_connect_email_account.
        background:
          type:
          - string
          - 'null'
        avatar_color:
          type:
          - string
          - 'null'
        status:
          type: string
          enum:
          - active
          - deactivated
          - deleted
        activated:
          type: boolean
        deactivated_at:
          type:
          - string
          - 'null'
          format: date-time
        avatar:
          anyOf:
          - "$ref": "#/components/schemas/Image"
          - type: 'null'
      required:
      - id
      - first_name
      - last_name
      - email_address
      - is_admin
      - is_owner
      - background
      - avatar_color
      - status
      - activated
      - deactivated_at
      - avatar
    Group:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        users:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/User"
      required:
      - id
      - name
      - description
      - users
    Tag:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        color:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        applicable_to_contacts:
          type:
          - boolean
          - 'null'
        applicable_to_interactions:
          type:
          - boolean
          - 'null'
        file_count:
          type:
          - integer
          - 'null'
        thread_count:
          type:
          - integer
          - 'null'
        calendar_event_count:
          type:
          - integer
          - 'null'
        contact_count:
          type:
          - integer
          - 'null'
        organization_count:
          type:
          - integer
          - 'null'
        deal_count:
          type:
          - integer
          - 'null'
      required:
      - id
      - name
      - color
      - description
      - applicable_to_contacts
      - applicable_to_interactions
      - file_count
      - thread_count
      - calendar_event_count
      - contact_count
      - organization_count
      - deal_count
    TimelineFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
        extension:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
      required:
      - id
      - name
      - file_name
      - extension
      - description
    Upload:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source_url:
          type: string
      required:
      - id
      - source_url
    MailboxSubscription:
      type: object
      properties:
        id:
          type: string
          format: uuid
        mailbox_id:
          type:
          - string
          - 'null'
          format: uuid
        color:
          type:
          - string
          - 'null'
        mailbox:
          "$ref": "#/components/schemas/Mailbox"
      required:
      - id
      - mailbox_id
      - color
      - mailbox
    MessageAttachment:
      allOf:
      - "$ref": "#/components/schemas/Attachment"
      - type: object
        properties:
          file:
            anyOf:
            - "$ref": "#/components/schemas/TimelineFile"
            - type: 'null'
        required:
        - file
    Organization:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        name_source:
          description: Who wrote `name`. `auto` is the domain placeholder set when
            the organization was created from an email domain; `enrichment` was written
            by the auto_enrich agent from the organization's website; `user` was typed
            by a person. Null means the value predates provenance tracking. Enrichment
            only replaces an empty, `auto`, or `enrichment` name.
          type:
          - string
          - 'null'
          enum:
          - auto
          - enrichment
          - user
          -
        description:
          type:
          - string
          - 'null'
        description_source:
          description: Who wrote `description`. `enrichment` was written by the auto_enrich
            agent from the organization's website; `user` was typed by a person. Null
            means empty or written before provenance tracking. Enrichment only replaces
            an empty or `enrichment` description.
          type:
          - string
          - 'null'
          enum:
          - enrichment
          - user
          -
        domain:
          type:
          - string
          - 'null'
        contact_count:
          type:
          - integer
          - 'null'
        thread_count:
          type:
          - integer
          - 'null'
        file_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        logo:
          anyOf:
          - "$ref": "#/components/schemas/OrganizationLogo"
          - type: 'null'
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
        contacts:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Contact"
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
      required:
      - id
      - name
      - name_source
      - description
      - description_source
      - domain
      - contact_count
      - thread_count
      - file_count
      - pinned
      - logo
      - tasks
      - comments
      - contacts
      - tags
    OrganizationLogo:
      type: object
      properties:
        source_url:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
      required:
      - source_url
      - file_name
    Proposal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        agent:
          type: string
        action_type:
          type: string
        status:
          type: string
        record_type:
          type:
          - string
          - 'null'
          description: snake_case record type, e.g. `deal`, `calendar_event`.
        record_id:
          type:
          - string
          - 'null'
          format: uuid
        rejection_reason:
          type:
          - string
          - 'null'
        resolution_reason:
          type:
          - string
          - 'null'
        resolved_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        applied_record_type:
          type:
          - string
          - 'null'
          description: snake_case type of the record the proposal created or changed, e.g. `task`, `tagging`.
        applied_record_id:
          type:
          - string
          - 'null'
          format: uuid
        undone_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        expires_at:
          type: string
          format: date-time
        resolved_at:
          type:
          - string
          - 'null'
          format: date-time
        undone_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        payload:
          "$ref": "#/components/schemas/ProposalPayload"
        evidence:
          type: object
          properties:
            thread_id:
              type: string
              format: uuid
            calendar_event_id:
              type: string
              format: uuid
              description: The meeting a meeting-transcript proposal came from.
            entry_id:
              type:
              - string
              - 'null'
              format: uuid
              description: The transcript entry the excerpt was quoted from.
            meeting_started_at:
              type:
              - string
              - 'null'
              format: date-time
              description: When the meeting's transcript starts, to offset `at` into
                the recording.
            excerpt:
              type: string
            justification:
              type: string
            from:
              type: string
            at:
              type: string
              format: date-time
        source:
          type: object
          properties:
            agent:
              type: string
            conversation_id:
              type:
              - string
              - 'null'
              format: uuid
            message_id:
              type:
              - string
              - 'null'
              format: uuid
          required:
          - agent
          - conversation_id
          - message_id
        actions:
          type: array
          items:
            type: string
            enum:
            - accept
            - reject
            - undo
        display:
          type:
          - object
          - 'null'
          additionalProperties: true
      required:
      - id
      - agent
      - action_type
      - status
      - record_type
      - record_id
      - rejection_reason
      - resolution_reason
      - resolved_by_user_id
      - applied_record_type
      - applied_record_id
      - undone_by_user_id
      - expires_at
      - resolved_at
      - undone_at
      - created_at
      - payload
      - evidence
      - source
      - actions
      - display
    ExpandedContact:
      type: object
      properties:
        counts:
          "$ref": "#/components/schemas/RecordActivityCounts"
        events:
          type: array
          maxItems: 3
          items:
            "$ref": "#/components/schemas/CalendarEvent"
        id:
          type: string
          format: uuid
        global:
          type:
          - boolean
          - 'null'
        name:
          type:
          - string
          - 'null'
        background:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        task_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        has_duplicates:
          type:
          - boolean
          - 'null'
        contact_type:
          type: string
        email_addresses:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmailAddresses"
        interaction_histories:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ExpandedContactInteractionHistories"
        social_profiles:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactSocialProfiles"
        numbers:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactNumbers"
        websites:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactWebsites"
        locations:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactLocations"
        employments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ExpandedContactEmployments"
        avatar:
          anyOf:
          - "$ref": "#/components/schemas/ContactAvatar"
          - type: 'null'
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
        shares:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Share"
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
        timeline:
          anyOf:
          - "$ref": "#/components/schemas/Timeline"
          - type: 'null'
        known_by:
          type: array
          items:
            type: string
            format: uuid
      required:
      - id
      - global
      - name
      - background
      - user_id
      - task_count
      - pinned
      - has_duplicates
      - contact_type
      - email_addresses
      - interaction_histories
      - social_profiles
      - numbers
      - websites
      - locations
      - employments
      - avatar
      - tasks
      - comments
      - shares
      - tags
      - timeline
      - known_by
    ExpandedContactInteractionHistories:
      type: object
      properties:
        mailbox:
          anyOf:
          - "$ref": "#/components/schemas/InteractionMailbox"
          - type: 'null'
        mailbox_id:
          type: string
          format: uuid
        average_thread_lag:
          type:
          - integer
          - 'null'
        coefficient_of_variation:
          type:
          - number
          - 'null'
        response_rate:
          type:
          - number
          - 'null'
        thread_count:
          type:
          - integer
          - 'null'
        file_count:
          type:
          - integer
          - 'null'
        average_thread_length:
          type:
          - number
          - 'null'
        average_participant_count:
          type:
          - number
          - 'null'
        response_rate_lower_bound:
          type:
          - number
          - 'null'
        response_rate_upper_bound:
          type:
          - number
          - 'null'
        priority:
          type:
          - number
          - 'null'
        monthly_messages:
          type:
          - object
          - 'null'
          additionalProperties: true
        first_contact:
          type:
          - string
          - 'null'
          format: date-time
        last_contact:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - mailbox
      - mailbox_id
      - average_thread_lag
      - coefficient_of_variation
      - response_rate
      - thread_count
      - file_count
      - average_thread_length
      - average_participant_count
      - response_rate_lower_bound
      - response_rate_upper_bound
      - priority
      - monthly_messages
      - first_contact
      - last_contact
    ExpandedContactEmployments:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type:
          - string
          - 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
      required:
      - id
      - title
      - organization
    ContactSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        global:
          type:
          - boolean
          - 'null'
        name:
          type:
          - string
          - 'null'
        background:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        task_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        has_duplicates:
          type:
          - boolean
          - 'null'
        contact_type:
          type: string
        thread_count:
          type: integer
        file_count:
          type: integer
        last_contact:
          type:
          - string
          - 'null'
          format: date-time
        priority:
          type: number
        recent_monthly_messages:
          type: object
          additionalProperties:
            type: integer
        email_addresses:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmailAddresses"
        social_profiles:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactSocialProfiles"
        numbers:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactNumbers"
        websites:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactWebsites"
        locations:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactLocations"
        employments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactSummaryEmployments"
        avatar:
          anyOf:
          - "$ref": "#/components/schemas/ContactAvatar"
          - type: 'null'
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
      required:
      - id
      - global
      - name
      - background
      - user_id
      - task_count
      - pinned
      - has_duplicates
      - contact_type
      - thread_count
      - file_count
      - last_contact
      - priority
      - recent_monthly_messages
      - email_addresses
      - social_profiles
      - numbers
      - websites
      - locations
      - employments
      - avatar
      - tags
    ContactSummaryEmployments:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type:
          - string
          - 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
      required:
      - id
      - title
      - organization
    PipelineReportStage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        position:
          type:
          - integer
          - 'null'
          description: Null for an archived stage; surviving stages are renumbered densely, so its old ordinal now belongs to another stage.
        outcome:
          type: string
        archived_at:
          type:
          - string
          - 'null'
          format: date-time
        likelihood:
          type:
          - number
          - 'null'
      required:
      - id
      - name
      - position
      - outcome
      - archived_at
      - likelihood
    Thread:
      type: object
      properties:
        id:
          type: string
          format: uuid
        flagged:
          type:
          - boolean
          - 'null'
        subject:
          type:
          - string
          - 'null'
        snippet:
          type:
          - string
          - 'null'
        message_count:
          type:
          - integer
          - 'null'
        has_attachments:
          type:
          - boolean
          - 'null'
        read:
          type:
          - boolean
          - 'null'
        resolved:
          type:
          - boolean
          - 'null'
        headline:
          type:
          - string
          - 'null'
        summary:
          type:
          - string
          - 'null'
        mailbox_ids:
          type: array
          items:
            type: string
            format: uuid
        inbox_sort_time:
          type:
          - string
          - 'null'
          format: date-time
        snooze_until:
          type:
          - string
          - 'null'
          format: date-time
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        participant_names:
          "$ref": "#/components/schemas/ParticipantNames"
        messages:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Message"
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
        shares:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Share"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
      required:
      - id
      - flagged
      - subject
      - snippet
      - message_count
      - has_attachments
      - read
      - resolved
      - headline
      - summary
      - mailbox_ids
      - inbox_sort_time
      - snooze_until
      - first_sent_at
      - last_sent_at
      - participant_names
      - messages
      - tasks
      - tags
      - shares
      - comments
    ParticipantNames:
      type: object
      description: Participant email address to display name, as captured from the
        mail headers. The name is null when the headers carried none.
      additionalProperties:
        type:
        - string
        - 'null'
    Message:
      type: object
      properties:
        id:
          type: string
          format: uuid
        snippet:
          type:
          - string
          - 'null'
        summary:
          type:
          - string
          - 'null'
        from_email_address:
          type:
          - string
          - 'null'
        sent_at:
          type:
          - string
          - 'null'
          format: date-time
        to_email_addresses:
          type: array
          items:
            type: string
        cc_email_addresses:
          type: array
          items:
            type: string
        participant_email_addresses:
          type: array
          items:
            type: string
        attachments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/MessageAttachment"
        body:
          anyOf:
          - "$ref": "#/components/schemas/MessageBody"
          - type: 'null'
      required:
      - id
      - snippet
      - summary
      - from_email_address
      - sent_at
      - to_email_addresses
      - cc_email_addresses
      - participant_email_addresses
      - attachments
      - body
    MessageBody:
      type: object
      properties:
        parsed_text:
          type:
          - string
          - 'null'
        rich_text:
          type:
          - string
          - 'null'
        sanitized_html:
          type:
          - string
          - 'null'
        format:
          type:
          - string
          - 'null'
        new_plain_text:
          type:
          - string
          - 'null'
        new_rich_text:
          type:
          - string
          - 'null'
        new_html:
          type:
          - string
          - 'null'
        quoted_plain_text:
          type:
          - string
          - 'null'
        quoted_rich_text:
          type:
          - string
          - 'null'
        quoted_html:
          type:
          - string
          - 'null'
        has_quote_header:
          type:
          - boolean
          - 'null'
        source_format:
          type:
          - string
          - 'null'
        truncated:
          type: boolean
          description: The provider body exceeded the parse limit, so every text and HTML field covers only its beginning.
      required:
      - parsed_text
      - rich_text
      - sanitized_html
      - format
      - new_plain_text
      - new_rich_text
      - new_html
      - quoted_plain_text
      - quoted_rich_text
      - quoted_html
      - has_quote_header
      - source_format
      - truncated
    DealSummary:
      type: object
      properties:
        open_count:
          type:
          - integer
          - 'null'
        open_value:
          type:
          - number
          - 'null'
        won_count:
          type:
          - integer
          - 'null'
        won_value:
          type:
          - number
          - 'null'
        won_window_days:
          type:
          - integer
          - 'null'
      required:
      - open_count
      - open_value
      - won_count
      - won_value
      - won_window_days
    Pipeline:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        position:
          type:
          - integer
          - 'null'
        public:
          type: boolean
        tracks_amount:
          type: boolean
        dealmaker_enabled:
          type: boolean
        created_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        admin_user_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        open_deal_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        archived_at:
          type:
          - string
          - 'null'
          format: date-time
        open_deal_value:
          type: number
        stages:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/PipelineStage"
        users:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/User"
        groups:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Group"
      required:
      - id
      - name
      - description
      - position
      - public
      - tracks_amount
      - dealmaker_enabled
      - created_by_user_id
      - admin_user_ids
      - open_deal_count
      - pinned
      - archived_at
      - open_deal_value
      - stages
      - users
      - groups
    PipelineStage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        position:
          type: integer
        outcome:
          type: string
        entry_criteria:
          type:
          - string
          - 'null'
        deal_count:
          type:
          - integer
          - 'null'
        open_deal_count:
          type:
          - integer
          - 'null'
        likelihood:
          type:
          - number
          - 'null'
        open_deal_value:
          type: number
      required:
      - id
      - name
      - position
      - outcome
      - entry_criteria
      - deal_count
      - open_deal_count
      - likelihood
      - open_deal_value
    ThreadWithContact:
      allOf:
      - "$ref": "#/components/schemas/Thread"
      - type: object
        properties:
          pending_messages:
            type: array
            items:
              "$ref": "#/components/schemas/PendingMessage"
          participants:
            type: object
            additionalProperties:
              anyOf:
              - "$ref": "#/components/schemas/Contact"
              - type: string
              - type: 'null'
        required:
        - pending_messages
        - participants
    DuplicateCandidate:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        match_type:
          type:
          - string
          - 'null'
        dismissed_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        dismissed_at:
          type:
          - string
          - 'null'
          format: date-time
        suspected_duplicate:
          anyOf:
          - "$ref": "#/components/schemas/Contact"
          - type: 'null'
      required:
      - id
      - name
      - match_type
      - dismissed_by_user_id
      - dismissed_at
      - suspected_duplicate
    Notification:
      type: object
      properties:
        id:
          type: string
          format: uuid
        payload:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: The subject record's fields for this event. A `draft_failed` payload's
            `last_error` is a `DraftFailure` (`{code, message}`), as on the draft itself.
        event:
          type:
          - string
          - 'null'
        prompting_user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        dismissed_at:
          type:
          - string
          - 'null'
          format: date-time
        read_at:
          type:
          - string
          - 'null'
          format: date-time
        new:
          type: boolean
      required:
      - id
      - payload
      - event
      - prompting_user_id
      - created_at
      - dismissed_at
      - read_at
      - new
    Configuration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        time_zone:
          type:
          - string
          - 'null'
        priority_inbox_days:
          type:
          - integer
          - 'null'
        priority_inbox_days_unit:
          type:
          - string
          - 'null'
        notification_optouts:
          type: object
          additionalProperties:
            type: boolean
      required:
      - id
      - time_zone
      - priority_inbox_days
      - priority_inbox_days_unit
      - notification_optouts
    AccessToken:
      type: object
      properties:
        key:
          type: string
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - key
      - expires_at
    ExpandedOrganization:
      allOf:
      - "$ref": "#/components/schemas/Organization"
      - type: object
        properties:
          counts:
            "$ref": "#/components/schemas/RecordActivityCounts"
          events:
            type: array
            maxItems: 3
            items:
              "$ref": "#/components/schemas/CalendarEvent"
          timeline:
            anyOf:
            - "$ref": "#/components/schemas/Timeline"
            - type: 'null'
        required:
        - timeline
    Timeline:
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/TimelineItem"
      required:
      - items
    InboxThread:
      type: object
      properties:
        id:
          type: string
          format: uuid
        flagged:
          type:
          - boolean
          - 'null'
        read:
          type:
          - boolean
          - 'null'
        resolved:
          type:
          - boolean
          - 'null'
        subject:
          type:
          - string
          - 'null'
        snippet:
          type:
          - string
          - 'null'
        message_count:
          type:
          - integer
          - 'null'
        has_attachments:
          type:
          - boolean
          - 'null'
        headline:
          type:
          - string
          - 'null'
        summary:
          type:
          - string
          - 'null'
        category:
          type:
          - string
          - 'null'
        participant_names:
          "$ref": "#/components/schemas/ParticipantNames"
        mailbox_ids:
          type: array
          items:
            type: string
            format: uuid
        sender_email_addresses:
          type: array
          items:
            type: string
        participant_email_addresses:
          type: array
          items:
            type: string
        inbox_sort_time:
          type:
          - string
          - 'null'
          format: date-time
        snooze_until:
          type:
          - string
          - 'null'
          format: date-time
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - flagged
      - read
      - resolved
      - subject
      - snippet
      - message_count
      - has_attachments
      - headline
      - summary
      - category
      - participant_names
      - mailbox_ids
      - sender_email_addresses
      - participant_email_addresses
      - inbox_sort_time
      - snooze_until
      - first_sent_at
      - last_sent_at
    Session:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_agent:
          type:
          - string
          - 'null'
        country:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        parent_id:
          type:
          - string
          - 'null'
          format: uuid
        replaced_by_id:
          type:
          - string
          - 'null'
          format: uuid
        current:
          type:
          - boolean
          - 'null'
        last_used_at:
          type:
          - string
          - 'null'
          format: date-time
        revoked_at:
          type:
          - string
          - 'null'
          format: date-time
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        replaced_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        ip_address:
          type:
          - string
          - 'null'
      required:
      - id
      - user_agent
      - country
      - user_id
      - parent_id
      - replaced_by_id
      - current
      - last_used_at
      - revoked_at
      - expires_at
      - replaced_at
      - created_at
      - ip_address
    Search:
      type: object
      properties:
        query:
          type:
          - string
          - 'null'
        scope:
          type:
          - string
          - 'null'
        result_set:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSet"
          - type: 'null'
      required:
      - query
      - scope
      - result_set
    SearchResultSet:
      type: object
      properties:
        files:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSetFiles"
          - type: 'null'
        contacts:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSetContacts"
          - type: 'null'
        threads:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSetThreads"
          - type: 'null'
        organizations:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSetOrganizations"
          - type: 'null'
        deals:
          anyOf:
          - "$ref": "#/components/schemas/SearchResultSetDeals"
          - type: 'null'
      required:
      - files
      - contacts
      - threads
      - organizations
      - deals
    SearchResultSetFiles:
      type: object
      properties:
        total_results:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/SearchFile"
      required:
      - total_results
      - records
    SearchFile:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
        extension:
          type:
          - string
          - 'null'
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        participants:
          type: object
          additionalProperties:
            anyOf:
            - "$ref": "#/components/schemas/SearchContact"
            - type: string
            - type: 'null'
      required:
      - id
      - name
      - description
      - file_name
      - extension
      - first_sent_at
      - last_sent_at
      - participants
    SearchResultSetContacts:
      type: object
      properties:
        total_results:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/SearchContact"
      required:
      - total_results
      - records
    SearchContact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        global:
          type:
          - boolean
          - 'null'
        name:
          type:
          - string
          - 'null'
        background:
          type:
          - string
          - 'null'
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        contact_type:
          type: string
        avatar:
          anyOf:
          - "$ref": "#/components/schemas/ContactAvatar"
          - type: 'null'
      required:
      - id
      - global
      - name
      - background
      - user_id
      - contact_type
      - avatar
    SearchResultSetThreads:
      type: object
      properties:
        total_results:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Thread"
      required:
      - total_results
      - records
    SearchResultSetOrganizations:
      type: object
      properties:
        total_results:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/SearchOrganization"
      required:
      - total_results
      - records
    SearchOrganization:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        domain:
          type:
          - string
          - 'null'
        logo:
          anyOf:
          - "$ref": "#/components/schemas/OrganizationLogo"
          - type: 'null'
      required:
      - id
      - name
      - description
      - domain
      - logo
    SearchResultSetDeals:
      type: object
      properties:
        total_results:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/SearchDeal"
      required:
      - total_results
      - records
    SearchDeal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
        currency:
          type: string
        lost_reason:
          type:
          - string
          - 'null'
        pipeline_id:
          type: string
          format: uuid
        pipeline_stage_id:
          type: string
          format: uuid
        contact_id:
          type:
          - string
          - 'null'
          format: uuid
        organization_id:
          type:
          - string
          - 'null'
          format: uuid
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        amount:
          type:
          - number
          - 'null'
        pipeline_stage_name:
          type:
          - string
          - 'null'
        contact:
          anyOf:
          - "$ref": "#/components/schemas/SearchContact"
          - type: 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/SearchOrganization"
          - type: 'null'
      required:
      - id
      - name
      - status
      - currency
      - lost_reason
      - pipeline_id
      - pipeline_stage_id
      - contact_id
      - organization_id
      - closed_at
      - amount
      - pipeline_stage_name
      - contact
      - organization
    FileSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
        extension:
          type:
          - string
          - 'null'
        attachment_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        sender_email_addresses:
          type: array
          items:
            type: string
        recipient_email_addresses:
          type: array
          items:
            type: string
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        shared_with_me:
          type:
          - boolean
          - 'null'
        attachments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/AttachmentFromFile"
        participants:
          type: object
          additionalProperties:
            anyOf:
            - "$ref": "#/components/schemas/Contact"
            - type: 'null'
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
      required:
      - id
      - name
      - description
      - file_name
      - extension
      - attachment_count
      - pinned
      - sender_email_addresses
      - recipient_email_addresses
      - first_sent_at
      - last_sent_at
      - shared_with_me
      - attachments
      - participants
      - tags
    AttachmentFromFile:
      allOf:
      - "$ref": "#/components/schemas/Attachment"
      - type: object
        properties:
          sender_email_address:
            type:
            - string
            - 'null'
          recipient_email_addresses:
            type: array
            items:
              type: string
          thread:
            anyOf:
            - "$ref": "#/components/schemas/AttachmentThread"
            - type: 'null'
          message:
            anyOf:
            - "$ref": "#/components/schemas/AttachmentFromFileMessage"
            - type: 'null'
        required:
        - sender_email_address
        - recipient_email_addresses
        - thread
        - message
    AttachmentThread:
      type: object
      properties:
        id:
          type: string
          format: uuid
        subject:
          type:
          - string
          - 'null'
        snippet:
          type:
          - string
          - 'null'
        participant_email_addresses:
          type:
          - array
          - 'null'
          items:
            type: string
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        participant_names:
          "$ref": "#/components/schemas/ParticipantNames"
      required:
      - id
      - subject
      - snippet
      - participant_email_addresses
      - created_at
      - updated_at
      - participant_names
    AttachmentFromFileMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        snippet:
          type:
          - string
          - 'null'
      required:
      - id
      - snippet
    CurrentSession:
      type: object
      properties:
        access_token:
          anyOf:
          - "$ref": "#/components/schemas/CurrentSessionAccessToken"
          - type: 'null'
      required:
      - access_token
    CurrentSessionAccessToken:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - key
      - expires_at
    Account:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organization:
          type:
          - string
          - 'null'
        domain:
          type:
          - string
          - 'null'
        status:
          type: string
        ai_agents_enabled:
          type: boolean
        api_access:
          type: string
          enum:
          - 'off'
          - read
          - read_write
        outbound_email_enabled:
          type: boolean
        ask_carom_enabled:
          type: boolean
        demo:
          type: boolean
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        subscription_status:
          type:
          - string
          - 'null'
      required:
      - id
      - organization
      - domain
      - status
      - ai_agents_enabled
      - api_access
      - outbound_email_enabled
      - ask_carom_enabled
      - demo
      - expires_at
      - created_at
      - subscription_status
    APIKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        tier:
          type: string
          enum:
          - read
          - read_write
        prefix:
          type: string
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        revoked_at:
          type:
          - string
          - 'null'
          format: date-time
        last_used_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        user:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
      required:
      - id
      - name
      - tier
      - prefix
      - expires_at
      - revoked_at
      - last_used_at
      - created_at
    APIKeyWithSecret:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        tier:
          type: string
          enum:
          - read
          - read_write
        prefix:
          type: string
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        revoked_at:
          type:
          - string
          - 'null'
          format: date-time
        last_used_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        user:
          anyOf:
          - "$ref": "#/components/schemas/ContactEmploymentsOrganization"
          - type: 'null'
        secret:
          type: string
          pattern: "^carom_sk_[A-Za-z0-9_-]{43}$"
      required:
      - id
      - name
      - tier
      - prefix
      - expires_at
      - revoked_at
      - last_used_at
      - created_at
      - secret
    CountResult:
      type: object
      properties:
        total:
          type: integer
        exact:
          type: boolean
        capped:
          type: boolean
        cap:
          type:
          - integer
          - 'null'
      required:
      - total
      - exact
      - capped
      - cap
    DashboardTimeline:
      type: object
      properties:
        items:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/TimelineItem"
        has_more:
          type: boolean
        oldest_timestamp:
          type:
          - string
          - 'null'
          format: date-time
          description: Timestamp of the last (oldest) item, at microsecond precision;
            null when items is empty. Send it as `before` to load the next page.
      required:
      - items
      - has_more
      - oldest_timestamp
    File:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        file_name:
          type:
          - string
          - 'null'
        extension:
          type:
          - string
          - 'null'
        attachment_count:
          type:
          - integer
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        sender_email_addresses:
          type: array
          items:
            type: string
        recipient_email_addresses:
          type: array
          items:
            type: string
        first_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_sent_at:
          type:
          - string
          - 'null'
          format: date-time
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
        attachments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/AttachmentFromFile"
        participants:
          type: object
          additionalProperties:
            anyOf:
            - "$ref": "#/components/schemas/Contact"
            - type: 'null'
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
        shares:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Share"
      required:
      - id
      - name
      - description
      - file_name
      - extension
      - attachment_count
      - pinned
      - sender_email_addresses
      - recipient_email_addresses
      - first_sent_at
      - last_sent_at
      - tasks
      - comments
      - attachments
      - participants
      - tags
      - shares
    DealReport:
      type: object
      properties:
        truncated:
          type:
          - boolean
          - 'null'
        omitted_count:
          type:
          - integer
          - 'null'
        window_start:
          type:
          - string
          - 'null'
          format: date
        deals:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/DealReportDeal"
      required:
      - truncated
      - omitted_count
      - window_start
      - deals
    DealReportDeal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        pipeline_id:
          type:
          - string
          - 'null'
          format: uuid
        pipeline_stage_id:
          type: string
          format: uuid
        amount:
          type:
          - number
          - 'null'
        expected_value:
          type:
          - number
          - 'null'
        owner_user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        expected_close_date:
          type:
          - string
          - 'null'
          format: date
        current_stage_entered_at:
          type:
          - string
          - 'null'
          format: date-time
        lost_reason:
          type:
          - string
          - 'null'
      required:
      - id
      - name
      - status
      - pipeline_id
      - pipeline_stage_id
      - amount
      - expected_value
      - owner_user_id
      - created_at
      - closed_at
      - expected_close_date
      - current_stage_entered_at
      - lost_reason
    Discussion:
      type: object
      properties:
        scopes:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/DiscussionScopes"
      required:
      - scopes
    DiscussionScopes:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
        label:
          type:
          - string
          - 'null'
        unit:
          type:
          - string
          - 'null'
        primary:
          type:
          - boolean
          - 'null'
        total_comments:
          type:
          - integer
          - 'null'
        records:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/DiscussionScopesRecords"
      required:
      - key
      - label
      - unit
      - primary
      - total_comments
      - records
    DiscussionScopesRecords:
      type: object
      properties:
        key:
          type:
          - string
          - 'null'
        record_type:
          type:
          - string
          - 'null'
        record_id:
          type:
          - string
          - 'null'
          format: uuid
        name:
          type:
          - string
          - 'null'
        total_comments:
          type:
          - integer
          - 'null'
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
      required:
      - key
      - record_type
      - record_id
      - name
      - total_comments
      - comments
    CurrentUser:
      allOf:
      - "$ref": "#/components/schemas/User"
      - type: object
        properties:
          launchpad_dismissed_at:
            type:
            - string
            - 'null'
            format: date-time
          capabilities:
            type: object
            properties:
              add_users:
                type: boolean
              add_mailboxes:
                type: boolean
              api_key_tiers:
                type: array
                items:
                  type: string
                  enum:
                  - read
                  - read_write
              send_email:
                type: boolean
              ask_carom:
                type: boolean
            required:
            - add_users
            - add_mailboxes
            - api_key_tiers
            - send_email
            - ask_carom
          mailbox_subscriptions:
            type:
            - array
            - 'null'
            items:
              "$ref": "#/components/schemas/MailboxSubscription"
          calendar_subscriptions:
            type:
            - array
            - 'null'
            items:
              "$ref": "#/components/schemas/CalendarSubscription"
          configuration:
            anyOf:
            - "$ref": "#/components/schemas/Configuration"
            - type: 'null'
          account:
            anyOf:
            - "$ref": "#/components/schemas/CurrentUserAccount"
            - type: 'null'
        required:
        - launchpad_dismissed_at
        - capabilities
        - mailbox_subscriptions
        - calendar_subscriptions
        - configuration
        - account
    CalendarSubscription:
      type: object
      properties:
        id:
          type: string
          format: uuid
        calendar_id:
          type:
          - string
          - 'null'
          format: uuid
        color:
          type:
          - string
          - 'null'
        calendar:
          "$ref": "#/components/schemas/Calendar"
      required:
      - id
      - calendar_id
      - color
      - calendar
    Calendar:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        access_role:
          type:
          - string
          - 'null'
        mailbox_id:
          type:
          - string
          - 'null'
          format: uuid
        sync_enabled:
          type:
          - boolean
          - 'null'
        primary:
          type:
          - boolean
          - 'null'
      required:
      - id
      - name
      - description
      - access_role
      - mailbox_id
      - sync_enabled
      - primary
    CurrentUserAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        organization:
          type:
          - string
          - 'null'
        domain:
          type:
          - string
          - 'null'
        ai_agents_enabled:
          type: boolean
        api_access:
          type: string
          enum:
          - 'off'
          - read
          - read_write
        outbound_email_enabled:
          type: boolean
        ask_carom_enabled:
          type: boolean
        demo:
          type: boolean
        expires_at:
          type:
          - string
          - 'null'
          format: date-time
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        subscription_status:
          type:
          - string
          - 'null'
        live_at:
          type:
          - string
          - 'null'
          format: date-time
        credit_expires_at:
          type:
          - string
          - 'null'
          format: date-time
        credit_remaining_cents:
          type:
          - integer
          - 'null'
        users:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/User"
        agent_configurations:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/AgentConfigurationSummary"
      required:
      - id
      - status
      - organization
      - domain
      - ai_agents_enabled
      - api_access
      - outbound_email_enabled
      - ask_carom_enabled
      - demo
      - expires_at
      - closed_at
      - subscription_status
      - live_at
      - credit_expires_at
      - credit_remaining_cents
      - users
      - agent_configurations
    AgentConfigurationSummary:
      type: object
      description: Whether an agent is on, as every user of the account sees it.
      properties:
        id:
          type: string
          format: uuid
        agent_slug:
          type: string
        enabled:
          type: boolean
      required:
      - id
      - agent_slug
      - enabled
    AgentConfiguration:
      type: object
      description: The admin view of one switchable agent. An agent with no
        stored row is listed as its missing row reads, enabled with defaults,
        with null id and timestamps.
      properties:
        id:
          type:
          - string
          - 'null'
          format: uuid
        agent_slug:
          type: string
        enabled:
          type: boolean
        config:
          type:
          - object
          - 'null'
          additionalProperties: true
          description: The stored settings, keyed by setting. Absent keys take
            the declared default.
        settings:
          type: array
          description: Every setting the agent declares, resolved. A level
            setting's values are off, suggest, and auto; render allowed_values
            rather than assuming them.
          items:
            "$ref": "#/components/schemas/AgentSetting"
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - agent_slug
      - enabled
      - config
      - settings
      - created_at
      - updated_at
    AgentSetting:
      type: object
      properties:
        key:
          type: string
        value:
          type:
          - string
          - boolean
          description: The stored value, or the default when none is stored.
        default:
          type:
          - string
          - boolean
        allowed_values:
          type: array
          items:
            type:
            - string
            - boolean
      required:
      - key
      - value
      - default
      - allowed_values
    PipelineReport:
      type: object
      properties:
        pipeline_id:
          type:
          - string
          - 'null'
          format: uuid
        generated_at:
          type:
          - string
          - 'null'
          format: date-time
        window_months:
          type:
          - integer
          - 'null'
        total_open:
          type:
          - integer
          - 'null'
        total_closed_in_window:
          type:
          - integer
          - 'null'
        truncated:
          type:
          - boolean
          - 'null'
        omitted_count:
          type:
          - integer
          - 'null'
        stages:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/PipelineReportStage"
        deals:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/PipelineReportDeal"
      required:
      - pipeline_id
      - generated_at
      - window_months
      - total_open
      - total_closed_in_window
      - truncated
      - omitted_count
      - stages
      - deals
    PipelineReportDeal:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        pipeline_stage_id:
          type: string
          format: uuid
        amount:
          type:
          - number
          - 'null'
        currency:
          type: string
        expected_value:
          type:
          - number
          - 'null'
        owner_user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        expected_close_date:
          type:
          - string
          - 'null'
          format: date
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        lost_reason:
          type:
          - string
          - 'null'
        reached_stage_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        current_stage_entered_at:
          type:
          - string
          - 'null'
          format: date-time
        stage_days:
          type:
          - object
          - 'null'
          additionalProperties:
            type: number
      required:
      - id
      - name
      - status
      - pipeline_stage_id
      - amount
      - currency
      - expected_value
      - owner_user_id
      - created_at
      - expected_close_date
      - closed_at
      - lost_reason
      - reached_stage_ids
      - current_stage_entered_at
      - stage_days
    MailboxWithAdminData:
      allOf:
      - "$ref": "#/components/schemas/Mailbox"
      - type: object
        properties:
          connect_url:
            type:
            - string
            - 'null'
            description: Provider OAuth URL to (re)connect this mailbox, minted fresh
              on every request (honouring `grants`). Its `state` is `<mailbox_id>.<nonce>`;
              send it back as `mailbox.oauth_state` on `PATCH /mailboxes/{id}/connect`
              within 15 minutes. Each state is single-use. Null when the mailbox's
              provider has no OAuth connect.
          imports:
            type:
            - array
            - 'null'
            items:
              "$ref": "#/components/schemas/Import"
          calendar_imports:
            type:
            - array
            - 'null'
            items:
              "$ref": "#/components/schemas/CalendarImport"
        required:
        - connect_url
        - imports
        - calendar_imports
    Import:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type:
          - string
          - 'null'
        total_thread_count:
          type:
          - integer
          - 'null'
        imported_thread_count:
          type:
          - integer
          - 'null'
        skipped_thread_count:
          type:
          - integer
          - 'null'
        failed_thread_count:
          type:
          - integer
          - 'null'
        started_at:
          type:
          - string
          - 'null'
          format: date-time
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
        last_progress_at:
          type:
          - string
          - 'null'
          format: date-time
        result:
          type:
          - string
          - 'null'
          description: Outcome. A complete import is imported, partial, failed, or
            nothing_to_import; any other import reports its status (processing or
            failed).
        error:
          type:
          - object
          - 'null'
          properties:
            code:
              type: string
            message:
              type: string
            category:
              type: string
            retriable:
              type: boolean
          required:
          - code
          - message
          - category
          - retriable
      required:
      - id
      - status
      - total_thread_count
      - imported_thread_count
      - skipped_thread_count
      - failed_thread_count
      - started_at
      - completed_at
      - last_progress_at
      - result
      - error
    CalendarImport:
      type: object
      properties:
        id:
          type: string
          format: uuid
        calendar_id:
          type: string
          format: uuid
        status:
          type:
          - string
          - 'null'
        total_event_count:
          type:
          - integer
          - 'null'
        imported_event_count:
          type:
          - integer
          - 'null'
        skipped_event_count:
          type:
          - integer
          - 'null'
        failed_event_count:
          type:
          - integer
          - 'null'
        started_at:
          type:
          - string
          - 'null'
          format: date-time
        completed_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - calendar_id
      - status
      - total_event_count
      - imported_event_count
      - skipped_event_count
      - failed_event_count
      - started_at
      - completed_at
    UserWithConfiguration:
      allOf:
      - "$ref": "#/components/schemas/User"
      - type: object
        properties:
          configuration:
            anyOf:
            - "$ref": "#/components/schemas/Configuration"
            - type: 'null'
        required:
        - configuration
    AccountBilling:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        billing_account:
          anyOf:
          - "$ref": "#/components/schemas/BillingAccount"
          - type: 'null'
      required:
      - id
      - status
      - billing_account
    AccountWithOwnerSession:
      type: object
      properties:
        id:
          type: string
          format: uuid
        organization:
          type:
          - string
          - 'null'
        domain:
          type:
          - string
          - 'null'
        status:
          type: string
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        owner:
          type: object
          properties:
            session:
              type: object
              properties:
                access_token:
                  "$ref": "#/components/schemas/CurrentSessionAccessToken"
                refresh_token:
                  type: string
              required:
              - access_token
          required:
          - session
      required:
      - id
      - organization
      - domain
      - status
      - created_at
      - owner
    AssistantMemory:
      type: object
      properties:
        id:
          type: string
          format: uuid
        content:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - content
      - created_at
      - updated_at
    Attachment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        file_id:
          type:
          - string
          - 'null'
          format: uuid
        size:
          type:
          - integer
          - 'null'
        content_type:
          type:
          - string
          - 'null'
        reference_id:
          type:
          - string
          - 'null'
        inline:
          type:
          - boolean
          - 'null'
        content_id:
          type:
          - string
          - 'null'
          description: The MIME Content-ID an HTML body references as `cid:<content_id>`.
        decorative:
          type: boolean
          description: A signature logo, tracking pixel or quoted-history image rather than a file anyone sent. File lists leave these out unless asked.
        part_index:
          type: integer
        sent_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - file_id
      - size
      - content_type
      - reference_id
      - inline
      - content_id
      - decorative
      - part_index
      - sent_at
    Brief:
      type: object
      properties:
        id:
          type: string
          format: uuid
        subject_type:
          type: string
        subject_id:
          type: string
          format: uuid
        status:
          type: string
        shared:
          type: boolean
        generated_by_user_id:
          type: string
          format: uuid
        content:
          anyOf:
          - "$ref": "#/components/schemas/BriefContent"
          - "$ref": "#/components/schemas/LegacyBriefContent"
          - type: 'null'
        error:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        citations:
          type: array
          items:
            "$ref": "#/components/schemas/RecordReference"
        hidden_source_count:
          type: integer
      required:
      - id
      - subject_type
      - subject_id
      - status
      - shared
      - generated_by_user_id
      - content
      - error
      - created_at
      - updated_at
      - citations
      - hidden_source_count
    Tagging:
      type: object
      properties:
        id:
          type: string
          format: uuid
        taggable_type:
          type: string
        taggable_id:
          type: string
          format: uuid
        tag_id:
          type: string
          format: uuid
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        tag:
          anyOf:
          - "$ref": "#/components/schemas/Tag"
          - type: 'null'
      required:
      - id
      - taggable_type
      - taggable_id
      - tag_id
      - user_id
      - created_at
      - tag
    CalendarEvent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        location:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        calendar_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        time_zone:
          description: IANA zone the event was scheduled in, as the provider reported it.
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        start_datetime:
          type:
          - string
          - 'null'
          format: date-time
        end_datetime:
          type:
          - string
          - 'null'
          format: date-time
        all_day_start_date:
          type:
          - string
          - 'null'
          format: date
        all_day_end_date:
          type:
          - string
          - 'null'
          format: date
        attendees:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/CalendarAttendee"
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
        comments:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Comment"
        meeting_transcript:
          anyOf:
          - "$ref": "#/components/schemas/MeetingTranscriptSummary"
          - type: 'null'
          description: Summary only; the entries live at /calendar_events/{calendar_event_id}/transcript.
        calendars:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Calendar"
      required:
      - id
      - name
      - description
      - location
      - status
      - calendar_ids
      - created_at
      - updated_at
      - start_datetime
      - end_datetime
      - all_day_start_date
      - all_day_end_date
      - attendees
      - tasks
      - tags
      - comments
      - calendars
      - meeting_transcript
    MeetingTranscript:
      type: object
      properties:
        id:
          type: string
          format: uuid
        calendar_event_id:
          type: string
          format: uuid
        source:
          type: string
          enum:
          - google_meet
          - microsoft_teams
          - upload
        language:
          type:
          - string
          - 'null'
        summary:
          type:
          - string
          - 'null'
          description: Prose written by the auto_meeting agent — 2-4 short paragraphs
            separated by a blank line ("\n\n"), 1-3 sentences each — carrying inline
            markdown citations of the form `[phrase](entry:<meeting_transcript_entry_id>)`,
            exactly one per sentence. Every target is the id of an entry of this same
            transcript; anything the model emitted that did not resolve, and any surplus
            citation within a sentence, was collapsed to its bare phrase. Null until
            the agent has analyzed the transcript.
        entry_count:
          type: integer
        started_at:
          type:
          - string
          - 'null'
          format: date-time
        ended_at:
          type:
          - string
          - 'null'
          format: date-time
        analyzed_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        entries:
          type: array
          items:
            "$ref": "#/components/schemas/MeetingTranscriptEntry"
      required:
      - id
      - calendar_event_id
      - source
      - language
      - summary
      - entry_count
      - started_at
      - ended_at
      - analyzed_at
      - created_at
      - updated_at
      - entries
    MeetingTranscriptEntry:
      type: object
      properties:
        id:
          type: string
          format: uuid
        position:
          type: integer
        speaker_name:
          type:
          - string
          - 'null'
        speaker_email:
          type:
          - string
          - 'null'
        text:
          type: string
        started_at:
          type:
          - string
          - 'null'
          format: date-time
        ended_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - position
      - speaker_name
      - speaker_email
      - text
      - started_at
      - ended_at
    MeetingTranscriptSummary:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source:
          type: string
        summary:
          type:
          - string
          - 'null'
          description: Prose written by the auto_meeting agent — 2-4 short paragraphs
            separated by a blank line ("\n\n"), 1-3 sentences each — carrying inline
            markdown citations of the form `[phrase](entry:<meeting_transcript_entry_id>)`,
            exactly one per sentence. Every target is the id of an entry of this same
            transcript; anything the model emitted that did not resolve, and any surplus
            citation within a sentence, was collapsed to its bare phrase. Null until
            the agent has analyzed the transcript.
        entry_count:
          type: integer
        analyzed_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - source
      - summary
      - entry_count
      - analyzed_at
    CalendarAttendee:
      type: object
      properties:
        id:
          type: string
          format: uuid
        response:
          type:
          - string
          - 'null'
        optional:
          type:
          - boolean
          - 'null'
        email_address:
          type:
          - string
          - 'null'
        display_name:
          type:
          - string
          - 'null'
        organizer:
          type:
          - boolean
          - 'null'
        calendar_event_id:
          type:
          - string
          - 'null'
          format: uuid
        responded_at:
          type:
          - string
          - 'null'
          format: date-time
        contact:
          anyOf:
          - "$ref": "#/components/schemas/Contact"
          - type: string
          - type: 'null'
      required:
      - id
      - response
      - optional
      - email_address
      - display_name
      - organizer
      - calendar_event_id
      - responded_at
      - contact
    Conversation:
      type: object
      properties:
        id:
          type: string
          format: uuid
        title:
          type:
          - string
          - 'null'
        context_type:
          type:
          - string
          - 'null'
          enum:
          - contact
          - organization
          - thread
          - deal
          -
        context_id:
          type:
          - string
          - 'null'
          format: uuid
        status:
          type: string
        last_message_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        messages:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ConversationMessage"
      required:
      - id
      - title
      - context_type
      - context_id
      - status
      - last_message_at
      - created_at
      - updated_at
    ConversationMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        role:
          type: string
        content:
          type:
          - string
          - 'null'
          description: Citations appear as `[ref:<snake_case type>:<uuid>]`, e.g. `[ref:calendar_event:…]`.
        status:
          type: string
        error_code:
          type:
          - string
          - 'null'
          enum:
          - usage_limit_reached
          - reply_failed
          -
          description: Set on a failed assistant message; the websocket `error` event carries the same code.
        intermediate:
          type: boolean
          description: True for an assistant step that handed off to tools (its `blocks` carry `tool_use`); false for the final answer and for user and tool rows.
        feedback_rating:
          type:
          - string
          - 'null'
        feedback_reason:
          type:
          - string
          - 'null'
        support_id:
          type:
          - string
          - 'null'
          format: uuid
          description: Reference support uses to find the model call behind an answer.
        refs:
          type: array
          items:
            "$ref": "#/components/schemas/CitationReference"
        created_at:
          type: string
          format: date-time
        blocks:
          type: array
          items:
            "$ref": "#/components/schemas/MessageBlock"
      required:
      - id
      - role
      - content
      - status
      - error_code
      - intermediate
      - feedback_rating
      - feedback_reason
      - support_id
      - refs
      - created_at
      - blocks
    DailyBriefing:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        error:
          type:
          - string
          - 'null'
        content:
          anyOf:
          - "$ref": "#/components/schemas/DailyBriefingContent"
          - type: 'null'
        generated_at:
          type:
          - string
          - 'null'
          format: date-time
        regeneratable_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - status
      - error
      - content
      - generated_at
      - regeneratable_at
    MailboxGrant:
      type: object
      properties:
        id:
          type: string
          format: uuid
        mailbox_id:
          type: string
          format: uuid
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        group_id:
          type:
          - string
          - 'null'
          format: uuid
        level:
          type: string
        granted_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_at:
          type: string
          format: date-time
      required:
      - id
      - mailbox_id
      - user_id
      - group_id
      - level
      - granted_by_user_id
      - created_at
    Deal:
      type: object
      properties:
        counts:
          "$ref": "#/components/schemas/RecordActivityCounts"
        events:
          type: array
          maxItems: 3
          items:
            "$ref": "#/components/schemas/CalendarEvent"
        tasks:
          type: array
          maxItems: 5
          items:
            "$ref": "#/components/schemas/Task"
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        status:
          type: string
        currency:
          type: string
        lost_reason:
          type:
          - string
          - 'null'
        pipeline_id:
          type: string
          format: uuid
        pipeline_stage_id:
          type: string
          format: uuid
        contact_id:
          type:
          - string
          - 'null'
          format: uuid
        organization_id:
          type:
          - string
          - 'null'
          format: uuid
        owner_user_id:
          type:
          - string
          - 'null'
          format: uuid
        created_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        pinned:
          type:
          - boolean
          - 'null'
        expected_close_date:
          type:
          - string
          - 'null'
          format: date
        closed_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        amount:
          type:
          - number
          - 'null'
        contact:
          anyOf:
          - "$ref": "#/components/schemas/SearchContact"
          - type: 'null'
        organization:
          anyOf:
          - "$ref": "#/components/schemas/SearchOrganization"
          - type: 'null'
        tags:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Tag"
        transitions:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/DealStageTransition"
      required:
      - id
      - name
      - description
      - status
      - currency
      - lost_reason
      - pipeline_id
      - pipeline_stage_id
      - contact_id
      - organization_id
      - owner_user_id
      - created_by_user_id
      - pinned
      - expected_close_date
      - closed_at
      - created_at
      - updated_at
      - amount
      - contact
      - organization
      - tags
    DealStageTransition:
      type: object
      properties:
        id:
          type: string
          format: uuid
        changed_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        proposal_id:
          type:
          - string
          - 'null'
          format: uuid
        agent:
          type:
          - string
          - 'null'
        direction:
          type:
          - string
          - 'null'
        occurred_at:
          type: string
          format: date-time
        from_stage:
          type:
          - object
          - 'null'
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            position:
              type: integer
          required:
          - id
          - name
          - position
        to_stage:
          type: object
          properties:
            id:
              type: string
              format: uuid
            name:
              type: string
            position:
              type: integer
          required:
          - id
          - name
          - position
      required:
      - id
      - changed_by_user_id
      - proposal_id
      - agent
      - direction
      - occurred_at
      - from_stage
      - to_stage
    DeviceToken:
      type: object
      properties:
        id:
          type: string
          format: uuid
        device_id:
          type: string
        platform:
          type: string
        environment:
          type: string
        device_name:
          type:
          - string
          - 'null'
        last_registered_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
      - id
      - device_id
      - platform
      - environment
      - device_name
      - last_registered_at
      - created_at
      - updated_at
    DraftFailure:
      type: object
      description: Why the draft last failed to send. `message` is safe to show the
        user; the underlying provider or system error is logged server-side and
        never returned.
      properties:
        code:
          type: string
          enum:
          - outbound_disabled
          - send_permission_lost
          - mailbox_not_authorized
          - rate_limited
          - provider_rejected
          - delivery_setup_failed
          - local_delivery_failed
          - enqueue_failed
          - delivery_never_started
          - delivery_admission_failed
          - mailbox_deleted
          - mailbox_deleted_during_delivery
          - delivery_failed
        message:
          type: string
      required:
      - code
      - message
    Draft:
      type: object
      properties:
        id:
          type: string
          format: uuid
        status:
          type: string
        draft_type:
          type:
          - string
          - 'null'
        mailbox_id:
          type:
          - string
          - 'null'
          format: uuid
        thread_id:
          type:
          - string
          - 'null'
          format: uuid
        subject:
          type:
          - string
          - 'null'
        body:
          type:
          - string
          - 'null'
        body_html:
          type:
          - string
          - 'null'
        content_state:
          type:
          - string
          - 'null'
        last_error:
          anyOf:
          - "$ref": "#/components/schemas/DraftFailure"
          - type: 'null'
        rfc_id:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
        queued_at:
          type:
          - string
          - 'null'
          format: date-time
        sending_at:
          type:
          - string
          - 'null'
          format: date-time
        sent_at:
          type:
          - string
          - 'null'
          format: date-time
        last_failed_at:
          type:
          - string
          - 'null'
          format: date-time
        to_email_addresses:
          type: array
          items:
            type: string
        cc_email_addresses:
          type: array
          items:
            type: string
        bcc_email_addresses:
          type: array
          items:
            type: string
      required:
      - id
      - status
      - draft_type
      - mailbox_id
      - thread_id
      - subject
      - body
      - body_html
      - content_state
      - last_error
      - rfc_id
      - created_at
      - updated_at
      - queued_at
      - sending_at
      - sent_at
      - last_failed_at
      - to_email_addresses
      - cc_email_addresses
      - bcc_email_addresses
    Milestone:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        description:
          type:
          - string
          - 'null'
        task_count:
          type:
          - integer
          - 'null'
        completed_task_count:
          type:
          - integer
          - 'null'
        task_progress:
          type:
          - number
          - 'null'
        pinned:
          type:
          - boolean
          - 'null'
        archived:
          type:
          - boolean
          - 'null'
        visibility:
          type:
          - string
          - 'null'
        collaborator_user_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        due:
          type:
          - string
          - 'null'
          format: date
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
      required:
      - id
      - name
      - description
      - task_count
      - completed_task_count
      - task_progress
      - pinned
      - archived
      - visibility
      - collaborator_user_ids
      - due
      - tasks
    PendingMessage:
      type: object
      properties:
        id:
          type: string
          format: uuid
        thread_id:
          type:
          - string
          - 'null'
          format: uuid
        mailbox_id:
          type:
          - string
          - 'null'
          format: uuid
        subject:
          type:
          - string
          - 'null'
        body:
          type:
          - string
          - 'null'
        body_html:
          type:
          - string
          - 'null'
        rfc_id:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        sent_at:
          type:
          - string
          - 'null'
          format: date-time
        delivery_status:
          type:
          - string
          - 'null'
        from_email_address:
          type:
          - string
          - 'null'
        to_email_addresses:
          type: array
          items:
            type: string
        cc_email_addresses:
          type: array
          items:
            type: string
        bcc_email_addresses:
          type: array
          items:
            type: string
      required:
      - id
      - thread_id
      - mailbox_id
      - subject
      - body
      - body_html
      - rfc_id
      - created_at
      - sent_at
      - delivery_status
      - from_email_address
      - to_email_addresses
      - cc_email_addresses
      - bcc_email_addresses
    Reaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type:
          - string
          - 'null'
          format: uuid
        text:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - id
      - user_id
      - text
      - created_at
    ShareRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        audience:
          type: string
        include_unknown:
          type: boolean
        note:
          type:
          - string
          - 'null'
        created_at:
          type: string
          format: date-time
        contact:
          anyOf:
          - "$ref": "#/components/schemas/ShareRequestContact"
          - type: 'null'
        named_recipients:
          type: array
          items:
            type: object
            properties:
              user_id:
                type: string
                format: uuid
              requested_at:
                type: string
                format: date-time
            required:
            - user_id
            - requested_at
      required:
      - id
      - audience
      - include_unknown
      - note
      - created_at
      - contact
      - named_recipients
    ShareRequestContact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        email_addresses:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmailAddresses"
      required:
      - id
      - name
      - email_addresses
    ShareRequestRecipient:
      type: object
      properties:
        id:
          type: string
          format: uuid
        state:
          type: string
        named:
          type: boolean
        responded_at:
          type:
          - string
          - 'null'
          format: date-time
        share_request:
          anyOf:
          - "$ref": "#/components/schemas/ShareRequestRecipientShareRequest"
          - type: 'null'
      required:
      - id
      - state
      - named
      - responded_at
      - share_request
    ShareRequestRecipientShareRequest:
      type: object
      properties:
        id:
          type: string
          format: uuid
        audience:
          type: string
        include_unknown:
          type: boolean
        note:
          type:
          - string
          - 'null'
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        requester:
          anyOf:
          - "$ref": "#/components/schemas/ShareRequestRecipientShareRequestRequester"
          - type: 'null'
        contact:
          anyOf:
          - "$ref": "#/components/schemas/ShareRequestRecipientShareRequestContact"
          - type: 'null'
      required:
      - id
      - audience
      - include_unknown
      - note
      - created_at
      - requester
      - contact
    ShareRequestRecipientShareRequestRequester:
      type: object
      properties:
        id:
          type: string
          format: uuid
        first_name:
          type:
          - string
          - 'null'
        last_name:
          type:
          - string
          - 'null'
        email_address:
          type:
          - string
          - 'null'
        avatar_color:
          type:
          - string
          - 'null'
      required:
      - id
      - first_name
      - last_name
      - email_address
      - avatar_color
    ShareRequestRecipientShareRequestContact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        email_addresses:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/ContactEmailAddresses"
      required:
      - id
      - name
      - email_addresses
    Space:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        public:
          type:
          - boolean
          - 'null'
        include_tagged_resource_children:
          type: boolean
        inclusions:
          type: object
          properties:
            tags:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type:
                    - string
                    - 'null'
                required:
                - id
                - name
            contacts:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type:
                    - string
                    - 'null'
                required:
                - id
                - name
            organizations:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  name:
                    type:
                    - string
                    - 'null'
                required:
                - id
                - name
          required:
          - tags
          - contacts
          - organizations
        pinned:
          type:
          - boolean
          - 'null'
        created_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        admin_user_ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
        counts:
          type: object
          properties:
            open_tasks:
              type:
              - integer
              - 'null'
              description: Set on the single-space response; null on the list.
            upcoming_events:
              type:
              - integer
              - 'null'
              description: Set on the single-space response; null on the list.
            tasks:
              type:
              - integer
              - 'null'
              description: Open tasks in the space that the caller can see, on both
                the list and the single-space response.
            events:
              type:
              - integer
              - 'null'
            contacts:
              type:
              - integer
              - 'null'
            organizations:
              type:
              - integer
              - 'null'
            threads:
              type:
              - integer
              - 'null'
            files:
              type:
              - integer
              - 'null'
            comments:
              type:
              - integer
              - 'null'
          required:
          - tasks
          - events
          - contacts
          - organizations
          - threads
          - files
          - comments
        users:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/User"
        groups:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Group"
        events:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/CalendarEvent"
        tasks:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Task"
        contacts:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Contact"
        organizations:
          type:
          - array
          - 'null'
          items:
            "$ref": "#/components/schemas/Organization"
      required:
      - id
      - name
      - description
      - public
      - include_tagged_resource_children
      - inclusions
      - pinned
      - created_by_user_id
      - admin_user_ids
      - users
      - groups
      - events
      - tasks
      - contacts
      - organizations
    TermsAssent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        document_type:
          type: string
        acceptance_method:
          type: string
        arbitration_notice_displayed:
          type: boolean
        document_effective_at:
          type: string
          format: date-time
        accepted_at:
          type: string
          format: date-time
      required:
      - id
      - document_type
      - acceptance_method
      - arbitration_notice_displayed
      - document_effective_at
      - accepted_at
    Image:
      type: object
      properties:
        id:
          type: string
          format: uuid
        source_url:
          type: string
        file_name:
          type:
          - string
          - 'null'
      required:
      - id
      - source_url
      - file_name
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
      - code
      - message
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            fields:
              type: object
              additionalProperties:
                "$ref": "#/components/schemas/ErrorDetail"
          required:
          - code
          - message
      required:
      - error
    Ok:
      type: object
      properties:
        ok:
          type: string
          const: ok
      required:
      - ok
    Success:
      type: object
      properties:
        success:
          type: boolean
          const: true
      required:
      - success
    PageInfo:
      type: object
      properties:
        limit:
          type: integer
        next_cursor:
          type:
          - string
          - 'null'
          description: Opaque token for the next page, bound to this list and its
            sort and order. Send it back unchanged with the same sort and order; any
            other value returns 400 invalid_cursor. Tokens may stop working after
            a deploy, in which case request the first page again.
        prev_cursor:
          type:
          - string
          - 'null'
          description: Opaque token for the previous page, with the same rules as
            next_cursor.
        has_more_after:
          type: boolean
        has_more_before:
          type: boolean
      required:
      - limit
      - next_cursor
      - prev_cursor
      - has_more_after
      - has_more_before
    OffsetCollection:
      type: object
      properties:
        slice_key:
          type:
          - string
          - 'null'
        filters:
          type:
          - object
          - 'null'
          additionalProperties: true
        sort:
          type:
          - string
          - 'null'
        order:
          type:
          - string
          - 'null'
          enum:
          - asc
          - desc
          -
        per_page:
          type: integer
        page:
          type: integer
        total_results:
          type:
          - integer
          - 'null'
        pages:
          type:
          - integer
          - 'null'
        records:
          type: array
          items: {}
      required:
      - slice_key
      - filters
      - sort
      - order
      - per_page
      - page
      - total_results
      - pages
      - records
      description: An unpaginated list returns every record on one page, so page and
        pages are 1 and per_page and total_results equal the record count (0 for an
        empty list).
    CursorCollection:
      type: object
      properties:
        slice_key:
          type:
          - string
          - 'null'
        filters:
          type:
          - object
          - 'null'
          additionalProperties: true
        page_info:
          "$ref": "#/components/schemas/PageInfo"
        records:
          type: array
          items: {}
      required:
      - slice_key
      - filters
      - page_info
      - records
      description: Cursor metadata lives in page_info.
    InvoiceItem:
      type: object
      properties:
        type:
          type: string
          enum:
          - subscription
          - users
          - mailboxes
        quantity:
          type:
          - integer
          - 'null'
        amount:
          type: integer
          description: Cents.
        proration:
          type:
          - boolean
          - 'null'
        description:
          type:
          - string
          - 'null'
        period_start:
          type:
          - string
          - 'null'
          format: date-time
        period_end:
          type:
          - string
          - 'null'
          format: date-time
        unit_rate:
          type:
          - integer
          - 'null'
          description: Cents per unit.
      required:
      - type
      - quantity
      - amount
      - proration
      - description
      - period_start
      - period_end
      - unit_rate
    Invoice:
      type: object
      properties:
        id:
          type:
          - string
          - 'null'
        status:
          type:
          - string
          - 'null'
        number:
          type:
          - string
          - 'null'
        currency:
          type:
          - string
          - 'null'
        hosted_invoice_url:
          type:
          - string
          - 'null'
        invoice_pdf:
          type:
          - string
          - 'null'
        billing_reason:
          type:
          - string
          - 'null'
        paid:
          type:
          - boolean
          - 'null'
        amount_paid:
          type: integer
          description: Cents.
        amount_due:
          type: integer
          description: Cents.
        total:
          type:
          - integer
          - 'null'
          description: Cents.
        subtotal:
          type:
          - integer
          - 'null'
          description: Cents.
        period_start:
          type:
          - string
          - 'null'
          format: date-time
        period_end:
          type:
          - string
          - 'null'
          format: date-time
        items:
          type: array
          description: One entry per invoice line, so a proration line and a regular
            line of the same type both appear.
          items:
            "$ref": "#/components/schemas/InvoiceItem"
      required:
      - id
      - status
      - number
      - currency
      - hosted_invoice_url
      - invoice_pdf
      - billing_reason
      - paid
      - amount_paid
      - amount_due
      - total
      - subtotal
      - period_start
      - period_end
      - items
    BillingAccount:
      type: object
      properties:
        subscription_status:
          type:
          - string
          - 'null'
        plan_code:
          type:
          - string
          - 'null'
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        created_at:
          type:
          - string
          - 'null'
          format: date-time
        subscribed_at:
          type:
          - string
          - 'null'
          format: date-time
        canceled_at:
          type:
          - string
          - 'null'
          format: date-time
        cancellation_effective_at:
          type:
          - string
          - 'null'
          format: date-time
        first_period_ends_at:
          type:
          - string
          - 'null'
          format: date-time
        current_usage:
          type: object
          description: Empty until the subscription exists. Every rate is the plan's
            monthly price in integer cents.
          properties:
            subscription:
              type: object
              properties:
                rate:
                  type: integer
                  description: Cents per month.
              required:
              - rate
            user:
              type: object
              properties:
                quantity:
                  type: integer
                rate:
                  type: integer
                  description: Cents per month.
              required:
              - quantity
              - rate
            mailbox:
              type: object
              properties:
                quantity:
                  type: integer
                rate:
                  type: integer
                  description: Cents per month.
              required:
              - quantity
              - rate
        invoices:
          type: array
          items:
            "$ref": "#/components/schemas/Invoice"
      required:
      - subscription_status
      - plan_code
      - id
      - account_id
      - created_at
      - subscribed_at
      - canceled_at
      - cancellation_effective_at
      - first_period_ends_at
      - current_usage
      - invoices
    ThrottleCheckResponse:
      type: object
      properties:
        throttled:
          type: boolean
      required:
      - throttled
    CardSetupResponse:
      type: object
      properties:
        client_secret:
          type: string
      required:
      - client_secret
    SuccessResponse:
      "$ref": "#/components/schemas/Success"
    PresignedUrlResponse:
      type: object
      properties:
        presigned_url:
          type: string
        expires_at:
          type: string
          format: date-time
        filename:
          type: string
        content_type:
          type: string
      required:
      - presigned_url
      - expires_at
      - filename
      - content_type
    InitializationResponse:
      type: object
      properties:
        initialization:
          type: object
          properties:
            complete:
              type: boolean
            status:
              type:
              - string
              - 'null'
            counts:
              type: object
              properties:
                total_threads:
                  type: integer
                imported_threads:
                  type: integer
              required:
              - total_threads
              - imported_threads
          required:
          - complete
          - status
          - counts
      required:
      - initialization
    SocketTicketResponse:
      type: object
      properties:
        socket_ticket:
          type: object
          properties:
            ticket:
              type: string
            expires_in:
              type: integer
          required:
          - ticket
          - expires_in
      required:
      - socket_ticket
    NotificationReadCounts:
      type: object
      properties:
        new_count:
          type: integer
        unread_count:
          type: integer
        unread_counts:
          type: object
          additionalProperties:
            type: integer
      required:
      - new_count
      - unread_count
      - unread_counts
    NotificationSnapshot:
      type: object
      properties:
        new_count:
          type: integer
        unread_count:
          type: integer
        unread_counts:
          type: object
          additionalProperties:
            type: integer
        all_counts:
          type: object
          additionalProperties:
            type: integer
      required:
      - new_count
      - unread_count
      - unread_counts
      - all_counts
    ProposalUnseenCount:
      type: object
      properties:
        unseen_count:
          type: integer
        last_viewed_at:
          type:
          - string
          - 'null'
          format: date-time
      required:
      - unseen_count
      - last_viewed_at
    LaunchpadResponse:
      type: object
      properties:
        launchpad:
          type: object
          properties:
            counts:
              type: object
              properties:
                threads:
                  type: integer
                calendar_events:
                  type: integer
                contacts:
                  type: integer
                organizations:
                  type: integer
                files:
                  type: integer
              required:
              - threads
              - calendar_events
              - contacts
              - organizations
              - files
          required:
          - counts
      required:
      - launchpad
    DemoCreatedResponse:
      type: object
      properties:
        account_id:
          type: string
          format: uuid
        claim_token:
          type: string
        claim_token_expires_at:
          type: string
          format: date-time
        users:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
              email:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              is_owner:
                type: boolean
            required:
            - id
            - email
            - first_name
            - last_name
            - is_owner
      required:
      - account_id
      - claim_token
      - claim_token_expires_at
      - users
    SessionLookupResponse:
      type: object
      properties:
        email_address:
          type: string
        provider:
          type: string
          enum:
          - google
          - microsoft
        connect_url:
          type: string
      required:
      - email_address
      - provider
      - connect_url
    SessionCreateResponse:
      oneOf:
      - type: object
        properties:
          status:
            const: authenticated
            type: string
          session:
            type: object
            properties:
              access_token:
                "$ref": "#/components/schemas/CurrentSessionAccessToken"
              refresh_token:
                type: string
            required:
            - access_token
        required:
        - status
        - session
      - type: object
        properties:
          status:
            const: waitlisted
            type: string
          email:
            type: string
        required:
        - status
        - email
      - type: object
        properties:
          status:
            const: new_user
            type: string
          signup_token:
            type: string
          email:
            type: string
          first_name:
            type:
            - string
            - 'null'
          last_name:
            type:
            - string
            - 'null'
          provider:
            type: string
        required:
        - status
        - signup_token
        - email
        - first_name
        - last_name
        - provider
    RefreshExchangeResponse:
      type: object
      properties:
        access_token:
          "$ref": "#/components/schemas/AccessToken"
        refresh_token:
          type: string
      required:
      - access_token
    DailyBriefingShowResponse:
      type: object
      properties:
        daily_briefing:
          anyOf:
          - "$ref": "#/components/schemas/DailyBriefing"
          - type: 'null'
      required:
      - daily_briefing
    WaitlisteeCreateResponse:
      type: object
      properties:
        waitlistee:
          type: object
          properties:
            email_address:
              type: string
          required:
          - email_address
      required:
      - waitlistee
    WaitlisteeShowResponse:
      type: object
      properties:
        waitlistee:
          type: object
          properties:
            email_address:
              type: string
            invitation_code:
              type: string
          required:
          - email_address
          - invitation_code
      required:
      - waitlistee
    SnoozeResponse:
      type: object
      properties:
        thread:
          type: object
          properties:
            snooze_until:
              type: string
              format: date-time
          required:
          - snooze_until
      required:
      - thread
    InboxResponse:
      type: object
      properties:
        inbox:
          type: object
          properties:
            unread:
              type: array
              items:
                "$ref": "#/components/schemas/InboxThread"
            flagged:
              type: array
              items:
                "$ref": "#/components/schemas/InboxThread"
            other:
              type: array
              items:
                "$ref": "#/components/schemas/InboxThread"
          required:
          - unread
          - flagged
          - other
      required:
      - inbox
    DashboardResponse:
      type: object
      properties:
        dashboard:
          type: object
          properties:
            agenda:
              type: object
              properties:
                overdue:
                  type: object
                  properties:
                    tasks:
                      type: array
                      items:
                        "$ref": "#/components/schemas/Task"
                  required:
                  - tasks
                today:
                  type: object
                  properties:
                    tasks:
                      type: array
                      items:
                        "$ref": "#/components/schemas/Task"
                  required:
                  - tasks
                tomorrow:
                  type: object
                  properties:
                    tasks:
                      type: array
                      items:
                        "$ref": "#/components/schemas/Task"
                  required:
                  - tasks
                later:
                  type: object
                  properties:
                    tasks:
                      type: array
                      items:
                        "$ref": "#/components/schemas/Task"
                  required:
                  - tasks
              required:
              - overdue
              - today
              - tomorrow
              - later
          required:
          - agenda
      required:
      - dashboard
    PipelineUpdateResponse:
      type: object
      properties:
        pipeline:
          "$ref": "#/components/schemas/Pipeline"
        stage_removals:
          type: array
          items:
            type: object
            properties:
              stage_id:
                type: string
                format: uuid
              replacement_stage_id:
                type:
                - string
                - 'null'
                format: uuid
              moved_deal_count:
                type: integer
            required:
            - stage_id
            - replacement_stage_id
            - moved_deal_count
      required:
      - pipeline
      - stage_removals
    ConversationMessageAcceptedResponse:
      type: object
      properties:
        message:
          "$ref": "#/components/schemas/ConversationMessage"
        assistant_message_id:
          type: string
          format: uuid
      required:
      - message
      - assistant_message_id
    ConversationShowResponse:
      type: object
      properties:
        conversation:
          allOf:
          - "$ref": "#/components/schemas/Conversation"
          - type: object
            properties:
              messages:
                type: array
                items:
                  "$ref": "#/components/schemas/ConversationMessage"
            required:
            - messages
      required:
      - conversation
    ShareRequestListResponse:
      type: object
      properties:
        share_requests:
          type: array
          items:
            "$ref": "#/components/schemas/ShareRequest"
      required:
      - share_requests
    ShareRequestRecipientListResponse:
      type: object
      properties:
        share_requests:
          type: array
          items:
            "$ref": "#/components/schemas/ShareRequestRecipient"
      required:
      - share_requests
    ShareRequestIndexResponse:
      anyOf:
      - "$ref": "#/components/schemas/ShareRequestListResponse"
      - "$ref": "#/components/schemas/ShareRequestRecipientListResponse"
    AccessTokensCreateRequest:
      type: object
      properties:
        refresh_token:
          type:
          - string
          - 'null'
    APIKeyListResponse:
      type: object
      properties:
        api_keys:
          type: array
          items:
            "$ref": "#/components/schemas/APIKey"
      required:
      - api_keys
    ApiKeysCreateRequest:
      type: object
      properties:
        api_key:
          type: object
          properties:
            name:
              type: string
              maxLength: 100
              minLength: 1
            tier:
              type: string
              enum:
              - read
              - read_write
              minLength: 1
            expires_at:
              type:
              - string
              - 'null'
          required:
          - name
          - tier
      required:
      - api_key
    APIKeyWithSecretResponse:
      type: object
      properties:
        api_key:
          "$ref": "#/components/schemas/APIKeyWithSecret"
      required:
      - api_key
    AgentConfigurationsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/AgentConfiguration"
            required:
            - records
      required:
      - collection
    AgentConfigurationsUpdateRequest:
      type: object
      properties:
        agent_configuration:
          type: object
          properties:
            enabled:
              type: boolean
            config:
              type: object
              minProperties: 1
              description: Sets the named settings and keeps the rest. Keys and
                values must be ones the agent declares (its `settings[].key` and
                `allowed_values`); anything else is a 400 `invalid_request` and
                nothing is stored.
              additionalProperties:
                type:
                - string
                - boolean
      required:
      - agent_configuration
    AgentConfigurationResponse:
      type: object
      properties:
        agent_configuration:
          "$ref": "#/components/schemas/AgentConfiguration"
      required:
      - agent_configuration
    AccountBillingResponse:
      type: object
      properties:
        account:
          "$ref": "#/components/schemas/AccountBilling"
      required:
      - account
    AccountsCreateRequest:
      type: object
      properties:
        account:
          type: object
          properties:
            signup_token:
              type: string
              minLength: 1
            organization:
              type: string
              maxLength: 200
              minLength: 1
            billing_token:
              type: string
              minLength: 1
            time_zone:
              type:
              - string
              - 'null'
            invitation_code:
              type:
              - string
              - 'null'
            first_name:
              type: string
              maxLength: 200
              minLength: 1
              description: Overrides the identity provider's first name.
            last_name:
              type: string
              maxLength: 200
              minLength: 1
              description: Overrides the identity provider's last name.
            assent:
              type: object
              properties:
                documents:
                  type: array
                  maxItems: 100
                  items:
                    anyOf:
                    - type: string
                    - type: object
                      properties:
                        type:
                          type: string
                      required:
                      - type
                  minItems: 1
                  description: Must cover the current documents required for this
                    acceptance method.
                arbitration_notice_displayed:
                  type:
                  - boolean
                  - 'null'
              required:
              - documents
          required:
          - signup_token
          - organization
          - billing_token
          - assent
      required:
      - account
    AccountWithOwnerSessionResponse:
      type: object
      properties:
        account:
          "$ref": "#/components/schemas/AccountWithOwnerSession"
      required:
      - account
    AccountsUpdateRequest:
      type: object
      properties:
        account:
          type: object
          properties:
            organization:
              type: string
              maxLength: 200
              minLength: 1
            ai_agents_enabled:
              type: boolean
            api_access:
              type: string
              enum:
              - 'off'
              - read
              - read_write
            outbound_email_enabled:
              type: boolean
            ask_carom_enabled:
              type: boolean
      required:
      - account
    AccountResponse:
      type: object
      properties:
        account:
          "$ref": "#/components/schemas/Account"
      required:
      - account
    AccountsDestroyRequest:
      type: object
      properties:
        account:
          type: object
          properties:
            close_immediately:
              type: boolean
      required:
      - account
    AccountsCreditCardsUpdateRequest:
      type: object
      properties:
        payment_method_id:
          type: string
          minLength: 1
      required:
      - payment_method_id
    CalendarsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Calendar"
            required:
            - records
      required:
      - collection
    CalendarsUpdateRequest:
      type: object
      properties:
        calendar:
          type: object
          properties:
            sync_enabled:
              type:
              - boolean
              - 'null'
      required:
      - calendar
    CalendarResponse:
      type: object
      properties:
        calendar:
          "$ref": "#/components/schemas/Calendar"
      required:
      - calendar
    UsersCalendarSubscriptionsCreateRequest:
      type: object
      properties:
        calendar_subscription:
          type: object
          properties:
            calendar_id:
              type: string
              minLength: 1
              format: uuid
          required:
          - calendar_id
      required:
      - calendar_subscription
    CalendarSubscriptionResponse:
      type: object
      properties:
        calendar_subscription:
          "$ref": "#/components/schemas/CalendarSubscription"
      required:
      - calendar_subscription
    UsersCalendarSubscriptionsUpdateRequest:
      type: object
      properties:
        calendar_subscription:
          type: object
          properties:
            color:
              type:
              - string
              - 'null'
              maxLength: 200
      required:
      - calendar_subscription
    CommentListResponse:
      type: object
      properties:
        comments:
          type: array
          items:
            "$ref": "#/components/schemas/Comment"
      required:
      - comments
    RecordsCommentsCreateRequest:
      type: object
      properties:
        comment:
          type: object
          properties:
            parent_comment_id:
              type: string
              minLength: 1
              format: uuid
            html_content:
              type:
              - string
              - 'null'
              maxLength: 20000
            json_content:
              type:
              - string
              - 'null'
              maxLength: 80000
          required:
          - html_content
      required:
      - comment
    CommentResponse:
      type: object
      properties:
        comment:
          "$ref": "#/components/schemas/Comment"
      required:
      - comment
    RecordsCommentsUpdateRequest:
      type: object
      properties:
        comment:
          type: object
          properties:
            html_content:
              type: string
              maxLength: 20000
              minLength: 1
            json_content:
              type:
              - string
              - 'null'
              maxLength: 80000
          required:
          - html_content
      required:
      - comment
    ContactsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/ContactSummary"
              sort:
                type:
                - string
                - 'null'
              order:
                type:
                - string
                - 'null'
            required:
            - records
            - sort
            - order
      required:
      - collection
    RecordActivityCounts:
      type: object
      properties:
        open_tasks:
          type: integer
        upcoming_events:
          type: integer
      required:
      - open_tasks
      - upcoming_events
    CountResultResponse:
      type: object
      properties:
        count:
          "$ref": "#/components/schemas/CountResult"
      required:
      - count
    DiscussionResponse:
      type: object
      properties:
        discussion:
          "$ref": "#/components/schemas/Discussion"
      required:
      - discussion
    ExpandedContactResponse:
      type: object
      properties:
        contact:
          "$ref": "#/components/schemas/ExpandedContact"
      required:
      - contact
    ContactsUpdateRequest:
      type: object
      properties:
        contact:
          type: object
          properties:
            id:
              type: string
              minLength: 1
              format: uuid
            name:
              type: string
              maxLength: 200
              minLength: 1
            background:
              type:
              - string
              - 'null'
              maxLength: 10000
            contact_type:
              type:
              - string
              - 'null'
              enum:
              - colleague
              - connection
              - mailing_list
              - notification
              -
            avatar_upload_id:
              type:
              - string
              - 'null'
              format: uuid
            email_addresses:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  value:
                    type: string
                    maxLength: 254
                    minLength: 1
                  deleted:
                    type: boolean
            social_profiles:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  deleted:
                    type: boolean
                  network:
                    type: string
                    enum:
                    - twitter
                    - facebook
                    - github
                    - linkedin
                    - angellist
                    minLength: 1
                  handle:
                    type: string
                    maxLength: 200
                    minLength: 1
            locations:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  deleted:
                    type: boolean
                  street_number:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  street:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  apartment:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  city:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  state:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  country_code:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
            numbers:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  deleted:
                    type: boolean
                  value:
                    type: string
                    maxLength: 200
                    minLength: 1
                  kind:
                    type: string
                    maxLength: 200
                    minLength: 1
                required:
                - value
            employments:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  deleted:
                    type: boolean
                  title:
                    type:
                    - string
                    - 'null'
                    maxLength: 200
                  organization:
                    type:
                    - object
                    - 'null'
                    description: Send `id` to link an existing organization in the
                      account; any other fields sent with an `id` are ignored (edit
                      the organization through PATCH /organizations/{id}). Without
                      an `id`, `name` is required and a new organization is created.
                      An `id` outside the account returns 400 `invalid_request` with
                      a field error on `employments.<index>.organization.id`.
                    properties:
                      id:
                        type: string
                        minLength: 1
                        format: uuid
                      name:
                        type: string
                        maxLength: 200
                        minLength: 1
            websites:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  deleted:
                    type: boolean
                  url:
                    type: string
                    maxLength: 2048
                    minLength: 1
                required:
                - url
      required:
      - contact
    ContactResponse:
      type: object
      properties:
        contact:
          "$ref": "#/components/schemas/Contact"
      required:
      - contact
    ContactsGlobalRequest:
      type: object
      properties:
        global:
          type: boolean
      required:
      - global
    DuplicatesIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/DuplicateCandidate"
            required:
            - records
      required:
      - collection
    ContactsMergeRequest:
      type: object
      properties:
        contact_ids:
          type: array
          maxItems: 10
          items:
            type: string
            format: uuid
          description: Source contacts to absorb into the path contact. Must not include
            the path contact itself (409 `target_in_sources`).
      required:
      - contact_ids
    DailyBriefingResponse:
      type: object
      properties:
        daily_briefing:
          "$ref": "#/components/schemas/DailyBriefing"
      required:
      - daily_briefing
    CalendarEventsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/CalendarEvent"
            required:
            - records
      required:
      - collection
    CalendarEventResponse:
      type: object
      properties:
        calendar_event:
          "$ref": "#/components/schemas/CalendarEvent"
      required:
      - calendar_event
    MeetingTranscriptResponse:
      type: object
      properties:
        meeting_transcript:
          "$ref": "#/components/schemas/MeetingTranscript"
      required:
      - meeting_transcript
    BriefListResponse:
      type: object
      properties:
        briefs:
          type: array
          items:
            "$ref": "#/components/schemas/Brief"
      required:
      - briefs
    CalendarEventsBriefsCreateRequest:
      type: object
      properties:
        shared:
          type: boolean
    BriefResponse:
      type: object
      properties:
        brief:
          "$ref": "#/components/schemas/Brief"
      required:
      - brief
    FilesIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/FileSummary"
              sort:
                type:
                - string
                - 'null'
              order:
                type:
                - string
                - 'null'
            required:
            - records
            - sort
            - order
      required:
      - collection
    FileResponse:
      type: object
      properties:
        file:
          "$ref": "#/components/schemas/File"
      required:
      - file
    FilesUpdateRequest:
      type: object
      properties:
        file:
          type: object
          properties:
            name:
              type:
              - string
              - 'null'
              maxLength: 200
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
      required:
      - file
    GroupsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Group"
            required:
            - records
      required:
      - collection
    GroupsCreateRequest:
      type: object
      properties:
        group:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 500
              items:
                type: string
                format: uuid
          required:
          - name
      required:
      - group
    GroupsUpdateRequest:
      type: object
      description: Partial update; an omitted field is left unchanged. `user_ids`,
        when sent as an array, replaces the membership; omitted or null leaves it
        unchanged.
      properties:
        group:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 500
              items:
                type: string
                format: uuid
      required:
      - group
    GroupResponse:
      type: object
      properties:
        group:
          "$ref": "#/components/schemas/Group"
      required:
      - group
    MailboxesIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Mailbox"
            required:
            - records
      required:
      - collection
    MailboxWithAdminDataResponse:
      type: object
      properties:
        mailbox:
          "$ref": "#/components/schemas/MailboxWithAdminData"
      required:
      - mailbox
    MailboxesCreateRequest:
      type: object
      properties:
        mailbox:
          type: object
          properties:
            email_address:
              type: string
              maxLength: 254
            name:
              type: string
              maxLength: 200
            subscription_color:
              type: string
              maxLength: 200
            subscribe_creator:
              type: boolean
            contact_policy:
              enum:
              - all
              - business
              - existing_orgs
              - none
              type: string
              minLength: 1
            interaction_sharing:
              enum:
              - none
              - knowledge
              type: string
              minLength: 1
            configuration:
              type: object
              properties:
                oauth_code:
                  type: string
                imap:
                  type: object
                  properties:
                    server:
                      type: string
                    username:
                      type: string
                    port:
                      type: integer
                    use_ssl:
                      type: boolean
          required:
          - email_address
      required:
      - mailbox
    MailboxResponse:
      type: object
      properties:
        mailbox:
          "$ref": "#/components/schemas/Mailbox"
      required:
      - mailbox
    MailboxesUnlockRequest:
      type: object
      properties:
        globalize_contacts:
          type:
          - boolean
          - 'null'
    MailboxesConnectRequest:
      type: object
      properties:
        mailbox:
          type: object
          properties:
            oauth_code:
              type: string
              minLength: 1
            oauth_state:
              type: string
              description: The `state` the provider echoed back, exactly as minted
                in `connect_url` by `GET /mailboxes/{id}`. Missing, unknown, expired,
                reused, or minted for another user, account or mailbox returns
                `422 invalid_oauth_state`.
          required:
          - oauth_code
          - oauth_state
      required:
      - mailbox
    MailboxesUpdateRequest:
      type: object
      properties:
        mailbox:
          type: object
          properties:
            view_policy:
              type: string
              minLength: 1
              enum:
              - none
              - everyone
              - selected
            send_policy:
              type: string
              minLength: 1
              enum:
              - none
              - everyone
              - selected
            contact_policy:
              type: string
              minLength: 1
              enum:
              - all
              - business
              - existing_orgs
              - none
            interaction_sharing:
              type: string
              minLength: 1
              enum:
              - none
              - knowledge
            label_sync:
              type: boolean
            contacts_sync:
              type: boolean
          minProperties: 1
      required:
      - mailbox
    MailboxGrantListResponse:
      type: object
      properties:
        mailbox_grants:
          type: array
          items:
            "$ref": "#/components/schemas/MailboxGrant"
      required:
      - mailbox_grants
    MailboxesGrantsCreateRequest:
      type: object
      properties:
        grant:
          type: object
          properties:
            user_id:
              type: string
              minLength: 1
              format: uuid
            group_id:
              type: string
              minLength: 1
              format: uuid
            level:
              type: string
              minLength: 1
              enum:
              - view
              - send
              default: send
          oneOf:
          - required:
            - user_id
            not:
              properties:
                group_id:
                  type: string
                  format: uuid
              required:
              - group_id
          - required:
            - group_id
            not:
              properties:
                user_id:
                  type: string
                  format: uuid
              required:
              - user_id
      required:
      - grant
    MailboxGrantResponse:
      type: object
      properties:
        mailbox_grant:
          "$ref": "#/components/schemas/MailboxGrant"
      required:
      - mailbox_grant
    DraftListResponse:
      type: object
      properties:
        drafts:
          type: array
          items:
            "$ref": "#/components/schemas/Draft"
      required:
      - drafts
    DraftResponse:
      type: object
      properties:
        draft:
          "$ref": "#/components/schemas/Draft"
      required:
      - draft
    DraftsCreateRequest:
      type: object
      properties:
        draft:
          type: object
          properties:
            draft_type:
              type: string
              enum:
              - compose
              - reply
              minLength: 1
            mailbox_id:
              type: string
              minLength: 1
              format: uuid
            thread_id:
              type: string
              minLength: 1
              format: uuid
            to_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            cc_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            bcc_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            subject:
              type:
              - string
              - 'null'
              maxLength: 998
            body:
              type:
              - string
              - 'null'
              maxLength: 200000
            body_html:
              type:
              - string
              - 'null'
              maxLength: 200000
            content_state:
              type:
              - string
              - 'null'
              maxLength: 200000
          required:
          - mailbox_id
      required:
      - draft
    DraftsUpdateRequest:
      type: object
      properties:
        draft:
          type: object
          properties:
            mailbox_id:
              type: string
              minLength: 1
              description: Changes the sending mailbox. It must be visible to you
                (404 otherwise) and pass the same send-permission check as sending.
            to_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            cc_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            bcc_email_addresses:
              type: array
              maxItems: 100
              items:
                type: string
                maxLength: 254
            subject:
              type:
              - string
              - 'null'
              maxLength: 998
            body:
              type:
              - string
              - 'null'
              maxLength: 200000
            body_html:
              type:
              - string
              - 'null'
              maxLength: 200000
            content_state:
              type:
              - string
              - 'null'
              maxLength: 200000
      required:
      - draft
    UsersMailboxSubscriptionsCreateRequest:
      type: object
      properties:
        mailbox_subscription:
          type: object
          properties:
            mailbox_id:
              type: string
              minLength: 1
              format: uuid
          required:
          - mailbox_id
      required:
      - mailbox_subscription
    MailboxSubscriptionResponse:
      type: object
      properties:
        mailbox_subscription:
          "$ref": "#/components/schemas/MailboxSubscription"
      required:
      - mailbox_subscription
    UsersMailboxSubscriptionsUpdateRequest:
      type: object
      properties:
        mailbox_subscription:
          type: object
          properties:
            color:
              type:
              - string
              - 'null'
              maxLength: 200
      required:
      - mailbox_subscription
    MilestonesIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Milestone"
            required:
            - records
      required:
      - collection
    MilestoneResponse:
      type: object
      properties:
        milestone:
          "$ref": "#/components/schemas/Milestone"
      required:
      - milestone
    MilestonesCreateRequest:
      type: object
      properties:
        milestone:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            due:
              type:
              - string
              - 'null'
              format: date
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            pinned:
              type:
              - boolean
              - 'null'
            visibility:
              type: string
              enum:
              - private
              - public
              - shared
              minLength: 1
            archived:
              type:
              - boolean
              - 'null'
            collaborator_user_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
          required:
          - name
      required:
      - milestone
    MilestonesUpdateRequest:
      type: object
      description: Partial update; an omitted field is left unchanged. `pinned` toggles
        the caller's pin.
      properties:
        milestone:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            due:
              type:
              - string
              - 'null'
              format: date
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            pinned:
              type:
              - boolean
              - 'null'
            visibility:
              type: string
              enum:
              - private
              - public
              - shared
              minLength: 1
            archived:
              type:
              - boolean
              - 'null'
            collaborator_user_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
      required:
      - milestone
    NotificationsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Notification"
            required:
            - records
      required:
      - collection
    NotificationResponse:
      type: object
      properties:
        notification:
          "$ref": "#/components/schemas/Notification"
      required:
      - notification
    NotificationsDismissRequest:
      type: object
      properties:
        global:
          type:
          - boolean
          - 'null'
        slice:
          type:
          - string
          - 'null'
        ids:
          type:
          - array
          - 'null'
          items:
            type: string
            format: uuid
    DeviceTokensCreateRequest:
      type: object
      properties:
        device_token:
          type: object
          properties:
            device_id:
              type: string
              maxLength: 200
              minLength: 1
            token:
              type: string
              maxLength: 200
              minLength: 1
            environment:
              type: string
              enum:
              - sandbox
              - production
              minLength: 1
            platform:
              type: string
              enum:
              - ios
              minLength: 1
            device_name:
              type:
              - string
              - 'null'
              maxLength: 200
          required:
          - device_id
          - token
          - environment
      required:
      - device_token
    DeviceTokenResponse:
      type: object
      properties:
        device_token:
          "$ref": "#/components/schemas/DeviceToken"
      required:
      - device_token
    DeviceTokensDestroyRequest:
      type: object
      properties:
        device_token:
          type: object
          properties:
            device_id:
              type: string
              minLength: 1
          required:
          - device_id
      required:
      - device_token
    OrganizationsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Organization"
              sort:
                type:
                - string
                - 'null'
              order:
                type:
                - string
                - 'null'
            required:
            - records
            - sort
            - order
      required:
      - collection
    ExpandedOrganizationResponse:
      type: object
      properties:
        organization:
          "$ref": "#/components/schemas/ExpandedOrganization"
      required:
      - organization
    OrganizationsCreateRequest:
      type: object
      properties:
        organization:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            domain:
              type:
              - string
              - 'null'
              maxLength: 2048
            logo_upload_id:
              type:
              - string
              - 'null'
              format: uuid
          required:
          - name
      required:
      - organization
    OrganizationsUpdateRequest:
      type: object
      description: Partial update; an omitted field is left unchanged. A null `logo_upload_id`
        clears the logo.
      properties:
        organization:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            domain:
              type:
              - string
              - 'null'
              maxLength: 2048
            logo_upload_id:
              type:
              - string
              - 'null'
              format: uuid
      required:
      - organization
    OrganizationResponse:
      type: object
      properties:
        organization:
          "$ref": "#/components/schemas/Organization"
      required:
      - organization
    RecordsCommentsReactionsCreateRequest:
      type: object
      properties:
        reaction:
          type: object
          properties:
            text:
              type: string
              maxLength: 200
              minLength: 1
          required:
          - text
      required:
      - reaction
    ReactionResponse:
      type: object
      properties:
        reaction:
          "$ref": "#/components/schemas/Reaction"
      required:
      - reaction
    SearchCreateRequest:
      type: object
      properties:
        query:
          type: string
          maxLength: 500
          minLength: 1
        limit:
          type: integer
          exclusiveMinimum: 0
          default: 10
          description: Per resource page size; capped at 50 for each resource independently.
        scope:
          type:
          - string
          - 'null'
        page:
          type:
          - integer
          - 'null'
          exclusiveMinimum: 0
        resources:
          type: array
          items:
            type: string
            enum:
            - files
            - threads
            - contacts
            - organizations
            - deals
      required:
      - query
    SearchResponse:
      type: object
      properties:
        search:
          "$ref": "#/components/schemas/Search"
      required:
      - search
    SessionsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Session"
            required:
            - records
      required:
      - collection
    SessionsCreateRequest:
      type: object
      properties:
        session:
          type: object
          properties:
            provider:
              type: string
              minLength: 1
            oauth_code:
              type: string
              minLength: 1
            oauth_state:
              type: string
              minLength: 1
            handoff_code:
              type: string
              minLength: 1
            invitation_code:
              type:
              - string
              - 'null'
            team_invitation:
              type: string
              minLength: 1
              description: The `invitation` query parameter from a team invitation
                email link. Lets an invitee's first sign-in (required for Microsoft)
                join the account that invited them.
      required:
      - session
    SessionsDemoCreateRequest:
      type: object
      properties:
        email_address:
          type: string
          maxLength: 254
          minLength: 1
      required:
      - email_address
    SessionsDemoClaimRequest:
      type: object
      properties:
        claim_token:
          type: string
          minLength: 1
        user_id:
          type: string
          minLength: 1
          format: uuid
      required:
      - claim_token
      - user_id
    CurrentSessionResponse:
      type: object
      properties:
        session:
          "$ref": "#/components/schemas/CurrentSession"
      required:
      - session
    SessionsDemoSwitchRequest:
      type: object
      properties:
        user_id:
          type: string
          minLength: 1
          format: uuid
      required:
      - user_id
    SessionsLookupRequest:
      type: object
      properties:
        session:
          type: object
          properties:
            email_address:
              type: string
              minLength: 1
            platform:
              type: string
              minLength: 1
            redirect_uri:
              type: string
              minLength: 1
          required:
          - email_address
      required:
      - session
    SessionsDestroyRequest:
      type: object
      properties:
        refresh_token:
          type:
          - string
          - 'null'
        device_id:
          type:
          - string
          - 'null'
    RecordsSharesCreateRequest:
      type: object
      properties:
        share:
          type: object
          properties:
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            group_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            scope:
              type: string
              minLength: 1
            note:
              type:
              - string
              - 'null'
              maxLength: 10000
      required:
      - share
    ShareListResponse:
      type: object
      properties:
        shares:
          type: array
          items:
            "$ref": "#/components/schemas/Share"
      required:
      - shares
    RecordsSharesUpdateRequest:
      type: object
      properties:
        share:
          type: object
          properties:
            note:
              type:
              - string
              - 'null'
              maxLength: 10000
            scope:
              type:
              - string
              - 'null'
            share_through:
              type:
              - string
              - 'null'
              format: date-time
      required:
      - share
    ShareResponse:
      type: object
      properties:
        share:
          "$ref": "#/components/schemas/Share"
      required:
      - share
    ShareRequestsCreateRequest:
      type: object
      properties:
        share_request:
          type: object
          properties:
            audience:
              type: string
              minLength: 1
              enum:
              - everyone
              - selected
            note:
              type:
              - string
              - 'null'
              maxLength: 10000
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            include_unknown:
              type:
              - boolean
              - 'null'
          required:
          - audience
      required:
      - share_request
    ShareRequestResponse:
      type: object
      properties:
        share_request:
          "$ref": "#/components/schemas/ShareRequest"
      required:
      - share_request
    ShareRequestsAmendRequest:
      type: object
      properties:
        share_request:
          type: object
          properties:
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            include_unknown:
              type:
              - boolean
              - 'null'
      required:
      - share_request
    ShareRequestsRespondRequest:
      type: object
      properties:
        response:
          type: string
          minLength: 1
          enum:
          - accept
          - dismiss
      required:
      - response
    PipelineListResponse:
      type: object
      properties:
        pipelines:
          type: array
          items:
            "$ref": "#/components/schemas/Pipeline"
      required:
      - pipelines
    PipelineReportResponse:
      type: object
      properties:
        report:
          "$ref": "#/components/schemas/PipelineReport"
      required:
      - report
    PipelineResponse:
      type: object
      properties:
        pipeline:
          "$ref": "#/components/schemas/Pipeline"
      required:
      - pipeline
    PipelinesCreateRequest:
      type: object
      properties:
        pipeline:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            position:
              type:
              - integer
              - 'null'
            public:
              type:
              - boolean
              - 'null'
            tracks_amount:
              type:
              - boolean
              - 'null'
            dealmaker_enabled:
              type:
              - boolean
              - 'null'
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            admin_user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            group_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            stages:
              type: array
              maxItems: 100
              items:
                type: object
                properties:
                  name:
                    type: string
                    maxLength: 200
                    minLength: 1
                  outcome:
                    type: string
                    enum:
                    - open
                    - won
                    - lost
                    minLength: 1
                  likelihood:
                    type:
                    - number
                    - 'null'
                    minimum: 0
                    maximum: 1
                  entry_criteria:
                    type:
                    - string
                    - 'null'
                    maxLength: 2000
                required:
                - name
                description: An open stage requires likelihood; won and lost stages
                  prohibit a non-null likelihood.
          required:
          - name
      required:
      - pipeline
    PipelinesUpdateRequest:
      type: object
      properties:
        pipeline:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            position:
              type:
              - integer
              - 'null'
            public:
              type:
              - boolean
              - 'null'
            tracks_amount:
              type:
              - boolean
              - 'null'
            dealmaker_enabled:
              type:
              - boolean
              - 'null'
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            admin_user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            group_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            stages:
              type: array
              maxItems: 100
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    format: uuid
                  name:
                    type: string
                    maxLength: 200
                    minLength: 1
                  outcome:
                    type: string
                    enum:
                    - open
                    - won
                    - lost
                    minLength: 1
                  likelihood:
                    type:
                    - number
                    - 'null'
                    minimum: 0
                    maximum: 1
                  entry_criteria:
                    type:
                    - string
                    - 'null'
                    maxLength: 2000
                  removal:
                    type: object
                    properties:
                      replacement_stage_id:
                        type:
                        - string
                        - 'null'
                        format: uuid
              description: When supplied, include every active persisted stage exactly
                once. Survivors need a name. Removal entries require an id and cannot
                contain editable stage fields. At least one stage must survive.
      required:
      - pipeline
    DealsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Deal"
            required:
            - records
      required:
      - collection
    DealSummaryResponse:
      type: object
      properties:
        summary:
          "$ref": "#/components/schemas/DealSummary"
      required:
      - summary
    DealReportResponse:
      type: object
      properties:
        report:
          "$ref": "#/components/schemas/DealReport"
      required:
      - report
    DealResponse:
      type: object
      properties:
        deal:
          "$ref": "#/components/schemas/Deal"
      required:
      - deal
    DealsCreateRequest:
      type: object
      properties:
        deal:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            pipeline_id:
              type: string
              minLength: 1
              format: uuid
            pipeline_stage_id:
              type:
              - string
              - 'null'
              format: uuid
            amount:
              type:
              - number
              - 'null'
              minimum: 0
              exclusiveMaximum: 10000000000000
            currency:
              type:
              - string
              - 'null'
              description: ISO 4217 currency code, e.g. USD. Null or omitted means USD.
            expected_close_date:
              type:
              - string
              - 'null'
              format: date
            owner_user_id:
              type:
              - string
              - 'null'
              format: uuid
            contact_id:
              type:
              - string
              - 'null'
              format: uuid
            organization_id:
              type:
              - string
              - 'null'
              format: uuid
          required:
          - name
          - pipeline_id
          description: Exactly one non-null contact_id or organization_id is required.
          anyOf:
          - required:
            - contact_id
            properties:
              contact_id:
                type: string
                format: uuid
              organization_id:
                type: 'null'
          - required:
            - organization_id
            properties:
              organization_id:
                type: string
                format: uuid
              contact_id:
                type: 'null'
      required:
      - deal
    DealsUpdateRequest:
      type: object
      properties:
        deal:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            pipeline_stage_id:
              type: string
              minLength: 1
              format: uuid
            amount:
              type:
              - number
              - 'null'
              minimum: 0
              exclusiveMaximum: 10000000000000
            currency:
              type: string
              minLength: 1
              description: ISO 4217 currency code, e.g. USD.
            expected_close_date:
              type:
              - string
              - 'null'
              format: date
            lost_reason:
              type:
              - string
              - 'null'
              maxLength: 10000
            owner_user_id:
              type:
              - string
              - 'null'
              format: uuid
            contact_id:
              type:
              - string
              - 'null'
              format: uuid
            organization_id:
              type:
              - string
              - 'null'
              format: uuid
      required:
      - deal
    ProposalsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Proposal"
            required:
            - records
      required:
      - collection
    ProposalResponse:
      type: object
      properties:
        proposal:
          "$ref": "#/components/schemas/Proposal"
      required:
      - proposal
    ProposalsAcceptRequest:
      type: object
      properties:
        display:
          type:
          - object
          - 'null'
          additionalProperties: true
        payload:
          type:
          - object
          - 'null'
          additionalProperties: true
    ProposalsRejectRequest:
      type: object
      properties:
        reason:
          type:
          - string
          - 'null'
          maxLength: 10000
    ConversationsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Conversation"
            required:
            - records
      required:
      - collection
    ConversationsCreateRequest:
      type: object
      properties:
        context_type:
          type:
          - string
          - 'null'
          enum:
          - contact
          - organization
          - thread
          - deal
          -
          description: Send with `context_id`. Any other value is a 400 `invalid_request`.
        context_id:
          type:
          - string
          - 'null'
          format: uuid
    ConversationResponse:
      type: object
      properties:
        conversation:
          "$ref": "#/components/schemas/Conversation"
      required:
      - conversation
    ConversationMessageListResponse:
      type: object
      properties:
        messages:
          type: array
          items:
            "$ref": "#/components/schemas/ConversationMessage"
      required:
      - messages
    ConversationsMessagesCreateRequest:
      type: object
      properties:
        content:
          type: string
          maxLength: 4000
          minLength: 1
      required:
      - content
    ConversationsMessagesFeedbackCreateRequest:
      type: object
      properties:
        rating:
          type: string
          enum:
          - up
          - down
          minLength: 1
        reason:
          type:
          - string
          - 'null'
          maxLength: 1000
      required:
      - rating
    ConversationMessageResponse:
      type: object
      properties:
        message:
          "$ref": "#/components/schemas/ConversationMessage"
      required:
      - message
    SpacesIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Space"
            required:
            - records
      required:
      - collection
    SpaceResponse:
      type: object
      properties:
        space:
          "$ref": "#/components/schemas/Space"
      required:
      - space
    SpacesCreateRequest:
      type: object
      properties:
        space:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            tag_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            contact_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            organization_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            admin_user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            group_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            include_tagged_resource_children:
              type: boolean
          required:
          - name
          - tag_ids
          - contact_ids
          - organization_ids
          - user_ids
          - group_ids
          - include_tagged_resource_children
      required:
      - space
    SpacesUpdateRequest:
      type: object
      description: Partial update; an omitted field is left unchanged. A list sent
        as null is cleared, and a null description clears it; `name` and `include_tagged_resource_children`
        reject null. `admin_user_ids` sent without `user_ids` applies to the current
        members.
      properties:
        space:
          type: object
          properties:
            name:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            tag_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            contact_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            organization_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            admin_user_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            group_ids:
              type:
              - array
              - 'null'
              maxItems: 100
              items:
                type: string
                format: uuid
            include_tagged_resource_children:
              type: boolean
      required:
      - space
    ThreadsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/ThreadWithContact"
            required:
            - records
      required:
      - collection
    ThreadWithContactResponse:
      type: object
      properties:
        thread:
          "$ref": "#/components/schemas/ThreadWithContact"
      required:
      - thread
    ThreadsSnoozeCreateRequest:
      type: object
      properties:
        snooze_until:
          anyOf:
          - type: string
            format: date-time
          - type: string
            enum:
            - soon
            - tonight
            - morning
            - weekend
            - week
            - month
      required:
      - snooze_until
    RecordsTaggingsCreateRequest:
      type: object
      properties:
        tag_id:
          type: string
          minLength: 1
          format: uuid
        tag:
          type: object
          properties:
            name:
              type: string
              maxLength: 64
              minLength: 1
            color:
              type: string
              maxLength: 200
              minLength: 1
          required:
          - name
      oneOf:
      - required:
        - tag_id
        not:
          properties:
            tag: {}
          required:
          - tag
      - required:
        - tag
        not:
          properties:
            tag_id:
              type: string
              format: uuid
          required:
          - tag_id
    TaggingResponse:
      type: object
      properties:
        tagging:
          "$ref": "#/components/schemas/Tagging"
      required:
      - tagging
    TagsIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Tag"
            required:
            - records
      required:
      - collection
    TagResponse:
      type: object
      properties:
        tag:
          "$ref": "#/components/schemas/Tag"
      required:
      - tag
    TagsCreateRequest:
      type: object
      properties:
        tag:
          type: object
          properties:
            name:
              type: string
              maxLength: 64
              minLength: 1
            color:
              type:
              - string
              - 'null'
              maxLength: 200
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            applicable_to_contacts:
              type:
              - boolean
              - 'null'
            applicable_to_interactions:
              type:
              - boolean
              - 'null'
          required:
          - name
      required:
      - tag
    TagsUpdateRequest:
      type: object
      description: Partial update; an omitted field is left unchanged. The path names
        the tag.
      properties:
        tag:
          type: object
          properties:
            name:
              type: string
              maxLength: 64
              minLength: 1
            color:
              type:
              - string
              - 'null'
              maxLength: 200
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            applicable_to_contacts:
              type:
              - boolean
              - 'null'
            applicable_to_interactions:
              type:
              - boolean
              - 'null'
      required:
      - tag
    TagsDestroyRequest:
      type: object
      properties:
        replacement_tag_id:
          type:
          - string
          - 'null'
          format: uuid
    TermsAssentsCreateRequest:
      type: object
      properties:
        assent:
          type: object
          properties:
            documents:
              type: array
              maxItems: 100
              items:
                anyOf:
                - type: string
                - type: object
                  properties:
                    type:
                      type: string
                  required:
                  - type
              minItems: 1
              description: Must cover the current documents required for this acceptance
                method.
            arbitration_notice_displayed:
              type:
              - boolean
              - 'null'
          required:
          - documents
      required:
      - assent
    TermsAssentListResponse:
      type: object
      properties:
        terms_assents:
          type: array
          items:
            "$ref": "#/components/schemas/TermsAssent"
      required:
      - terms_assents
    TasksIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/CursorCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/Task"
            required:
            - records
      required:
      - collection
    TasksCreateRequest:
      type: object
      properties:
        task:
          type: object
          properties:
            assignment:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            assigned_user_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
            assigned_group_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
            contact_id:
              type:
              - string
              - 'null'
              format: uuid
            file_id:
              type:
              - string
              - 'null'
              format: uuid
            thread_id:
              type:
              - string
              - 'null'
              format: uuid
            organization_id:
              type:
              - string
              - 'null'
              format: uuid
            space_id:
              type:
              - string
              - 'null'
              format: uuid
            calendar_event_id:
              type:
              - string
              - 'null'
              format: uuid
            deal_id:
              type:
              - string
              - 'null'
              format: uuid
            completed_at:
              type:
              - string
              - 'null'
              format: date-time
            incomplete:
              type:
              - boolean
              - 'null'
            due_shortcut:
              type: string
              enum:
              - today
              - tomorrow
              - this_week
              - next_week
              - date
              description: today, tomorrow, this_week or next_week sets due from the
                user's local date and overrides due; date leaves due as sent.
            due:
              type:
              - string
              - 'null'
              format: date
            milestone_id:
              type:
              - string
              - 'null'
              format: uuid
            milestone:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  format: uuid
      required:
      - task
    TaskResponse:
      type: object
      properties:
        task:
          "$ref": "#/components/schemas/Task"
      required:
      - task
    UploadsCreateRequest:
      type: object
      properties:
        kind:
          type: string
          enum:
          - avatar
          - logo
          minLength: 1
        file:
          type: string
          format: binary
          description: Image bytes, at most 10 MB; JPEG, PNG, WebP, GIF or HEIC. Decoded
            dimensions must not exceed 8000 by 8000.
      required:
      - kind
      - file
    UploadResponse:
      type: object
      properties:
        upload:
          "$ref": "#/components/schemas/Upload"
      required:
      - upload
    UsersIndexResponse:
      type: object
      properties:
        collection:
          allOf:
          - "$ref": "#/components/schemas/OffsetCollection"
          - type: object
            properties:
              records:
                type: array
                items:
                  "$ref": "#/components/schemas/User"
            required:
            - records
      required:
      - collection
    CurrentUserResponse:
      type: object
      properties:
        user:
          "$ref": "#/components/schemas/CurrentUser"
      required:
      - user
    AssistantMemoryListResponse:
      type: object
      properties:
        assistant_memories:
          type: array
          items:
            "$ref": "#/components/schemas/AssistantMemory"
      required:
      - assistant_memories
    AssistantSettingsResponse:
      type: object
      properties:
        assistant_settings:
          "$ref": "#/components/schemas/AssistantSettings"
      required:
      - assistant_settings
    AssistantSettings:
      type: object
      description: The caller's own Ask Carom settings, resolved against the app's
        caps. Render each capability's allowed_levels rather than assuming them.
      properties:
        available:
          type: boolean
          description: Whether the account offers Ask Carom (and the fleet kill
            switch is off). Read-only.
        enabled:
          type: boolean
          description: The caller's own on/off choice. The assistant answers only
            when available and enabled are both true.
        capabilities:
          type: array
          items:
            "$ref": "#/components/schemas/AssistantCapability"
      required:
      - available
      - enabled
      - capabilities
    AssistantCapability:
      type: object
      properties:
        action_type:
          type: string
          description: The proposal action type the assistant can ask for.
        level:
          type: string
          enum:
          - suggest
          - auto
          description: auto applies the action at once (undoable where the action
            type allows); suggest leaves a card for the user to confirm.
        default:
          type: string
          enum:
          - suggest
          - auto
        allowed_levels:
          type: array
          items:
            type: string
            enum:
            - suggest
            - auto
      required:
      - action_type
      - level
      - default
      - allowed_levels
    AssistantSettingsUpdateRequest:
      type: object
      properties:
        assistant_settings:
          type: object
          properties:
            enabled:
              type: boolean
            capability_levels:
              type: object
              minProperties: 1
              description: action_type => level. Sets the named capabilities and
                keeps the rest. A capability the assistant lacks, or a level
                outside its allowed_levels, is a 400 `invalid_request`.
              additionalProperties:
                type: string
                enum:
                - suggest
                - auto
      required:
      - assistant_settings
    UserResponse:
      type: object
      properties:
        user:
          "$ref": "#/components/schemas/User"
      required:
      - user
    UsersCreateRequest:
      type: object
      properties:
        user:
          type: object
          properties:
            first_name:
              type: string
              maxLength: 200
              minLength: 1
            last_name:
              type: string
              maxLength: 200
              minLength: 1
            email_address:
              type: string
              maxLength: 254
              minLength: 1
            is_admin:
              type: boolean
            is_owner:
              type: boolean
            can_connect_email_account:
              type: boolean
          required:
          - first_name
          - last_name
          - email_address
      required:
      - user
    UserWithConfigurationResponse:
      type: object
      properties:
        user:
          "$ref": "#/components/schemas/UserWithConfiguration"
      required:
      - user
    UsersUpdateRequest:
      type: object
      properties:
        user:
          type: object
          properties:
            first_name:
              type: string
              maxLength: 200
              minLength: 1
            last_name:
              type: string
              maxLength: 200
              minLength: 1
            background:
              type:
              - string
              - 'null'
              maxLength: 10000
            initialized:
              type: boolean
            can_connect_email_account:
              type: boolean
            is_owner:
              type: boolean
            is_admin:
              type: boolean
            avatar_color:
              type:
              - string
              - 'null'
              enum:
              - gray
              - "#3e6eb6"
              - mediumpurple
              - "#66b185"
              - gold
              - darkorange
              - tomato
              -
            avatar_upload_id:
              type:
              - string
              - 'null'
              format: uuid
            mailbox_subscriptions:
              type: array
              maxItems: 100
              items:
                type: object
                properties:
                  mailbox_id:
                    type: string
                    minLength: 1
                    format: uuid
                  color:
                    type: string
                    maxLength: 200
                    minLength: 1
            configuration:
              type: object
              properties:
                time_zone:
                  type:
                  - string
                  - 'null'
                  maxLength: 200
                priority_inbox_days:
                  type:
                  - integer
                  - 'null'
                priority_inbox_days_unit:
                  type:
                  - string
                  - 'null'
                notification_optouts:
                  type:
                  - object
                  - 'null'
                  additionalProperties: true
          required:
          - first_name
          - last_name
      required:
      - user
    WaitlisteesCreateRequest:
      type: object
      properties:
        waitlistee:
          type: object
          properties:
            email_address:
              type: string
              maxLength: 254
              minLength: 1
          required:
          - email_address
      required:
      - waitlistee
    TaskCreateRequest:
      type: object
      properties:
        task:
          type: object
          properties:
            assignment:
              type: string
              maxLength: 200
              minLength: 1
            description:
              type:
              - string
              - 'null'
              maxLength: 10000
            assigned_user_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
            assigned_group_ids:
              type: array
              maxItems: 100
              items:
                type: string
                format: uuid
            contact_id:
              type:
              - string
              - 'null'
              format: uuid
            file_id:
              type:
              - string
              - 'null'
              format: uuid
            thread_id:
              type:
              - string
              - 'null'
              format: uuid
            organization_id:
              type:
              - string
              - 'null'
              format: uuid
            space_id:
              type:
              - string
              - 'null'
              format: uuid
            calendar_event_id:
              type:
              - string
              - 'null'
              format: uuid
            deal_id:
              type:
              - string
              - 'null'
              format: uuid
            completed_at:
              type:
              - string
              - 'null'
              format: date-time
            incomplete:
              type:
              - boolean
              - 'null'
            due_shortcut:
              type: string
              enum:
              - today
              - tomorrow
              - this_week
              - next_week
              - date
              description: today, tomorrow, this_week or next_week sets due from the
                user's local date and overrides due; date leaves due as sent.
            due:
              type:
              - string
              - 'null'
              format: date
            milestone_id:
              type:
              - string
              - 'null'
              format: uuid
            milestone:
              type: object
              properties:
                id:
                  type: string
                  minLength: 1
                  format: uuid
          required:
          - assignment
      required:
      - task
    RecordReference:
      type: object
      properties:
        type:
          type: string
          description: snake_case record type, e.g. `contact`, `calendar_event`.
        id:
          type: string
          format: uuid
      required:
      - type
      - id
    CitationReference:
      type: object
      properties:
        type:
          type: string
          description: snake_case record type, e.g. `contact`, `calendar_event`.
        id:
          type: string
          format: uuid
        label:
          type:
          - string
          - 'null'
          description: The record's name for this viewer (contact/organization/deal/event/file/space name, thread subject, task assignment); null when the viewer cannot see the record.
      required:
      - type
      - id
      - label
    LabeledReference:
      type: object
      properties:
        type:
          type: string
        id:
          type: string
          format: uuid
        label:
          type:
          - string
          - 'null'
      required:
      - type
      - id
    LegacyBriefContent:
      type: object
      description: Briefs written before 2026-08-09 keep this shape until they are regenerated.
      properties:
        overview:
          type: string
        attendees:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              summary:
                type: string
              talking_points:
                type: array
                items:
                  type: string
    BriefContent:
      type: object
      properties:
        purpose:
          type: string
        sentiment:
          type: object
          properties:
            value:
              type: string
              enum:
              - positive
              - neutral
              - negative
              - mixed
              - unknown
            note:
              type: string
          required:
          - value
          - note
        outstanding:
          type: string
        history:
          type: string
        people:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              note:
                type: string
            required:
            - name
            - note
        raise:
          type: array
          items:
            type: string
      description: Current prompt output fields; stored content is unversioned JSON
        and may contain earlier prompt shapes.
    DailyBriefingSection:
      type: object
      properties:
        id:
          type: string
          format: uuid
        kind:
          type: string
          enum:
          - priority
          - reply
          - task
          - schedule
          - team_activity
          - watch
          - quiet
        headline:
          type: string
        detail:
          type: string
        refs:
          type: object
          additionalProperties:
            "$ref": "#/components/schemas/LabeledReference"
      required:
      - id
      - kind
      - headline
      - detail
      - refs
    DailyBriefingFact:
      type: object
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
          - meeting
          - task_due
        title:
          type:
          - string
          - 'null'
        detail:
          type: string
        source_refs:
          type: array
          items:
            "$ref": "#/components/schemas/LabeledReference"
      required:
      - id
      - type
      - title
      - detail
      - source_refs
    ProposalSnapshot:
      type: object
      properties:
        id:
          type: string
          format: uuid
        agent:
          type: string
        action_type:
          type: string
        status:
          type: string
        record_type:
          type:
          - string
          - 'null'
          description: snake_case record type, e.g. `deal`, `calendar_event`.
        record_id:
          type:
          - string
          - 'null'
          format: uuid
        rejection_reason:
          type:
          - string
          - 'null'
        resolution_reason:
          type:
          - string
          - 'null'
        resolved_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        applied_record_type:
          type:
          - string
          - 'null'
          description: snake_case type of the record the proposal created or changed, e.g. `task`, `tagging`.
        applied_record_id:
          type:
          - string
          - 'null'
          format: uuid
        undone_by_user_id:
          type:
          - string
          - 'null'
          format: uuid
        expires_at:
          type: string
          format: date-time
        resolved_at:
          type:
          - string
          - 'null'
          format: date-time
        undone_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        payload:
          "$ref": "#/components/schemas/ProposalPayload"
        evidence:
          type: object
          properties:
            thread_id:
              type: string
              format: uuid
            calendar_event_id:
              type: string
              format: uuid
              description: The meeting a meeting-transcript proposal came from.
            entry_id:
              type:
              - string
              - 'null'
              format: uuid
              description: The transcript entry the excerpt was quoted from.
            meeting_started_at:
              type:
              - string
              - 'null'
              format: date-time
              description: When the meeting's transcript starts, to offset `at` into
                the recording.
            excerpt:
              type: string
            justification:
              type: string
            from:
              type: string
            at:
              type: string
              format: date-time
        source:
          type: object
          properties:
            agent:
              type: string
            conversation_id:
              type:
              - string
              - 'null'
              format: uuid
            message_id:
              type:
              - string
              - 'null'
              format: uuid
          required:
          - agent
          - conversation_id
          - message_id
        display:
          type:
          - object
          - 'null'
          additionalProperties: true
      required:
      - id
      - agent
      - action_type
      - status
      - record_type
      - record_id
      - rejection_reason
      - resolution_reason
      - resolved_by_user_id
      - applied_record_type
      - applied_record_id
      - undone_by_user_id
      - expires_at
      - resolved_at
      - undone_at
      - created_at
      - payload
      - evidence
      - source
      - display
    DailyBriefingContent:
      type: object
      properties:
        headline:
          type: string
        summary:
          type: string
        sections:
          type: array
          items:
            "$ref": "#/components/schemas/DailyBriefingSection"
        stats:
          type: object
          properties:
            meetings_today:
              type: integer
            tasks_due:
              type: integer
            tasks_overdue:
              type: integer
            new_threads:
              type: integer
              description: Open threads with new activity since the previous briefing,
                among those received in the last 14 days. A true total; the narrative
                cites at most 8 of them.
            agent_actions:
              type: integer
          required:
          - meetings_today
          - tasks_due
          - tasks_overdue
          - new_threads
          - agent_actions
        fact_items:
          type: array
          items:
            "$ref": "#/components/schemas/DailyBriefingFact"
        agent_actions:
          type: array
          items:
            "$ref": "#/components/schemas/ProposalSnapshot"
      description: Current generator output. Historical unversioned JSON can retain
        earlier fields.
    MessageBlock:
      oneOf:
      - "$ref": "#/components/schemas/TextBlock"
      - "$ref": "#/components/schemas/ProposalBlock"
      - "$ref": "#/components/schemas/CardsBlock"
      - "$ref": "#/components/schemas/TableBlock"
      - "$ref": "#/components/schemas/ToolUseBlock"
      - "$ref": "#/components/schemas/ToolResultBlock"
    ProposalPayload:
      type: object
      properties:
        to_stage_id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        pipeline_id:
          type: string
          format: uuid
        pipeline_stage_id:
          type: string
          format: uuid
        owner_user_id:
          type: string
          format: uuid
        contact_id:
          type:
          - string
          - 'null'
          format: uuid
        organization_id:
          type:
          - string
          - 'null'
          format: uuid
        amount:
          type:
          - number
          - 'null'
        currency:
          type: string
        expected_close_date:
          type:
          - string
          - 'null'
          format: date
        outcome:
          type: string
          enum:
          - won
          - lost
        lost_reason:
          type:
          - string
          - 'null'
        field:
          type: string
          enum:
          - amount
          - expected_close_date
        value:
          type:
          - number
          - string
        assignment:
          type: string
        due:
          type:
          - string
          - 'null'
          format: date
        thread_id:
          type:
          - string
          - 'null'
          format: uuid
        assigned_user_ids:
          type: array
          items:
            type: string
            format: uuid
        justification:
          type: string
        tag_id:
          type: string
          format: uuid
        tag_name:
          type: string
        body:
          type: string
      description: Fields depend on action_type. deal.advance_stage requires to_stage_id;
        deal.create requires name, pipeline_id, pipeline_stage_id, owner_user_id and
        exactly one counterparty; deal.close requires outcome; deal.fill_field requires
        field/value; task.create requires assignment; tag.apply requires tag_id or
        tag_name; tag.remove requires tag_id; comment.create requires body; email.send
        uses an empty payload. Extra stored fields are retained.
    ToolUseBlock:
      type: object
      description: A tool call on an intermediate assistant step.
      properties:
        type:
          type: string
          const: tool_use
        id:
          type: string
        name:
          type: string
        input:
          type: object
      required:
      - type
      - id
      - name
      - input
    ToolResultBlock:
      type: object
      description: Output of the tool_use with the same id, on a tool message.
      properties:
        type:
          type: string
          const: tool_result
        tool_use_id:
          type: string
        content:
          type: string
        is_error:
          type: boolean
      required:
      - type
      - tool_use_id
      - content
      - is_error
    TextBlock:
      type: object
      properties:
        type:
          type: string
          const: text
        text:
          type: string
      required:
      - type
      - text
    ProposalBlock:
      type: object
      properties:
        type:
          type: string
          const: proposal
        proposal_id:
          type: string
          format: uuid
        action_type:
          type: string
        status:
          type: string
        record_type:
          type:
          - string
          - 'null'
          description: snake_case type of the record the proposal is about; null for a create.
        record_id:
          type:
          - string
          - 'null'
          format: uuid
        applied_record_type:
          type:
          - string
          - 'null'
          description: snake_case type of the record the proposal produced once applied.
        applied_record_id:
          type:
          - string
          - 'null'
          format: uuid
        tag_id:
          type:
          - string
          - 'null'
          format: uuid
          description: Present on tag.apply and tag.remove blocks; null while a proposed new
            tag does not exist yet.
        display:
          type: object
          additionalProperties: true
        actions:
          type: array
          items:
            type: string
            enum:
            - accept
            - reject
            - undo
        resolution_reason:
          type:
          - string
          - 'null'
      required:
      - type
      - proposal_id
    CardsBlock:
      type: object
      properties:
        type:
          type: string
          const: cards
        card_type:
          type: string
          enum:
          - contact
          - organization
          - thread
          - deal
          - task
        title:
          type:
          - string
          - 'null'
        ids:
          type: array
          items:
            type: string
            format: uuid
      required:
      - type
      - card_type
      - title
      - ids
    TableBlock:
      type: object
      properties:
        type:
          type: string
          const: table
        title:
          type:
          - string
          - 'null'
        columns:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              label:
                type: string
              kind:
                type: string
                enum:
                - money
                - date
                - number
                - text
                description: Absent when the model gave no kind. money and number cells are numbers (or an unparseable string the model wrote); date cells are strings.
            required:
            - key
            - label
        rows:
          type: array
          items:
            type: object
            properties:
              cells:
                type: object
                additionalProperties:
                  type:
                  - string
                  - number
                  - 'null'
                description: Empty cells are null, never a placeholder such as "—".
              ref:
                "$ref": "#/components/schemas/RecordReference"
            required:
            - cells
      required:
      - type
      - title
      - columns
      - rows
  responses:
    Error400:
      description: Invalid request
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error401:
      description: Authentication required or rejected
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error403:
      description: Permission, credential tier, or account policy denied
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error404:
      description: Not found or not visible
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error429:
      description: Rate limited
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
      headers:
        Retry-After:
          description: Delay in seconds when supplied by the action.
          schema:
            type: integer
    Error500:
      description: Internal error
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error502:
      description: Upstream failure
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error503:
      description: Temporarily unavailable
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error402:
      description: Request failed
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error409:
      description: Conflict
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error422:
      description: Invalid resource state
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error413:
      description: Request failed
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error406:
      description: 'Not acceptable: the Accept header excludes application/json'
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
    Error415:
      description: 'Unsupported media type: the request Content-Type is not application/json'
      content:
        application/json:
          schema:
            "$ref": "#/components/schemas/Error"
x-error-code-registry:
  account_closed:
    status: 403
  account_creation_failed:
    status: 500
  already_responded:
    status: 409
  api_access_disabled:
    status: 403
  api_access_read_only:
    status: 403
  api_key_insufficient:
    status: 403
  assistant_memory_limit_reached:
    status: 409
  authorization_not_persisted:
    status: 500
  billable_add_disabled:
    status: 422
  billing_locked:
    status: 409
  billing_unavailable:
    status: 502
  cannot_unglobalize:
    status: 400
  canonical_cleanup_failed:
    status: 500
  capability_not_granted:
    status: 422
  card_declined:
    status: 402
  cleanup_failed:
    status: 500
  comment_creation_failed:
    status: 500
  conflict:
    status: 409
  contact_creation_failed:
    status: 500
  contact_has_deals:
    status: 409
  contact_save_failed:
    status: 500
  contacts_not_editable:
    status: 403
  conversation_archived:
    status: 409
  could_not_create_stripe_account:
    status: 502
  could_not_delete:
    status: 500
  could_not_mark_as_closed:
    status: 500
  could_not_relinquish_access:
    status: 500
  could_not_revoke_access_token:
    status: 500
  could_not_revoke_refresh_token:
    status: 500
  could_not_save_access_token:
    status: 500
  could_not_save_refresh_token:
    status: 500
  customer_update_failed:
    status: 502
  deletion_ledger_failed:
    status: 500
  documents_required:
    status: 400
  duplicate_association_record:
    status: 400
  duplicate_refresh_attempted:
    status: 401
  duplicate_share_request:
    status: 409
  email_address_in_use:
    status: 409
  enqueue_failed:
    status: 502
  error:
    status: 500
  expired_refresh_token:
    status: 401
  feature_disabled:
    status: 403
  forbidden:
    status: 403
  globalize_contacts_failed:
    status: 500
  idempotency_key_in_use:
    status: 409
  identity_already_linked:
    status: 409
  image_decode_failed:
    status: 422
  image_dimensions_too_large:
    status: 422
  import_already_running:
    status: 422
  incomplete_acceptance:
    status: 400
  ineligible_recipients:
    status: 400
  invalid:
    status: 400
  invalid_acceptance_method:
    status: 400
  invalid_action:
    status: 400
  invalid_context:
    status: 422
  invalid_credentials:
    status: 401
  invalid_cursor:
    status: 400
  invalid_draft_type:
    status: 400
  invalid_email_address:
    status: 400
  invalid_format:
    status: 400
  invalid_grants:
    status: 400
  invalid_handoff_code:
    status: 401
  invalid_interaction_input:
    status: 400
  invalid_invitation:
    status: 401
  invalid_level:
    status: 400
  invalid_message:
    status: 422
  invalid_oauth_state:
    status: 422
  invalid_policy:
    status: 400
  invalid_principal:
    status: 400
  invalid_refresh_token:
    status: 401
  invalid_request:
    status: 400
  invalid_share:
    status: 404
  invalid_share_scope:
    status: 400
  invalid_signup_token:
    status: 401
  invitation_email_mismatch:
    status: 403
  invitation_required:
    status: 403
  mailbox_already_exists:
    status: 409
  mailbox_creation_failed:
    status: 500
  mailbox_lock_failed:
    status: 500
  mailbox_not_authorized:
    status: 422
  mailbox_not_connected:
    status: 422
  mailbox_not_shared:
    status: 422
  mailbox_unlock_failed:
    status: 500
  merge_failed:
    status: 500
  method_not_allowed:
    status: 405
  missing_account_id:
    status: 400
  missing_body:
    status: 400
  missing_contact_id:
    status: 400
  missing_contacts_relation:
    status: 500
  missing_email:
    status: 400
  missing_message_body:
    status: 400
  missing_name_or_email:
    status: 400
  missing_params:
    status: 400
  missing_source_contacts:
    status: 400
  missing_thread_id:
    status: 400
  missing_user:
    status: 400
  missing_user_id:
    status: 400
  no_domain_provided:
    status: 400
  no_pages_provided:
    status: 400
  no_recipients:
    status: 400
  no_transcript:
    status: 404
  no_updates:
    status: 400
  not_a_demo_account:
    status: 422
  not_acceptable:
    status: 406
  not_allowed:
    status: 400
  not_editable_status:
    status: 409
  not_found:
    status: 404
  not_sendable_status:
    status: 409
  oauth_exchange_failed:
    status: 401
  operation_failed:
    status: 500
  organization_has_deals:
    status: 409
  outbound_disabled:
    status: 422
  owner_assignment_failed:
    status: 500
  payload_too_large:
    status: 413
  payment_method_attach_failed:
    status: 400
  permission_denied:
    status: 403
  pipeline_not_empty:
    status: 422
  principal_not_in_account:
    status: 400
  private_data_cleanup_failed:
    status: 500
  proposal_already_resolved:
    status: 409
  proposal_already_undone:
    status: 409
  proposal_expired:
    status: 409
  proposal_not_applied:
    status: 409
  proposal_not_undoable:
    status: 409
  proposal_stale:
    status: 409
  provider_lookup_unavailable:
    status: 503
  rate_limited:
    status: 429
  recipient_not_in_account:
    status: 400
  record_not_found:
    status: 404
  recovery_request_failed:
    status: 502
  rejected:
    status: 502
  required:
    status: 400
  required_permissions_missing:
    status: 422
  session_creation_failed:
    status: 500
  setup_intent_creation_failed:
    status: 502
  share_creation_failed:
    status: 500
  sole_owner_required:
    status: 409
  source_fetch_failed:
    status: 502
  source_handle_unavailable:
    status: 502
  source_too_large:
    status: 413
  storage_unavailable:
    status: 502
  stripe_account_creation_failed:
    status: 502
  subscription_cancellation_failed:
    status: 502
  subscription_failed:
    status: 500
  subscription_update_failed:
    status: 502
  tag_name_taken:
    status: 409
  taken:
    status: 400
  target_in_sources:
    status: 409
  terms_acceptance_required:
    status: 403
  token_exchange_failed:
    status: 502
  token_revoked:
    status: 401
  token_theft_detected:
    status: 403
  too_long:
    status: 400
  too_many_recipients:
    status: 400
  too_short:
    status: 400
  turn_in_progress:
    status: 409
  unable_to_save_associations:
    status: 500
  unauthorized:
    status: 401
  unknown_document:
    status: 400
  unsupported_cursor_direction:
    status: 400
  unsupported_image_type:
    status: 422
  unsupported_mailbox_provider:
    status: 422
  unsupported_media_type:
    status: 415
  unsupported_provider:
    status: 400
  unsupported_redirect_uri:
    status: 400
  upload_too_large:
    status: 413
  user_already_deactivated:
    status: 409
  user_creation_failed:
    status: 500
  user_deactivated:
    status: 403
  user_deactivation_failed:
    status: 500
  user_not_deactivated:
    status: 409
  user_purge_failed:
    status: 500
  user_reactivation_failed:
    status: 500
  work_account_required:
    status: 403
