---
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