# GENERATED FILE — do not hand-edit.
# Source of truth: src/steps/public-api/**/*.step.ts
# Regenerate: npx tsx scripts/generate-openapi-from-steps.ts
openapi: 3.1.0
info:
  title: FirstSales Developer API
  version: 1.0.0
  description: Public v1 developer API for FirstSales.io. Generated from live step definitions — do not hand-edit.
tags:
  - name: Activities
  - name: Alerts
  - name: API Keys
  - name: Authentication
  - name: Billing
  - name: Campaigns
  - name: Companies
  - name: Connectors
  - name: Contacts
  - name: Copilot
  - name: Dashboard
  - name: Deals
  - name: Email Authentication
  - name: Inbox
  - name: Knowledge Bases
  - name: Learning
  - name: Offerings
  - name: Organizations
  - name: Sequence Library
  - name: Team
  - name: Tracking Domains
  - name: Warmup
servers:
  - url: https://sandbox.api.app.firstsales.io
  - url: https://api.app.firstsales.io
security:
  - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Legacy compatibility bearer scheme for generated consumers.
    developerKeyBearer:
      type: http
      scheme: bearer
      description: FirstSales developer API key bearer token (fs-key-*).
    oauthBearer:
      type: http
      scheme: bearer
      description: Reserved OAuth bearer scheme for future public OAuth operations.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - requestId
      required:
        - error
    PublicErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            requestId:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
            - requestId
      required:
        - error
    DeveloperIdentityResponse:
      type: object
      properties:
        apiKey:
          type: object
          properties:
            id:
              type: string
            prefix:
              type: string
            scopes:
              type: array
              items:
                type: string
                enum:
                  - organizations:read
                  - workspaces:read
                  - api_keys:read
                  - api_keys:write
                  - campaigns:read
                  - campaigns:write
                  - contacts:read
                  - contacts:write
                  - connectors:read
                  - connectors:write
                  - inbox:read
                  - inbox:write
                  - kb:read
                  - kb:write
                  - offerings:read
                  - offerings:write
                  - tracking:read
                  - tracking:write
                  - billing:read
                  - billing:write
                  - members:read
                  - members:write
                  - groups:write
                  - domains:read
                  - domains:write
                  - deals:read
                  - deals:write
                  - companies:read
                  - companies:write
                  - activities:read
                  - activities:write
                  - copilot:read
                  - copilot:write
                  - "*"
            accessLevel:
              type: string
              enum:
                - workspace
                - organization
            createdAt:
              type: string
              format: date-time
            lastUsedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - prefix
            - scopes
            - accessLevel
            - createdAt
            - lastUsedAt
          additionalProperties: false
        organization:
          type: object
          properties:
            id:
              type: string
          required:
            - id
          additionalProperties: false
      required:
        - apiKey
        - organization
      additionalProperties: false
    CreateCampaignRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
        description:
          type: string
          maxLength: 1000
        campaignType:
          type: string
          enum:
            - outreach
            - marketing
        goal:
          type: string
          enum:
            - meeting
            - demo
            - download
            - order
            - reply
            - custom
        audience:
          type: object
          properties:
            targetAudience:
              type: string
              maxLength: 2000
            industry:
              type: string
              maxLength: 500
            geography:
              type: object
              properties:
                country:
                  type: string
                  maxLength: 200
                state:
                  type: string
                  maxLength: 200
                city:
                  type: string
                  maxLength: 200
              additionalProperties: false
          additionalProperties: false
        campaignMode:
          type: string
          enum:
            - template
            - autopilot
      required:
        - name
        - campaignType
        - goal
      additionalProperties: false
      allOf:
        - if:
            properties:
              campaignMode:
                const: template
            required:
              - campaignMode
          then:
            properties:
              goal:
                const: reply
    StartCampaignActionRequest:
      type: object
      properties:
        savedVersionId:
          type: string
          minLength: 1
        readinessVersion:
          type: string
          minLength: 1
        idempotencyKey:
          type: string
          minLength: 1
          maxLength: 200
        confirmation:
          type: object
          properties:
            token:
              type: string
              minLength: 1
            senderConnectorIds:
              type: array
              items:
                type: string
                minLength: 1
            eligibleAudienceCount:
              type: number
            timezone:
              type: string
              minLength: 1
            sendWindowStart:
              type: string
              minLength: 1
            sendWindowEnd:
              type: string
              minLength: 1
            activeDays:
              type: array
              items:
                type: string
                minLength: 1
            creditEstimateMin:
              type: number
            creditEstimateMax:
              type: number
            safeguards:
              type: array
              items:
                type: string
                minLength: 1
            consequence:
              type: string
              minLength: 1
            testOverride:
              type: boolean
          additionalProperties: false
      required:
        - savedVersionId
        - readinessVersion
        - idempotencyKey
        - confirmation
      additionalProperties: false
    StartCampaignActionAttempt:
      type: object
      properties:
        id:
          type: string
          minLength: 1
          maxLength: 200
        status:
          type: string
          minLength: 1
          maxLength: 100
        failureCode:
          type: string
          minLength: 1
          maxLength: 100
        testOverrideUsed:
          type: boolean
      required:
        - id
        - status
        - testOverrideUsed
      additionalProperties: false
    StartCampaignActionSuccessResponse:
      type: object
      properties:
        operationId:
          type: string
          minLength: 1
          maxLength: 200
        outcome:
          type: string
          enum:
            - LAUNCHED
            - ALREADY_LAUNCHED
        consequence:
          type: string
          minLength: 1
        replayed:
          type: boolean
        attempt:
          $ref: "#/components/schemas/StartCampaignActionAttempt"
        receiptId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9:_-]+$
        summary:
          type: object
          properties:
            liveStatus:
              type: string
              minLength: 1
            audience:
              type: object
              properties:
                eligibleCount:
                  type: number
              required:
                - eligibleCount
              additionalProperties: false
            schedule:
              type: object
              properties:
                timezone:
                  type: string
                  minLength: 1
                sendWindowStart:
                  type: string
                  minLength: 1
                sendWindowEnd:
                  type: string
                  minLength: 1
                activeDays:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
              required:
                - timezone
                - sendWindowStart
                - sendWindowEnd
                - activeDays
              additionalProperties: false
            safeguards:
              type: array
              items:
                type: string
                minLength: 1
            creditEstimate:
              type: object
              properties:
                min:
                  type: number
                max:
                  type: number
              required:
                - min
                - max
              additionalProperties: false
            testOverrideUsed:
              type: boolean
            nextExecutionAt:
              type:
                - string
                - "null"
              format: date-time
            nextAction:
              type: object
              properties:
                key:
                  type: string
                  minLength: 1
                label:
                  type: string
                  minLength: 1
                consequence:
                  type: string
                  minLength: 1
              required:
                - key
                - label
                - consequence
              additionalProperties: false
            availableActions:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                    minLength: 1
                  label:
                    type: string
                    minLength: 1
                  consequence:
                    type: string
                    minLength: 1
                  permitted:
                    type: boolean
                required:
                  - key
                  - label
                  - consequence
                  - permitted
                additionalProperties: false
          required:
            - liveStatus
            - audience
            - schedule
            - safeguards
            - creditEstimate
            - testOverrideUsed
            - nextExecutionAt
            - nextAction
            - availableActions
          additionalProperties: false
      required:
        - operationId
        - outcome
        - consequence
        - replayed
      additionalProperties: false
    StartCampaignActionConflictResponse:
      type: object
      properties:
        operationId:
          type: string
          minLength: 1
          maxLength: 200
        outcome:
          type: string
          enum:
            - STALE_READINESS
            - ENTITLEMENT_CHANGED
            - TEST_OVERRIDE_REQUIRED
            - LAUNCH_UNKNOWN
            - LAUNCH_FAILED
            - LAUNCH_PENDING
        consequence:
          type: string
          minLength: 1
        replayed:
          type: boolean
        attempt:
          $ref: "#/components/schemas/StartCampaignActionAttempt"
        receiptId:
          type: string
          minLength: 1
          maxLength: 200
          pattern: ^[A-Za-z0-9:_-]+$
        summary:
          type: object
          properties:
            liveStatus:
              type: string
              minLength: 1
            audience:
              type: object
              properties:
                eligibleCount:
                  type: number
              required:
                - eligibleCount
              additionalProperties: false
            schedule:
              type: object
              properties:
                timezone:
                  type: string
                  minLength: 1
                sendWindowStart:
                  type: string
                  minLength: 1
                sendWindowEnd:
                  type: string
                  minLength: 1
                activeDays:
                  type: array
                  items:
                    type: string
                    minLength: 1
                  minItems: 1
              required:
                - timezone
                - sendWindowStart
                - sendWindowEnd
                - activeDays
              additionalProperties: false
            safeguards:
              type: array
              items:
                type: string
                minLength: 1
            creditEstimate:
              type: object
              properties:
                min:
                  type: number
                max:
                  type: number
              required:
                - min
                - max
              additionalProperties: false
            testOverrideUsed:
              type: boolean
            nextExecutionAt:
              type:
                - string
                - "null"
              format: date-time
            nextAction:
              type: object
              properties:
                key:
                  type: string
                  minLength: 1
                label:
                  type: string
                  minLength: 1
                consequence:
                  type: string
                  minLength: 1
              required:
                - key
                - label
                - consequence
              additionalProperties: false
            availableActions:
              type: array
              items:
                type: object
                properties:
                  key:
                    type: string
                    minLength: 1
                  label:
                    type: string
                    minLength: 1
                  consequence:
                    type: string
                    minLength: 1
                  permitted:
                    type: boolean
                required:
                  - key
                  - label
                  - consequence
                  - permitted
                additionalProperties: false
          required:
            - liveStatus
            - audience
            - schedule
            - safeguards
            - creditEstimate
            - testOverrideUsed
            - nextExecutionAt
            - nextAction
            - availableActions
          additionalProperties: false
      required:
        - operationId
        - outcome
        - consequence
        - replayed
      additionalProperties: false
    CampaignResponse:
      type: object
      properties:
        campaign:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            workspaceId:
              type: string
              minLength: 1
            name:
              type: string
            description:
              type:
                - string
                - "null"
            campaignType:
              type: string
              enum:
                - outreach
                - marketing
            campaignMode:
              type: string
              enum:
                - template
                - autopilot
            goal:
              type: string
              enum:
                - meeting
                - demo
                - download
                - order
                - reply
                - custom
            status:
              type: string
              enum:
                - draft
                - configuring
                - ready
                - active
                - paused
                - completed
            progress:
              type: integer
              minimum: 0
              maximum: 100
              default: 0
            audience:
              type:
                - object
                - "null"
              properties:
                targetAudience:
                  type: string
                  maxLength: 2000
                industry:
                  type: string
                  maxLength: 500
                geography:
                  type: object
                  properties:
                    country:
                      type: string
                      maxLength: 200
                    state:
                      type: string
                      maxLength: 200
                    city:
                      type: string
                      maxLength: 200
                  additionalProperties: false
              additionalProperties: false
            stopOnReply:
              type: boolean
              default: true
            handleOOO:
              type: boolean
              default: true
            sendWindow:
              type: object
              properties:
                start:
                  type: string
                  default: 09:00
                end:
                  type: string
                  default: 17:00
                timezone:
                  type: string
                  default: auto
                activeDays:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                      - mon
                      - tue
                      - wed
                      - thu
                      - fri
                      - sat
                      - sun
                  default:
                    - mon
                    - tue
                    - wed
                    - thu
                    - fri
              required:
                - start
                - end
                - timezone
                - activeDays
              additionalProperties: false
            startedAt:
              type:
                - string
                - "null"
              format: date-time
            lastSendAt:
              type:
                - string
                - "null"
              format: date-time
            createdAt:
              type:
                - string
                - "null"
              format: date-time
            updatedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - workspaceId
            - name
            - description
            - campaignType
            - campaignMode
            - goal
            - status
            - progress
            - audience
            - stopOnReply
            - handleOOO
            - sendWindow
            - startedAt
            - lastSendAt
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - campaign
      additionalProperties: false
    CreateApiKeyRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 100
        scopes:
          type: array
          minItems: 1
          items:
            type: string
            enum:
              - organizations:read
              - workspaces:read
              - api_keys:read
              - api_keys:write
              - campaigns:read
              - campaigns:write
              - contacts:read
              - contacts:write
              - connectors:read
              - connectors:write
              - inbox:read
              - inbox:write
              - kb:read
              - kb:write
              - offerings:read
              - offerings:write
              - tracking:read
              - tracking:write
              - billing:read
              - billing:write
              - members:read
              - members:write
              - groups:write
              - domains:read
              - domains:write
              - deals:read
              - deals:write
              - companies:read
              - companies:write
              - activities:read
              - activities:write
              - copilot:read
              - copilot:write
              - "*"
        accessLevel:
          type: string
          enum:
            - workspace
            - organization
          default: workspace
      required:
        - name
        - scopes
      additionalProperties: false
    CreateApiKeyResponse:
      type: object
      properties:
        apiKey:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            prefix:
              type: string
            scopes:
              type: array
              items:
                type: string
            accessLevel:
              type: string
              enum:
                - workspace
                - organization
            createdAt:
              type: string
              format: date-time
          required:
            - id
            - name
            - prefix
            - scopes
            - accessLevel
            - createdAt
          additionalProperties: false
        rawKey:
          type: string
          description: Reveal-once API key secret. Store it securely; it cannot be retrieved later.
      required:
        - apiKey
        - rawKey
      additionalProperties: false
    ListApiKeysResponse:
      type: object
      properties:
        apiKeys:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              prefix:
                type: string
                minLength: 1
              scopes:
                type: array
                items:
                  type: string
              accessLevel:
                type: string
                enum:
                  - workspace
                  - organization
              lastUsedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            required:
              - id
              - name
              - prefix
              - scopes
              - accessLevel
              - lastUsedAt
              - createdAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 100
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - page
            - limit
            - total
            - totalPages
          additionalProperties: false
      required:
        - apiKeys
        - pagination
      additionalProperties: false
    RevokeApiKeyResponse:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: false
    ApiUsageResponse:
      type: object
      properties:
        windowDays:
          type: integer
          minimum: 1
          maximum: 90
        totalRequests:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        errorRate:
          type: number
          minimum: 0
          maximum: 1
        byKey:
          maxItems: 20
          type: array
          items:
            type: object
            properties:
              apiKeyId:
                type: string
                minLength: 24
                maxLength: 24
                pattern: ^[a-f\d]{24}$
              keyPrefix:
                type: string
                minLength: 15
                maxLength: 15
                pattern: ^fs-key-[A-Za-z0-9_-]{8}$
              requests:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              errors:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - apiKeyId
              - keyPrefix
              - requests
              - errors
            additionalProperties: false
        byRoute:
          maxItems: 20
          type: array
          items:
            type: object
            properties:
              routePattern:
                type: string
                maxLength: 200
                pattern: ^(?![A-Za-z0-9_{}:/.-]{0,200}fs-key-)\/api\/v1\/(?:[a-z0-9-]+|\{[A-Za-z][A-Za-z0-9]*\})(?:\/(?:[a-z0-9-]+|\{[A-Za-z][A-Za-z0-9]*\}))*$
              requests:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              errors:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - routePattern
              - requests
              - errors
            additionalProperties: false
      required:
        - windowDays
        - totalRequests
        - errorRate
        - byKey
        - byRoute
      additionalProperties: false
    PublicActivityListResponse:
      type: object
      properties:
        activities:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              workspaceId:
                type: string
                minLength: 1
              type:
                type: string
                enum:
                  - deal_stage
                  - deal_won
                  - deal_lost
                  - note
                  - call
                  - meeting
                  - task
                  - file
              dealId:
                anyOf:
                  - type: string
                  - type: "null"
              contactId:
                type: string
                minLength: 1
              companyId:
                anyOf:
                  - type: string
                  - type: "null"
              actor:
                anyOf:
                  - type: string
                  - type: "null"
              occurredAt:
                anyOf:
                  - type: string
                  - type: "null"
              payload:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              createdAt:
                anyOf:
                  - type: string
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                  - type: "null"
            required:
              - id
              - workspaceId
              - type
              - dealId
              - contactId
              - companyId
              - actor
              - occurredAt
              - payload
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 100
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - page
            - limit
            - total
            - totalPages
          additionalProperties: false
      required:
        - activities
        - pagination
      additionalProperties: false
    PublicAlertListResponse:
      type: object
      properties:
        alerts:
          maxItems: 200
          type: array
          items:
            type: object
            properties:
              id:
                anyOf:
                  - type: string
                  - type: number
              workspaceId:
                anyOf:
                  - type: string
                  - type: number
              category:
                type: string
              conditionCode:
                type: string
              effectiveSeverity:
                type: string
              entity:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              cta:
                type: object
                propertyNames:
                  type: string
                additionalProperties: {}
              status:
                type: string
              conditionSince:
                anyOf:
                  - type: string
                  - type: "null"
              snoozedUntil:
                anyOf:
                  - anyOf:
                      - type: string
                      - type: "null"
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                  - type: "null"
            required:
              - id
              - workspaceId
            additionalProperties: false
      required:
        - alerts
      additionalProperties: false
    CampaignListResponse:
      type: object
      properties:
        campaigns:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              workspaceId:
                type: string
                minLength: 1
              name:
                type: string
              description:
                anyOf:
                  - type: string
                  - type: "null"
              campaignType:
                type: string
                enum:
                  - outreach
                  - marketing
              campaignMode:
                type: string
                enum:
                  - template
                  - autopilot
              goal:
                type: string
                enum:
                  - meeting
                  - demo
                  - download
                  - order
                  - reply
                  - custom
              status:
                type: string
                enum:
                  - draft
                  - configuring
                  - ready
                  - active
                  - paused
                  - completed
              progress:
                type: integer
                minimum: 0
                maximum: 100
              audience:
                anyOf:
                  - type: object
                    properties:
                      targetAudience:
                        type: string
                        maxLength: 2000
                      industry:
                        type: string
                        maxLength: 500
                      geography:
                        type: object
                        properties:
                          country:
                            type: string
                            maxLength: 200
                          state:
                            type: string
                            maxLength: 200
                          city:
                            type: string
                            maxLength: 200
                        additionalProperties: false
                    additionalProperties: false
                  - type: "null"
              stopOnReply:
                type: boolean
              handleOOO:
                type: boolean
              sendWindow:
                type: object
                properties:
                  start:
                    type: string
                  end:
                    type: string
                  timezone:
                    type: string
                  activeDays:
                    minItems: 1
                    type: array
                    items:
                      type: string
                      enum:
                        - mon
                        - tue
                        - wed
                        - thu
                        - fri
                        - sat
                        - sun
                required:
                  - start
                  - end
                  - timezone
                  - activeDays
                additionalProperties: false
              startedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              lastSendAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
            required:
              - id
              - workspaceId
              - name
              - description
              - campaignType
              - campaignMode
              - goal
              - status
              - progress
              - audience
              - stopOnReply
              - handleOOO
              - sendWindow
              - startedAt
              - lastSendAt
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 100
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - page
            - limit
            - total
            - totalPages
          additionalProperties: false
      required:
        - campaigns
        - pagination
      additionalProperties: false
    PublicWarmupStatusResponse:
      type: object
      properties:
        enabled:
          type: boolean
        phase:
          type: string
        score:
          type: number
        warmupPlacementScore:
          type: number
        senderHealthScore:
          type: number
        currentDailyTarget:
          type: number
        startedAt:
          anyOf:
            - type: string
            - type: "null"
        daysActive:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        effectiveStatus:
          type: string
          enum:
            - disabled
            - blocked
            - paused
            - placement_pending
            - warming
            - active
        effectiveStatusReason:
          type: string
        canScheduleWarmup:
          type: boolean
      required:
        - enabled
        - phase
        - score
        - warmupPlacementScore
        - senderHealthScore
        - currentDailyTarget
        - startedAt
        - daysActive
        - effectiveStatus
        - effectiveStatusReason
        - canScheduleWarmup
      additionalProperties: false
    PublicContactGetResponse:
      type: object
      properties:
        contact:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            workspaceId:
              type: string
              minLength: 1
            email:
              type: string
            firstName:
              type:
                - string
                - "null"
            lastName:
              type:
                - string
                - "null"
            fullName:
              type:
                - string
                - "null"
            headline:
              type:
                - string
                - "null"
            linkedinUrl:
              type:
                - string
                - "null"
            company:
              anyOf:
                - type: string
                - type: object
                  properties:
                    name:
                      type: string
                      maxLength: 200
                    website:
                      type: string
                      maxLength: 500
                    domain:
                      type: string
                      maxLength: 253
                    linkedinUrl:
                      type: string
                      maxLength: 500
                    industry:
                      type: string
                      maxLength: 200
                    size:
                      type: integer
                      minimum: 0
                  additionalProperties: false
                - type: "null"
            title:
              type:
                - string
                - "null"
            phone:
              type:
                - string
                - "null"
            location:
              anyOf:
                - type: object
                  properties:
                    city:
                      type: string
                      maxLength: 100
                    state:
                      type: string
                      maxLength: 100
                    country:
                      type: string
                      maxLength: 100
                  additionalProperties: false
                - type: "null"
            tags:
              type: array
              items:
                type: string
            lists:
              type: array
              items:
                type: string
                minLength: 1
            customFields:
              type: object
              additionalProperties: true
            source:
              type: string
              enum:
                - csv-import
                - ai-leads
                - webhook
                - signal
                - manual
            status:
              type: string
              enum:
                - active
                - bounced
                - unsubscribed
            oooStatus:
              type: string
            oooUntil:
              type:
                - string
                - "null"
              format: date-time
            timezone:
              type:
                - string
                - "null"
            verificationStatus:
              type: string
              enum:
                - clean
                - risky
                - dirty
                - unknown
            createdAt:
              type:
                - string
                - "null"
              format: date-time
            updatedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - workspaceId
            - email
            - firstName
            - lastName
            - fullName
            - headline
            - linkedinUrl
            - company
            - title
            - phone
            - location
            - tags
            - lists
            - customFields
            - source
            - status
            - oooStatus
            - oooUntil
            - timezone
            - verificationStatus
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - contact
      additionalProperties: false
    PublicContactListResponse:
      type: object
      properties:
        contacts:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              workspaceId:
                type: string
                minLength: 1
              email:
                type: string
              firstName:
                type:
                  - string
                  - "null"
              lastName:
                type:
                  - string
                  - "null"
              fullName:
                type:
                  - string
                  - "null"
              headline:
                type:
                  - string
                  - "null"
              linkedinUrl:
                type:
                  - string
                  - "null"
              company:
                anyOf:
                  - type: string
                  - type: object
                    properties:
                      name:
                        type: string
                        maxLength: 200
                      website:
                        type: string
                        maxLength: 500
                      domain:
                        type: string
                        maxLength: 253
                      linkedinUrl:
                        type: string
                        maxLength: 500
                      industry:
                        type: string
                        maxLength: 200
                      size:
                        type: integer
                        minimum: 0
                    additionalProperties: false
                  - type: "null"
              title:
                type:
                  - string
                  - "null"
              phone:
                type:
                  - string
                  - "null"
              location:
                anyOf:
                  - type: object
                    properties:
                      city:
                        type: string
                        maxLength: 100
                      state:
                        type: string
                        maxLength: 100
                      country:
                        type: string
                        maxLength: 100
                    additionalProperties: false
                  - type: "null"
              tags:
                type: array
                items:
                  type: string
              lists:
                type: array
                items:
                  type: string
                  minLength: 1
              customFields:
                type: object
                additionalProperties: true
              source:
                type: string
                enum:
                  - csv-import
                  - ai-leads
                  - webhook
                  - signal
                  - manual
              status:
                type: string
                enum:
                  - active
                  - bounced
                  - unsubscribed
              oooStatus:
                type: string
              oooUntil:
                type:
                  - string
                  - "null"
                format: date-time
              timezone:
                type:
                  - string
                  - "null"
              verificationStatus:
                type: string
                enum:
                  - clean
                  - risky
                  - dirty
                  - unknown
              createdAt:
                type:
                  - string
                  - "null"
                format: date-time
              updatedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - id
              - workspaceId
              - email
              - firstName
              - lastName
              - fullName
              - headline
              - linkedinUrl
              - company
              - title
              - phone
              - location
              - tags
              - lists
              - customFields
              - source
              - status
              - oooStatus
              - oooUntil
              - timezone
              - verificationStatus
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          $ref: "#/components/schemas/Pagination"
      required:
        - contacts
        - pagination
      additionalProperties: false
    PublicContactFieldsResponse:
      type: object
      properties:
        fields:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                minLength: 1
              label:
                type: string
                minLength: 1
              source:
                type: string
                enum:
                  - standard
                  - custom
              type:
                anyOf:
                  - type: string
                    minLength: 1
                  - type: "null"
              options:
                type: array
                items:
                  type: string
              required:
                type: boolean
            required:
              - key
              - label
              - source
            additionalProperties: false
      required:
        - fields
      additionalProperties: false
    PublicContactListsResponse:
      type: object
      properties:
        contactLists:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              workspaceId:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              name:
                type: string
                minLength: 1
              description:
                type:
                  - string
                  - "null"
              isDefault:
                type: boolean
              contactCount:
                type: integer
                minimum: 0
              createdAt:
                type:
                  - string
                  - "null"
                format: date-time
              updatedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - id
              - workspaceId
              - name
              - description
              - isDefault
              - contactCount
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - contactLists
      additionalProperties: false
    PublicContactTagsResponse:
      type: object
      properties:
        tags:
          type: array
          uniqueItems: true
          items:
            type: string
            minLength: 1
      required:
        - tags
      additionalProperties: false
    PublicContactOverviewResponse:
      type: object
      properties:
        contact:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            workspaceId:
              type: string
              minLength: 1
            email:
              type: string
            firstName:
              type:
                - string
                - "null"
            lastName:
              type:
                - string
                - "null"
            fullName:
              type:
                - string
                - "null"
            headline:
              type:
                - string
                - "null"
            linkedinUrl:
              type:
                - string
                - "null"
            company:
              anyOf:
                - type: string
                - type: object
                  properties:
                    name:
                      type: string
                      maxLength: 200
                    website:
                      type: string
                      maxLength: 500
                    domain:
                      type: string
                      maxLength: 253
                    linkedinUrl:
                      type: string
                      maxLength: 500
                    industry:
                      type: string
                      maxLength: 200
                    size:
                      type: integer
                      minimum: 0
                  additionalProperties: false
                - type: "null"
            title:
              type:
                - string
                - "null"
            phone:
              type:
                - string
                - "null"
            location:
              anyOf:
                - type: object
                  properties:
                    city:
                      type: string
                      maxLength: 100
                    state:
                      type: string
                      maxLength: 100
                    country:
                      type: string
                      maxLength: 100
                  additionalProperties: false
                - type: "null"
            tags:
              type: array
              items:
                type: string
            lists:
              type: array
              items:
                type: string
                minLength: 1
            customFields:
              type: object
              additionalProperties: true
            source:
              type: string
              enum:
                - csv-import
                - ai-leads
                - webhook
                - signal
                - manual
            status:
              type: string
              enum:
                - active
                - bounced
                - unsubscribed
            oooStatus:
              type: string
            oooUntil:
              type:
                - string
                - "null"
              format: date-time
            timezone:
              type:
                - string
                - "null"
            verificationStatus:
              type: string
              enum:
                - clean
                - risky
                - dirty
                - unknown
            createdAt:
              type:
                - string
                - "null"
              format: date-time
            updatedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - workspaceId
            - email
            - firstName
            - lastName
            - fullName
            - headline
            - linkedinUrl
            - company
            - title
            - phone
            - location
            - tags
            - lists
            - customFields
            - source
            - status
            - oooStatus
            - oooUntil
            - timezone
            - verificationStatus
            - createdAt
            - updatedAt
          additionalProperties: false
        company:
          anyOf:
            - type: object
              properties:
                id:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                workspaceId:
                  type: string
                  minLength: 1
                name:
                  type: string
                domain:
                  anyOf:
                    - type: string
                    - type: "null"
                size:
                  anyOf:
                    - type: number
                    - type: "null"
                industry:
                  anyOf:
                    - type: string
                    - type: "null"
                ownerId:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: "null"
                mergedInto:
                  anyOf:
                    - type: string
                      pattern: ^[0-9a-fA-F]{24}$
                    - type: "null"
                createdAt:
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    - type: "null"
                updatedAt:
                  anyOf:
                    - type: string
                      format: date-time
                      pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                    - type: "null"
              required:
                - id
                - workspaceId
                - name
                - domain
                - size
                - industry
                - ownerId
                - mergedInto
                - createdAt
                - updatedAt
              additionalProperties: false
            - type: "null"
        deals:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              title:
                type:
                  - string
                  - "null"
              status:
                type:
                  - string
                  - "null"
              stageId:
                type:
                  - string
                  - "null"
              pipelineId:
                type:
                  - string
                  - "null"
              amount:
                type:
                  - number
                  - "null"
            required:
              - id
              - title
              - status
              - stageId
              - pipelineId
              - amount
            additionalProperties: false
        recentActivities:
          type: array
          maxItems: 20
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              workspaceId:
                type: string
                minLength: 1
              type:
                type: string
              dealId:
                type:
                  - string
                  - "null"
              contactId:
                type: string
                minLength: 1
              companyId:
                type:
                  - string
                  - "null"
              actor:
                type:
                  - string
                  - "null"
              occurredAt:
                type:
                  - string
                  - "null"
                format: date-time
              payload:
                type: object
                additionalProperties: true
              createdAt:
                type:
                  - string
                  - "null"
                format: date-time
              updatedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - id
              - workspaceId
              - type
              - dealId
              - contactId
              - companyId
              - actor
              - occurredAt
              - payload
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - contact
        - company
        - deals
        - recentActivities
      additionalProperties: false
    PublicDealGetResponse:
      type: object
      properties:
        deal:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            title:
              type: string
            value:
              type: number
              minimum: 0
            currency:
              type: string
              minLength: 1
            stage:
              type: object
              properties:
                id:
                  type: string
              required:
                - id
              additionalProperties: false
            pipelineId:
              type: string
            contactId:
              type: string
            companyId:
              type:
                - string
                - "null"
            ownerId:
              type: string
            status:
              type: string
              enum:
                - open
                - won
                - lost
            lostReason:
              type:
                - string
                - "null"
            labels:
              type: array
              items:
                type: string
            expectedClose:
              type:
                - string
                - "null"
              format: date-time
            createdAt:
              type:
                - string
                - "null"
              format: date-time
            updatedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - title
            - value
            - currency
            - stage
            - pipelineId
            - contactId
            - companyId
            - ownerId
            - status
            - lostReason
            - labels
            - expectedClose
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - deal
      additionalProperties: false
    PublicDealListResponse:
      type: object
      properties:
        deals:
          type: array
          maxItems: 100
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              title:
                type: string
              value:
                type: number
                minimum: 0
              currency:
                type: string
                minLength: 1
              stage:
                type: object
                properties:
                  id:
                    type: string
                required:
                  - id
                additionalProperties: false
              pipelineId:
                type: string
              contactId:
                type: string
              companyId:
                type:
                  - string
                  - "null"
              ownerId:
                type: string
              status:
                type: string
                enum:
                  - open
                  - won
                  - lost
              lostReason:
                type:
                  - string
                  - "null"
              labels:
                type: array
                items:
                  type: string
              expectedClose:
                type:
                  - string
                  - "null"
                format: date-time
              createdAt:
                type:
                  - string
                  - "null"
                format: date-time
              updatedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - id
              - title
              - value
              - currency
              - stage
              - pipelineId
              - contactId
              - companyId
              - ownerId
              - status
              - lostReason
              - labels
              - expectedClose
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          $ref: "#/components/schemas/Pagination"
      required:
        - deals
        - pagination
      additionalProperties: false
    PublicPipelineGetResponse:
      type: object
      properties:
        pipeline:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            name:
              type: string
              maxLength: 100
            stages:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    pattern: ^[0-9a-fA-F]{24}$
                  name:
                    type: string
                    maxLength: 100
                  order:
                    type: number
                    minimum: 0
                  probability:
                    type: number
                    minimum: 0
                    maximum: 1
                required:
                  - id
                  - name
                  - order
                  - probability
                additionalProperties: false
            isDefault:
              type: boolean
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - type: "null"
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - type: "null"
          required:
            - id
            - name
            - stages
            - isDefault
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - pipeline
      additionalProperties: false
    PublicPipelineListResponse:
      type: object
      properties:
        pipelines:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              name:
                type: string
                maxLength: 100
              stages:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      pattern: ^[0-9a-fA-F]{24}$
                    name:
                      type: string
                      maxLength: 100
                    order:
                      type: number
                      minimum: 0
                    probability:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - id
                    - name
                    - order
                    - probability
                  additionalProperties: false
              isDefault:
                type: boolean
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
            required:
              - id
              - name
              - stages
              - isDefault
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - pipelines
      additionalProperties: false
    PublicBillingOverviewResponse:
      type: object
      properties:
        billing:
          anyOf:
            - type: object
              properties:
                status:
                  type: string
                currency:
                  type: string
                setupCompletedAt:
                  anyOf:
                    - type: string
                    - type: "null"
                createdAt:
                  anyOf:
                    - type: string
                    - type: "null"
                updatedAt:
                  anyOf:
                    - type: string
                    - type: "null"
              required:
                - status
                - currency
              additionalProperties: false
            - type: "null"
        subscription:
          anyOf:
            - type: object
              properties:
                status:
                  type: string
                plan:
                  type: string
                interval:
                  type: string
                priceUsdPerPeriod:
                  type: number
                currentPeriodStart:
                  anyOf:
                    - type: string
                    - type: "null"
                currentPeriodEnd:
                  anyOf:
                    - type: string
                    - type: "null"
                cancelAtPeriodEnd:
                  type: boolean
                autoRenewalEnabled:
                  type: boolean
                trialEndsAt:
                  anyOf:
                    - type: string
                    - type: "null"
                trialStartedAt:
                  anyOf:
                    - type: string
                    - type: "null"
                promoCodeApplied:
                  anyOf:
                    - type: string
                    - type: "null"
                promoDiscountPercent:
                  anyOf:
                    - type: number
                    - type: "null"
                promoExpiresAt:
                  anyOf:
                    - type: string
                    - type: "null"
                pastDueRetryCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                scheduledDowngradePlan:
                  anyOf:
                    - type: string
                    - type: "null"
                cancellationReason:
                  anyOf:
                    - type: string
                    - type: "null"
              required:
                - status
                - plan
                - interval
                - priceUsdPerPeriod
                - currentPeriodStart
                - currentPeriodEnd
                - cancelAtPeriodEnd
                - autoRenewalEnabled
                - trialEndsAt
                - trialStartedAt
                - promoCodeApplied
                - promoDiscountPercent
                - promoExpiresAt
                - pastDueRetryCount
                - scheduledDowngradePlan
                - cancellationReason
              additionalProperties: false
            - type: "null"
        credits:
          type: object
          properties:
            orgCredits:
              type: number
            topUpCredits:
              type: number
            total:
              type: number
          required:
            - orgCredits
            - topUpCredits
            - total
          additionalProperties: false
        gracePeriod:
          anyOf:
            - type: object
              properties:
                graceEndsAt:
                  type: string
                gracePeriodDays:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                isInGracePeriod:
                  type: boolean
              required:
                - graceEndsAt
                - gracePeriodDays
                - isInGracePeriod
              additionalProperties: false
            - type: "null"
        trialExhausted:
          type: boolean
      required:
        - billing
        - subscription
        - credits
        - gracePeriod
        - trialExhausted
      additionalProperties: false
    PublicBillingCreditsResponse:
      type: object
      properties:
        orgCredits:
          type: number
        topUpCredits:
          type: number
        total:
          type: number
      required:
        - orgCredits
        - topUpCredits
        - total
      additionalProperties: false
    PublicCreditHistoryResponse:
      type: object
      properties:
        logs:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              id:
                anyOf:
                  - type: string
                  - type: "null"
              action:
                type: string
              actionResourceId:
                anyOf:
                  - type: string
                  - type: "null"
              workspaceId:
                anyOf:
                  - type: string
                  - type: "null"
              campaignId:
                anyOf:
                  - type: string
                  - type: "null"
              creditsConsumed:
                type: number
              consumedAt:
                anyOf:
                  - type: string
              balanceAfter:
                anyOf:
                  - type: number
                  - type: "null"
              refundedAt:
                anyOf:
                  - type: string
                  - type: "null"
            required:
              - id
              - action
              - actionResourceId
              - workspaceId
              - campaignId
              - creditsConsumed
              - consumedAt
            additionalProperties: false
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - logs
        - total
      additionalProperties: false
    PublicUsageSummaryResponse:
      type: object
      properties:
        daily:
          maxItems: 366
          type: array
          items:
            type: object
            properties:
              date:
                type: string
              total:
                type: number
            required:
              - date
              - total
            additionalProperties: false
        byAction:
          maxItems: 21
          type: array
          items:
            type: object
            properties:
              action:
                type: string
              label:
                type: string
              total:
                type: number
              count:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              displayClass:
                type: string
                enum:
                  - fixed
                  - per-unit
                  - metered
                  - refund
              pct:
                type: number
              unitCost:
                type: number
            required:
              - action
              - label
              - total
              - count
              - displayClass
              - pct
            additionalProperties: false
        totalConsumed:
          type: number
        grossSpend:
          type: number
        totalRefunds:
          type: number
        distinctUsed:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        periodDays:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        clamped:
          type: boolean
      required:
        - daily
        - byAction
        - totalConsumed
        - grossSpend
        - totalRefunds
        - distinctUsed
        - periodDays
        - clamped
      additionalProperties: false
    PublicPaymentHistoryResponse:
      type: object
      properties:
        payments:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              date:
                type: string
              amount:
                type: number
              currency:
                type: string
              status:
                type: string
              appStatus:
                type: string
              invoiceUrl:
                anyOf:
                  - type: string
                  - type: "null"
              paymentMethod:
                anyOf:
                  - type: string
                  - type: "null"
            required:
              - id
              - date
              - amount
              - currency
              - status
              - appStatus
              - invoiceUrl
              - paymentMethod
            additionalProperties: false
        hasMore:
          type: boolean
        page:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        limit:
          type: integer
          minimum: 1
          maximum: 9007199254740991
      required:
        - payments
        - hasMore
        - page
        - limit
      additionalProperties: false
    PublicTopUpHistoryResponse:
      type: object
      properties:
        purchases:
          type: array
          items:
            type: object
            properties:
              id:
                anyOf:
                  - type: string
                  - type: "null"
              amountUsd:
                type: number
              creditsIssued:
                type: number
              status:
                type: string
              createdAt:
                anyOf:
                  - type: string
                  - type: "null"
              completedAt:
                anyOf:
                  - type: string
                  - type: "null"
            required:
              - id
              - amountUsd
              - creditsIssued
              - status
              - createdAt
              - completedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            offset:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - total
            - limit
            - offset
          additionalProperties: false
      required:
        - purchases
        - pagination
      additionalProperties: false
    PublicLearningOverviewResponse:
      type: object
      properties:
        overview:
          type: object
          properties:
            learningState:
              type: string
              minLength: 1
            hasModel:
              type: boolean
            maturityState:
              type: string
              minLength: 1
            regime:
              type: string
              minLength: 1
            preferences:
              type: object
              properties:
                preferred:
                  maxItems: 10
                  type: array
                  items:
                    type: object
                    properties:
                      feature:
                        type: string
                        minLength: 1
                      label:
                        type: string
                        minLength: 1
                      weight:
                        type: number
                    required:
                      - feature
                      - label
                      - weight
                    additionalProperties: false
                avoid:
                  maxItems: 10
                  type: array
                  items:
                    type: object
                    properties:
                      feature:
                        type: string
                        minLength: 1
                      label:
                        type: string
                        minLength: 1
                      weight:
                        type: number
                    required:
                      - feature
                      - label
                      - weight
                    additionalProperties: false
              required:
                - preferred
                - avoid
              additionalProperties: false
            coverage:
              type: object
              properties:
                segmentCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                totalObservations:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                maturedConversionObservations:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                chunkCount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                chunkCountScope:
                  type: string
                  enum:
                    - campaign
                    - workspace
                retainedSignalObservations:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                retentionWindowDays:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - segmentCount
                - totalObservations
                - maturedConversionObservations
                - chunkCount
                - chunkCountScope
                - retainedSignalObservations
                - retentionWindowDays
              additionalProperties: false
            activation:
              type: object
              properties:
                state:
                  type: string
                  enum:
                    - awaiting_qualified_reply
                    - first_qualified_reply
                qualifiedReplies:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                firstQualifiedReplyAt:
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                nextAction:
                  type: string
                  minLength: 1
              required:
                - state
                - qualifiedReplies
                - nextAction
              additionalProperties: false
            lastUpdatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                - type: "null"
          required:
            - learningState
            - hasModel
            - maturityState
            - regime
            - preferences
            - coverage
            - lastUpdatedAt
          additionalProperties: false
      required:
        - overview
      additionalProperties: false
    PublicLearningActivityResponse:
      type: object
      properties:
        activity:
          type: object
          properties:
            items:
              maxItems: 200
              type: array
              items:
                type: object
                properties:
                  signalType:
                    type: string
                    minLength: 1
                  reward:
                    type: number
                  weight:
                    type: number
                  arm:
                    type: string
                    enum:
                      - treatment
                      - control
                  head:
                    type: string
                    minLength: 1
                  segmentKey:
                    type: string
                    minLength: 1
                  instructionsVersion:
                    anyOf:
                      - type: integer
                        minimum: -9007199254740991
                        maximum: 9007199254740991
                      - type: "null"
                  observedAt:
                    type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  maturedAt:
                    anyOf:
                      - type: string
                        format: date-time
                        pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                      - type: "null"
                required:
                  - signalType
                  - reward
                  - weight
                  - arm
                  - head
                  - segmentKey
                  - instructionsVersion
                  - observedAt
                  - maturedAt
                additionalProperties: false
            totalCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            nextCursor:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                - type: "null"
          required:
            - items
            - totalCount
            - nextCursor
          additionalProperties: false
      required:
        - activity
      additionalProperties: false
    PublicLearningGraphResponse:
      type: object
      properties:
        graph:
          type: object
          properties:
            learningState:
              type: string
              minLength: 1
            nodes:
              maxItems: 21
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                  label:
                    type: string
                    minLength: 1
                  kind:
                    type: string
                    enum:
                      - campaign
                      - opener
                      - cta
                      - length
                      - structure
                      - semantic
                  weight:
                    type: number
                required:
                  - id
                  - label
                  - kind
                additionalProperties: false
            edges:
              maxItems: 20
              type: array
              items:
                type: object
                properties:
                  source:
                    type: string
                    minLength: 1
                  target:
                    type: string
                    minLength: 1
                  weight:
                    type: number
                    minimum: 0
                  polarity:
                    type: string
                    enum:
                      - preferred
                      - avoid
                required:
                  - source
                  - target
                  - weight
                  - polarity
                additionalProperties: false
          required:
            - learningState
            - nodes
            - edges
          additionalProperties: false
      required:
        - graph
      additionalProperties: false
    PublicLearningOutcomesResponse:
      type: object
      properties:
        outcomes:
          type: object
          properties:
            treatment:
              type: object
              properties:
                sent:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                mature:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                open:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                click:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                reply:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                goal:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                unsub:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                bounce:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                ooo:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
              required:
                - sent
                - mature
                - open
                - click
                - reply
                - goal
                - unsub
                - bounce
                - ooo
              additionalProperties: false
            control:
              type: object
              properties:
                sent:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                mature:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                open:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                click:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                reply:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                goal:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                unsub:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                bounce:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
                ooo:
                  type: object
                  properties:
                    count:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    rate:
                      type: number
                  required:
                    - count
                    - rate
                  additionalProperties: false
              required:
                - sent
                - mature
                - open
                - click
                - reply
                - goal
                - unsub
                - bounce
                - ooo
              additionalProperties: false
            denominators:
              type: object
              properties:
                assigned:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                executed:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                mature:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                unknownAssignment:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                unknownExecution:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                executionMismatch:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - assigned
                - executed
                - mature
                - unknownAssignment
                - unknownExecution
                - executionMismatch
              additionalProperties: false
            experiment:
              type: object
              properties:
                state:
                  type: string
                  minLength: 1
                gates:
                  type: object
                  properties:
                    eligible:
                      type: boolean
                    gates:
                      type: object
                      properties:
                        sampleFloor:
                          type: boolean
                        conversionImproves:
                          type: boolean
                        intervalSupports:
                          type: boolean
                        safetyHolds:
                          type: boolean
                      required:
                        - sampleFloor
                        - conversionImproves
                        - intervalSupports
                        - safetyHolds
                      additionalProperties: false
                    evidence:
                      type: object
                      properties:
                        treatmentRate:
                          anyOf:
                            - type: number
                            - type: "null"
                        controlRate:
                          anyOf:
                            - type: number
                            - type: "null"
                        liftLowerBound:
                          anyOf:
                            - type: number
                            - type: "null"
                        treatmentSafetyRate:
                          anyOf:
                            - type: number
                            - type: "null"
                        controlSafetyRate:
                          anyOf:
                            - type: number
                            - type: "null"
                      required:
                        - treatmentRate
                        - controlRate
                        - liftLowerBound
                        - treatmentSafetyRate
                        - controlSafetyRate
                      additionalProperties: false
                  required:
                    - eligible
                    - gates
                    - evidence
                  additionalProperties: false
              required:
                - state
                - gates
              additionalProperties: false
            lift:
              type: object
              properties:
                open:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                click:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                reply:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                goal:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                unsub:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                bounce:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
                ooo:
                  type: object
                  properties:
                    absolute:
                      anyOf:
                        - type: number
                        - type: "null"
                  required:
                    - absolute
                  additionalProperties: false
              required:
                - open
                - click
                - reply
                - goal
                - unsub
                - bounce
                - ooo
              additionalProperties: false
            observationCounts:
              type: object
              properties:
                open:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                click:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                reply:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                goal:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                unsub:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                bounce:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
                ooo:
                  type: object
                  properties:
                    treatment:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    control:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - treatment
                    - control
                  additionalProperties: false
              required:
                - open
                - click
                - reply
                - goal
                - unsub
                - bounce
                - ooo
              additionalProperties: false
            evidence:
              type: object
              properties:
                assignedProspects:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                excludedUnassignedEmails:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                excludedMixedArmProspects:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - assignedProspects
                - excludedUnassignedEmails
                - excludedMixedArmProspects
              additionalProperties: false
            dimensionExperiments:
              maxItems: 200
              type: array
              items:
                type: object
                properties:
                  dimension:
                    type: string
                    enum:
                      - subject-shape
                      - cta-shape
                      - body-format
                  dimensionVersion:
                    type: string
                    minLength: 1
                  values:
                    type: object
                    properties:
                      treatment:
                        anyOf:
                          - type: string
                          - type: "null"
                      control:
                        anyOf:
                          - type: string
                          - type: "null"
                    required:
                      - treatment
                      - control
                    additionalProperties: false
                  state:
                    type: string
                    minLength: 1
                  assigned:
                    type: object
                    properties:
                      treatment:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      control:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - treatment
                      - control
                    additionalProperties: false
                  executed:
                    type: object
                    properties:
                      treatment:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      control:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - treatment
                      - control
                    additionalProperties: false
                  executionMismatch:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  evidence:
                    type: object
                    properties:
                      treatment:
                        type: object
                        properties:
                          matureSends:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          qualifiedOrMeeting:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          safetyNegatives:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - matureSends
                          - qualifiedOrMeeting
                          - safetyNegatives
                        additionalProperties: false
                      control:
                        type: object
                        properties:
                          matureSends:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          qualifiedOrMeeting:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          safetyNegatives:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - matureSends
                          - qualifiedOrMeeting
                          - safetyNegatives
                        additionalProperties: false
                    required:
                      - treatment
                      - control
                    additionalProperties: false
                  gates:
                    type: object
                    properties:
                      eligible:
                        type: boolean
                      gates:
                        type: object
                        properties:
                          sampleFloor:
                            type: boolean
                          conversionImproves:
                            type: boolean
                          intervalSupports:
                            type: boolean
                          safetyHolds:
                            type: boolean
                        required:
                          - sampleFloor
                          - conversionImproves
                          - intervalSupports
                          - safetyHolds
                        additionalProperties: false
                      evidence:
                        type: object
                        properties:
                          treatmentRate:
                            anyOf:
                              - type: number
                              - type: "null"
                          controlRate:
                            anyOf:
                              - type: number
                              - type: "null"
                          liftLowerBound:
                            anyOf:
                              - type: number
                              - type: "null"
                          treatmentSafetyRate:
                            anyOf:
                              - type: number
                              - type: "null"
                          controlSafetyRate:
                            anyOf:
                              - type: number
                              - type: "null"
                        required:
                          - treatmentRate
                          - controlRate
                          - liftLowerBound
                          - treatmentSafetyRate
                          - controlSafetyRate
                        additionalProperties: false
                    required:
                      - eligible
                      - gates
                      - evidence
                    additionalProperties: false
                required:
                  - dimension
                  - dimensionVersion
                  - values
                  - state
                  - assigned
                  - executed
                  - executionMismatch
                  - evidence
                  - gates
                additionalProperties: false
            outcomeLearning:
              type: object
              properties:
                exposures:
                  type: object
                  properties:
                    acceptedSend:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    projected:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    matureProjected:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - acceptedSend
                    - projected
                    - matureProjected
                  additionalProperties: false
                summary:
                  type: object
                  properties:
                    positiveReply:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    qualifiedPositiveReply:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    qualifiedConversation:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    meeting:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opportunity:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    negativeReply:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    unsubscribe:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    bounce:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    complaint:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    mailboxPause:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    manualEdit:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                  required:
                    - positiveReply
                    - qualifiedPositiveReply
                    - qualifiedConversation
                    - meeting
                    - opportunity
                    - negativeReply
                    - unsubscribe
                    - bounce
                    - complaint
                    - mailboxPause
                    - manualEdit
                  additionalProperties: false
                weights:
                  type: object
                  properties:
                    seed:
                      type: object
                      properties:
                        state:
                          type: string
                          enum:
                            - eligible
                            - blocked
                        weight:
                          type: number
                        blockedReasons:
                          maxItems: 50
                          type: array
                          items:
                            type: string
                            minLength: 1
                        hardAbort:
                          type: boolean
                        totalAcceptedExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        completedMatureExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - state
                        - weight
                        - blockedReasons
                        - hardAbort
                        - totalAcceptedExposures
                        - completedMatureExposures
                      additionalProperties: false
                    bodyFormat:
                      type: object
                      properties:
                        state:
                          type: string
                          enum:
                            - eligible
                            - blocked
                        weight:
                          type: number
                        blockedReasons:
                          maxItems: 50
                          type: array
                          items:
                            type: string
                            minLength: 1
                        hardAbort:
                          type: boolean
                        totalAcceptedExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        completedMatureExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - state
                        - weight
                        - blockedReasons
                        - hardAbort
                        - totalAcceptedExposures
                        - completedMatureExposures
                      additionalProperties: false
                    cta:
                      type: object
                      properties:
                        state:
                          type: string
                          enum:
                            - eligible
                            - blocked
                        weight:
                          type: number
                        blockedReasons:
                          maxItems: 50
                          type: array
                          items:
                            type: string
                            minLength: 1
                        hardAbort:
                          type: boolean
                        totalAcceptedExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        completedMatureExposures:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      required:
                        - state
                        - weight
                        - blockedReasons
                        - hardAbort
                        - totalAcceptedExposures
                        - completedMatureExposures
                      additionalProperties: false
                  required:
                    - seed
                    - bodyFormat
                    - cta
                  additionalProperties: false
              required:
                - exposures
                - summary
                - weights
              additionalProperties: false
          required:
            - treatment
            - control
            - denominators
            - experiment
            - lift
            - evidence
            - dimensionExperiments
          additionalProperties: false
      required:
        - outcomes
      additionalProperties: false
    PublicLearningAutoModeStateResponse:
      type: object
      properties:
        learningState:
          type: string
          minLength: 1
        autoMode:
          type: boolean
        decision:
          type: object
          properties:
            autoSeedMore:
              type: boolean
            applyLearnedPreferences:
              type: boolean
            enablePremiumRerank:
              type: boolean
            needsHumanReview:
              type: boolean
            rationale:
              maxItems: 20
              type: array
              items:
                type: string
                minLength: 1
          required:
            - autoSeedMore
            - applyLearnedPreferences
            - enablePremiumRerank
            - needsHumanReview
            - rationale
          additionalProperties: false
        state:
          type: object
          properties:
            seedStatus:
              type: string
              minLength: 1
            heartsCollected:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            samplesShown:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            hasModel:
              type: boolean
            totalObservations:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            maturedConversionObservations:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            regime:
              type: string
              enum:
                - taste
                - blended
                - conversion
            zeroHeartBatchStreak:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            seedBatchesRun:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - seedStatus
            - heartsCollected
            - samplesShown
            - hasModel
            - totalObservations
            - maturedConversionObservations
            - regime
            - zeroHeartBatchStreak
            - seedBatchesRun
          additionalProperties: false
        heartTarget:
          type: integer
          minimum: 0
          maximum: 9007199254740991
      required:
        - learningState
        - autoMode
        - decision
        - state
        - heartTarget
      additionalProperties: false
    PublicTeamMembersResponse:
      type: object
      properties:
        members:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              userId:
                type: string
                minLength: 1
              email:
                type: string
              name:
                type: string
              avatarUrl:
                anyOf:
                  - type: string
                  - type: "null"
              role:
                type: string
                minLength: 1
              orgRole:
                type: string
                enum:
                  - owner
                  - admin
                  - member
              groups:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                    slug:
                      type: string
                      minLength: 1
                  required:
                    - id
                    - name
                    - slug
                  additionalProperties: false
              groupNames:
                type: array
                items:
                  type: string
                  minLength: 1
              status:
                type: string
                enum:
                  - active
                  - suspended
              suspendedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              joinedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              workspaceScope:
                type: string
                enum:
                  - all
                  - specific
              workspaces:
                type: array
                items:
                  type: object
                  properties:
                    _id:
                      type: string
                      minLength: 1
                    name:
                      type: string
                      minLength: 1
                  required:
                    - _id
                    - name
                  additionalProperties: false
            required:
              - userId
              - email
              - name
              - avatarUrl
              - role
              - orgRole
              - groups
              - groupNames
              - status
              - suspendedAt
              - joinedAt
              - workspaceScope
              - workspaces
            additionalProperties: false
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        page:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        limit:
          type: integer
          minimum: 1
          maximum: 100
      required:
        - members
        - total
        - page
        - limit
      additionalProperties: false
    PublicTeamInvitationsResponse:
      type: object
      properties:
        invitations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              email:
                type: string
                minLength: 1
              role:
                type: string
                minLength: 1
              groupSlug:
                type: string
                minLength: 1
              status:
                type: string
                enum:
                  - pending
                  - accepted
                  - rejected
                  - cancelled
                  - expired
              invitedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              expiresAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              acceptedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              inviterName:
                type: string
              invitedBy:
                type: object
                properties:
                  userId:
                    type: string
                    minLength: 1
                  name:
                    type: string
                  email:
                    type: string
                required:
                  - userId
                  - name
                  - email
                additionalProperties: false
            required:
              - id
              - email
              - role
              - groupSlug
              - status
              - invitedAt
              - expiresAt
              - acceptedAt
              - createdAt
              - inviterName
              - invitedBy
            additionalProperties: false
      required:
        - invitations
      additionalProperties: false
    PublicTeamGroupsResponse:
      type: object
      properties:
        groups:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              slug:
                type: string
                minLength: 1
              permissions:
                type: array
                items:
                  type: string
                  minLength: 1
              isSystem:
                type: boolean
              memberCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              targetVersion:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - id
              - name
              - slug
              - permissions
              - isSystem
              - memberCount
              - targetVersion
            additionalProperties: false
      required:
        - groups
      additionalProperties: false
    PublicTeamGroupMutationResponse:
      type: object
      properties:
        group:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            name:
              type: string
              minLength: 1
            slug:
              type: string
              minLength: 1
            permissions:
              type: array
              items:
                type: string
                enum:
                  - campaign:create
                  - campaign:edit
                  - campaign:delete
                  - campaign:view
                  - campaign:launch
                  - campaign:pause
                  - contact:create
                  - contact:edit
                  - contact:delete
                  - contact:view
                  - contact:import
                  - contact_list:create
                  - contact_list:edit
                  - contact_list:delete
                  - contact_list:view
                  - connector:connect
                  - connector:disconnect
                  - connector:view
                  - inbox:view
                  - inbox:reply
                  - inbox:approve_draft
                  - inbox:reject_draft
                  - kb:create
                  - kb:edit
                  - kb:delete
                  - kb:view
                  - offering:create
                  - offering:edit
                  - offering:delete
                  - offering:view
                  - tracking_domain:create
                  - tracking_domain:delete
                  - tracking_domain:view
                  - domain_auth:view
                  - domain_auth:create
                  - deal:create
                  - deal:edit
                  - deal:delete
                  - deal:view
                  - deal:move_stage
                  - deal:set_status
                  - pipeline:create
                  - pipeline:edit
                  - pipeline:delete
                  - pipeline:view
                  - company:create
                  - company:edit
                  - company:delete
                  - company:view
                  - activity:create
                  - activity:view
                  - scheduled_activity:create
                  - scheduled_activity:edit
                  - scheduled_activity:delete
                  - scheduled_activity:view
                  - org:settings
                  - org:billing
                  - org:transfer
                  - org:delete
                  - org:view
                  - member:invite
                  - member:remove
                  - member:suspend
                  - member:view
                  - group:create
                  - group:edit
                  - group:delete
                  - group:assign
                  - domain_allowlist:view
                  - domain_allowlist:manage
                  - workspace:create
                  - workspace:view
                  - workspace:delete
                  - workspace:settings
                  - api_key:view
                  - api_key:create
                  - api_key:revoke
            isSystem:
              type: boolean
              const: false
            memberCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            targetVersion:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - id
            - name
            - slug
            - permissions
            - isSystem
            - memberCount
            - targetVersion
          additionalProperties: false
      required:
        - group
      additionalProperties: false
    PublicOfferingUpdateResponse:
      type: object
      properties:
        offering:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            workspaceId:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            type:
              type: string
              enum:
                - product
                - service
            name:
              type: string
              minLength: 1
              maxLength: 100
            shortDescription:
              type: string
              maxLength: 200
            information:
              type: string
              minLength: 1
            keyBenefits:
              type: array
              items:
                type: string
                maxLength: 200
            url:
              type: string
              maxLength: 500
              format: uri
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            targetVersion:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - id
            - workspaceId
            - type
            - name
            - information
            - keyBenefits
            - createdAt
            - updatedAt
            - targetVersion
          additionalProperties: false
        warnings:
          type: array
          items:
            type: object
            properties:
              phrase:
                type: string
                minLength: 1
              category:
                type: string
                enum:
                  - spam
                  - ai-slop
            required:
              - phrase
              - category
            additionalProperties: false
      required:
        - offering
        - warnings
      additionalProperties: false
    PublicOfferingListResponse:
      type: object
      properties:
        offerings:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              workspaceId:
                type: string
                minLength: 1
              type:
                type: string
                enum:
                  - product
                  - service
              name:
                type: string
                minLength: 1
              shortDescription:
                type: string
              information:
                type: string
                minLength: 1
              keyBenefits:
                type: array
                items:
                  type: string
              url:
                type: string
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
              targetVersion:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - id
              - workspaceId
              - type
              - name
              - information
              - keyBenefits
              - createdAt
              - updatedAt
              - targetVersion
            additionalProperties: false
      required:
        - offerings
      additionalProperties: false
    PublicOfferingGetResponse:
      type: object
      properties:
        offering:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            workspaceId:
              type: string
              minLength: 1
            type:
              type: string
              enum:
                - product
                - service
            name:
              type: string
              minLength: 1
            shortDescription:
              type: string
            information:
              type: string
              minLength: 1
            keyBenefits:
              type: array
              items:
                type: string
            url:
              type: string
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
            targetVersion:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - id
            - workspaceId
            - type
            - name
            - information
            - keyBenefits
            - createdAt
            - updatedAt
            - targetVersion
          additionalProperties: false
      required:
        - offering
      additionalProperties: false
    PublicInboxThreadListResponse:
      type: object
      properties:
        threads:
          type: array
          items:
            type: object
            properties:
              threadId:
                type: string
                minLength: 1
                maxLength: 1024
              subject:
                type: string
              lastMessageAt:
                type: string
              lastMessageDirection:
                type: string
                enum:
                  - outbound
                  - inbound
              messageCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              unreadCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              pendingApprovalCount:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              hasBounce:
                type: boolean
              hasGoalHit:
                type: boolean
              hasFailed:
                type: boolean
              hasReply:
                type: boolean
              hasUnsubscribe:
                type: boolean
              hasOoo:
                type: boolean
              status:
                type: string
              journeyStatus:
                type: string
              contact:
                type: object
                properties:
                  id:
                    type: string
                  email:
                    type: string
                  name:
                    type: string
                required:
                  - id
                  - email
                additionalProperties: false
              campaign:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  goal:
                    type: string
                required:
                  - id
                  - name
                  - goal
                additionalProperties: false
              senderConnector:
                type: object
                properties:
                  id:
                    type: string
                  email:
                    type: string
                required:
                  - id
                additionalProperties: false
              visibility:
                type: string
              ownerId:
                type: string
              ownerName:
                type: string
              assigneeId:
                type: string
              assigneeName:
                type: string
              isOrphan:
                type: boolean
              isWarmup:
                type: boolean
              dealId:
                type: string
            required:
              - threadId
              - subject
              - lastMessageAt
              - lastMessageDirection
              - messageCount
              - unreadCount
              - pendingApprovalCount
              - hasBounce
              - hasGoalHit
              - hasFailed
              - hasReply
              - hasUnsubscribe
              - hasOoo
              - status
              - journeyStatus
              - contact
              - campaign
            additionalProperties: false
        total:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        page:
          type: integer
          minimum: 1
          maximum: 9007199254740991
        limit:
          type: integer
          minimum: 1
          maximum: 50
        tabCounts:
          type: object
          properties:
            all:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            needs-approval:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unread:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            replies:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            completed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            active:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            bounced:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            failed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            warmup:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - all
            - needs-approval
            - unread
            - replies
            - completed
            - active
            - bounced
            - failed
            - warmup
          additionalProperties: false
      required:
        - threads
        - total
        - page
        - limit
        - tabCounts
      additionalProperties: false
    PublicInboxThreadDetailResponse:
      type: object
      properties:
        thread:
          type: object
          properties:
            threadId:
              type: string
              minLength: 1
              maxLength: 1024
            subject:
              type: string
            lastMessageAt:
              type: string
            lastMessageDirection:
              type: string
              enum:
                - outbound
                - inbound
            messageCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unreadCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            pendingApprovalCount:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            hasBounce:
              type: boolean
            hasGoalHit:
              type: boolean
            hasFailed:
              type: boolean
            hasReply:
              type: boolean
            hasUnsubscribe:
              type: boolean
            hasOoo:
              type: boolean
            status:
              type: string
            journeyStatus:
              type: string
            contact:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            campaign:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            senderConnector:
              type: object
              properties:
                id:
                  type: string
                email:
                  type: string
              required:
                - id
              additionalProperties: false
            visibility:
              type: string
            ownerId:
              type: string
            ownerName:
              type: string
            assigneeId:
              type: string
            assigneeName:
              type: string
            isOrphan:
              type: boolean
            isWarmup:
              type: boolean
            dealId:
              type: string
            emails:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  threadId:
                    type: string
                  direction:
                    type: string
                    enum:
                      - outbound
                      - inbound
                  emailType:
                    type: string
                  sequenceNumber:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  subject:
                    type: string
                  senderEmail:
                    type: string
                  senderName:
                    type: string
                  recipientEmail:
                    type: string
                  recipientName:
                    type: string
                  draftStatus:
                    type: boolean
                  approvalStatus:
                    type: boolean
                  sentStatus:
                    type: boolean
                  failedStatus:
                    type: boolean
                  cancelledStatus:
                    type: boolean
                  readByUser:
                    type: boolean
                  createdAt:
                    type: string
                  sentAt:
                    type: string
                  scheduledAt:
                    type: string
                  engagement:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  replyAnalysis:
                    type: object
                    properties:
                      sentiment:
                        type: string
                      intent:
                        type: string
                    additionalProperties: false
                  approvalType:
                    type: string
                required:
                  - id
                  - threadId
                  - direction
                  - emailType
                  - sequenceNumber
                  - subject
                  - recipientEmail
                  - draftStatus
                  - approvalStatus
                  - sentStatus
                  - failedStatus
                  - cancelledStatus
                  - readByUser
                  - createdAt
                additionalProperties: false
            aggregatedEngagement:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            journey:
              type: object
              propertyNames:
                type: string
              additionalProperties: {}
            latestReplyAnalysis:
              type: object
              properties:
                sentiment:
                  type: string
                intent:
                  type: string
              additionalProperties: false
          required:
            - threadId
            - subject
            - lastMessageAt
            - lastMessageDirection
            - messageCount
            - unreadCount
            - pendingApprovalCount
            - hasBounce
            - hasGoalHit
            - hasFailed
            - hasReply
            - hasUnsubscribe
            - hasOoo
            - status
            - journeyStatus
            - contact
            - campaign
            - emails
            - aggregatedEngagement
            - journey
          additionalProperties: false
      required:
        - thread
      additionalProperties: false
    PublicOrganizationListResponse:
      type: object
      properties:
        organizations:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              slug:
                type: string
                minLength: 1
              industry:
                type: string
                minLength: 1
              companySize:
                type: string
                minLength: 1
              role:
                type: string
                minLength: 1
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
            required:
              - id
              - name
              - slug
              - industry
              - companySize
              - role
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - organizations
      additionalProperties: false
    PublicWorkspaceListResponse:
      type: object
      properties:
        workspaces:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              orgId:
                type: string
                minLength: 1
              name:
                type: string
                minLength: 1
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
            required:
              - id
              - orgId
              - name
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - workspaces
      additionalProperties: false
    PublicCampaignAnalyticsResponse:
      type: object
      properties:
        campaignId:
          type: string
        goal:
          type: string
          enum:
            - meeting
            - demo
            - download
            - order
            - reply
            - custom
            - default
        startedAt:
          anyOf:
            - type: string
            - type: "null"
        lastUpdatedAt:
          type: string
        windowStart:
          anyOf:
            - type: string
            - type: "null"
        windowEnd:
          type: string
        totalContacts:
          type: integer
          minimum: 0
          maximum: 9007199254740991
        goalKpis:
          type: object
          properties:
            goalsAchieved:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            goalRate:
              type: number
              minimum: 0
              maximum: 1
            avgDaysToGoal:
              anyOf:
                - type: number
                - type: "null"
            byType:
              type: object
              properties:
                demo:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                download:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                order:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                meeting:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - demo
                - download
                - order
                - meeting
              additionalProperties: false
            revenue:
              type: object
              properties:
                total:
                  type: number
                currency:
                  type: string
                orderCount:
                  type: number
                otherCurrencies:
                  type: array
                  items:
                    type: object
                    properties:
                      currency:
                        type: string
                      total:
                        type: number
                      orderCount:
                        type: number
                    required:
                      - currency
                      - total
                      - orderCount
                    additionalProperties: false
              required:
                - total
                - currency
                - orderCount
              additionalProperties: false
          required:
            - goalsAchieved
            - goalRate
            - avgDaysToGoal
            - byType
          additionalProperties: false
        engagementKpis:
          type: object
          properties:
            sent:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            delivered:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            opened:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            clicked:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            replied:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            bounced:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unsubscribed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            openRate:
              type: number
              minimum: 0
              maximum: 1
            clickRate:
              type: number
              minimum: 0
              maximum: 1
            replyRate:
              type: number
              minimum: 0
              maximum: 1
            bounceRate:
              type: number
              minimum: 0
              maximum: 1
            unsubscribeRate:
              type: number
              minimum: 0
              maximum: 1
          required:
            - sent
            - delivered
            - opened
            - clicked
            - replied
            - bounced
            - unsubscribed
            - openRate
            - clickRate
            - replyRate
            - bounceRate
            - unsubscribeRate
          additionalProperties: false
        contactPipeline:
          type: object
          properties:
            attachedListContacts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            attachedListActive:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            attachedListInactive:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            importedContacts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyStarted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyNotStarted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyCompleted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            completedWithGoal:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyBounced:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyUnsubscribed:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            journeyInProgress:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - attachedListContacts
            - attachedListActive
            - attachedListInactive
            - importedContacts
            - journeyStarted
            - journeyNotStarted
            - journeyCompleted
            - completedWithGoal
            - journeyBounced
            - journeyUnsubscribed
            - journeyInProgress
          additionalProperties: false
        upcomingPipeline:
          type: object
          properties:
            next7Days:
              type: array
              items:
                type: object
                properties:
                  date:
                    type: string
                  firstTouch:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  followup:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  total:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - date
                  - firstTouch
                  - followup
                  - total
                additionalProperties: false
            pendingBacklog:
              type: object
              properties:
                pendingContacts:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                awaitingSchedule:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                draftJobsOpen:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
                total:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              required:
                - pendingContacts
                - awaitingSchedule
                - draftJobsOpen
                - total
              additionalProperties: false
          required:
            - next7Days
            - pendingBacklog
          additionalProperties: false
        outcomeProjection:
          type: object
          properties:
            asOf:
              type: string
            denominator:
              type: string
              const: campaignContacts
            delivered:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            safelyWaiting:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            exhausted:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            unexplained:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            safelyWaitingCohorts:
              type: array
              items:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  reason:
                    type: string
                  scope:
                    type: string
                    enum:
                      - campaignContact
                      - campaignEmail
                  retryable:
                    type: boolean
                  nextAction:
                    type: string
                  nextReevaluation:
                    type: string
                required:
                  - count
                  - reason
                  - scope
                  - retryable
                additionalProperties: false
            exhaustedCohorts:
              type: array
              items:
                type: object
                properties:
                  count:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  reason:
                    type: string
                  scope:
                    type: string
                    enum:
                      - campaignContact
                      - campaignEmail
                  retryable:
                    type: boolean
                  nextAction:
                    type: string
                  nextReevaluation:
                    type: string
                required:
                  - count
                  - reason
                  - scope
                  - retryable
                additionalProperties: false
          required:
            - asOf
            - denominator
            - delivered
            - safelyWaiting
            - exhausted
            - unexplained
            - total
            - safelyWaitingCohorts
            - exhaustedCohorts
          additionalProperties: false
        funnel:
          type: array
          items:
            type: object
            properties:
              stage:
                type: string
                enum:
                  - sent
                  - delivered
                  - opened
                  - clicked
                  - replied
                  - goal
              count:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              pctOfSent:
                type: number
                minimum: 0
                maximum: 1
              dropoffPct:
                type: number
                minimum: 0
                maximum: 1
            required:
              - stage
              - count
              - pctOfSent
              - dropoffPct
            additionalProperties: false
        timeseries:
          type: array
          items:
            type: object
            properties:
              date:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              delivered:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              opened:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replied:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              goals:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - date
              - sent
              - delivered
              - opened
              - replied
              - goals
            additionalProperties: false
        perStep:
          type: array
          items:
            type: object
            properties:
              stepId:
                type: integer
                minimum: 1
                maximum: 9007199254740991
              stepName:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              opens:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              clicks:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replies:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              goals:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              replyRate:
                type: number
                minimum: 0
                maximum: 1
              goalRate:
                type: number
                minimum: 0
                maximum: 1
              avgGoalRate:
                type: number
                minimum: 0
                maximum: 1
              variants:
                type: array
                items:
                  type: object
                  properties:
                    templateId:
                      type: string
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    clicks:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    replies:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    goals:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    replyRate:
                      type: number
                      minimum: 0
                      maximum: 1
                    goalRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - templateId
                    - sent
                    - opens
                    - clicks
                    - replies
                    - goals
                    - replyRate
                    - goalRate
                  additionalProperties: false
              promotion:
                type: object
                properties:
                  winnerTemplateId:
                    type: string
                  decidingMetric:
                    type: string
                    enum:
                      - goal
                      - open
                  confidence:
                    type: number
                    minimum: 0
                    maximum: 1
                  promotedAt:
                    type: string
                required:
                  - winnerTemplateId
                  - decidingMetric
                  - confidence
                  - promotedAt
                additionalProperties: false
            required:
              - stepId
              - stepName
              - sent
              - opens
              - clicks
              - replies
              - goals
              - replyRate
              - goalRate
              - avgGoalRate
            additionalProperties: false
        perSender:
          type: array
          items:
            type: object
            properties:
              connectorId:
                type: string
              email:
                type: string
              sent:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              bounced:
                type: integer
                minimum: 0
                maximum: 9007199254740991
              bounceRate:
                type: number
                minimum: 0
                maximum: 1
              globalWarmupScore:
                type: number
                minimum: 0
                maximum: 100
            required:
              - connectorId
              - email
              - sent
              - bounced
              - bounceRate
              - globalWarmupScore
            additionalProperties: false
        abTest:
          type: object
          properties:
            enabled:
              type: boolean
              const: true
            winner:
              anyOf:
                - type: string
                  enum:
                    - A
                    - B
                - type: "null"
            confidence:
              anyOf:
                - type: number
                  minimum: 0
                  maximum: 1
                - type: "null"
            lockedAt:
              anyOf:
                - type: string
                - type: "null"
            groups:
              type: object
              properties:
                A:
                  type: object
                  properties:
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    openRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - sent
                    - opens
                    - openRate
                  additionalProperties: false
                B:
                  type: object
                  properties:
                    sent:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    opens:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    openRate:
                      type: number
                      minimum: 0
                      maximum: 1
                  required:
                    - sent
                    - opens
                    - openRate
                  additionalProperties: false
              required:
                - A
                - B
              additionalProperties: false
          required:
            - enabled
            - winner
            - confidence
            - lockedAt
            - groups
          additionalProperties: false
      required:
        - campaignId
        - goal
        - startedAt
        - lastUpdatedAt
        - windowStart
        - windowEnd
        - totalContacts
        - goalKpis
        - engagementKpis
        - contactPipeline
        - upcomingPipeline
        - outcomeProjection
        - funnel
        - timeseries
        - perStep
        - perSender
      additionalProperties: false
    PublicCampaignEventsResponse:
      type: object
      properties:
        events:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
                minLength: 1
              timestamp:
                type: string
              title:
                type: string
              summary:
                type: string
              severity:
                type: string
              category:
                type: string
              actorUserId:
                anyOf:
                  - type: string
                  - type: "null"
              source:
                type: string
              count:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            required:
              - _id
              - timestamp
              - actorUserId
              - count
            additionalProperties: false
        nextCursor:
          anyOf:
            - type: string
            - type: "null"
        hasMore:
          type: boolean
        stats:
          type: object
          properties:
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            errors:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            warnings:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            drafts:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            sends:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            replies:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            bounces:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            discoveries:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - total
            - errors
            - warnings
            - drafts
            - sends
            - replies
            - bounces
            - discoveries
          additionalProperties: false
        searchClamped:
          type: boolean
      required:
        - events
        - nextCursor
        - hasMore
        - stats
        - searchClamped
      additionalProperties: false
    PublicCampaignProgressResponse:
      type: object
      properties:
        campaignId:
          type: string
          minLength: 1
        percentage:
          type: number
          minimum: 0
          maximum: 100
        completedComponents:
          type: array
          items:
            type: string
        missingComponents:
          type: array
          items:
            type: string
        missingRequiredComponents:
          type: array
          items:
            type: string
        missingOptionalComponents:
          type: array
          items:
            type: string
        launchReady:
          type: boolean
        nextQuestion:
          anyOf:
            - type: string
            - type: "null"
      required:
        - campaignId
        - percentage
        - completedComponents
        - missingComponents
        - missingRequiredComponents
        - missingOptionalComponents
        - launchReady
        - nextQuestion
      additionalProperties: false
    PublicCampaignWorkflowResponse:
      type: object
      properties:
        workflow:
          type: object
          properties:
            nodes:
              type: array
              items:
                type: object
                additionalProperties: true
            edges:
              type: array
              items:
                type: object
                additionalProperties: true
            templateGoal: {}
            lastSavedAt:
              type: string
              nullable: true
          required:
            - nodes
            - edges
          additionalProperties: false
      required:
        - workflow
      additionalProperties: false
    PublicCampaignSourcesResponse:
      type: object
      properties:
        sources:
          type: array
          items:
            type: object
            properties:
              sourceId:
                type: string
                minLength: 1
              type:
                type: string
                minLength: 1
              enabled:
                type: boolean
              config:
                type: object
                additionalProperties: true
              stats:
                type: object
                properties:
                  contacts:
                    type: integer
                    minimum: 0
                required:
                  - contacts
                additionalProperties: false
            required:
              - sourceId
              - type
              - enabled
              - config
              - stats
            additionalProperties: false
        totals:
          type: object
          properties:
            contacts:
              type: integer
              minimum: 0
          required:
            - contacts
          additionalProperties: false
      required:
        - sources
        - totals
      additionalProperties: false
    PublicCopilotSessionListResponse:
      type: object
      properties:
        sessions:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              workspaceId:
                type: string
                minLength: 1
              orgId:
                type: string
                minLength: 1
              userId:
                type: string
                minLength: 1
              title:
                anyOf:
                  - type: string
                  - type: "null"
              pinned:
                type: boolean
              model:
                anyOf:
                  - type: string
                  - type: "null"
              status:
                type: string
                enum:
                  - active
                  - archived
              surface:
                type: string
                enum:
                  - page
                  - panel
              contextSeed:
                anyOf:
                  - type: object
                    properties:
                      entityType:
                        type: string
                        minLength: 1
                      entityId:
                        type: string
                        minLength: 1
                    required:
                      - entityType
                      - entityId
                    additionalProperties: false
                  - type: "null"
              lastMessageAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: "null"
            required:
              - id
              - workspaceId
              - orgId
              - userId
              - title
              - pinned
              - model
              - status
              - surface
              - contextSeed
              - lastMessageAt
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 50
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - page
            - limit
            - total
            - totalPages
          additionalProperties: false
      required:
        - sessions
        - pagination
      additionalProperties: false
    PublicCopilotSessionGetResponse:
      type: object
      properties:
        session:
          type: object
          properties:
            id:
              type: string
              minLength: 1
            workspaceId:
              type: string
              minLength: 1
            orgId:
              type: string
              minLength: 1
            userId:
              type: string
              minLength: 1
            title:
              anyOf:
                - type: string
                - type: "null"
            pinned:
              type: boolean
            model:
              anyOf:
                - type: string
                - type: "null"
            status:
              type: string
              enum:
                - active
                - archived
            surface:
              type: string
              enum:
                - page
                - panel
            contextSeed:
              anyOf:
                - type: object
                  properties:
                    entityType:
                      type: string
                      minLength: 1
                    entityId:
                      type: string
                      minLength: 1
                  required:
                    - entityType
                    - entityId
                  additionalProperties: false
                - type: "null"
            lastMessageAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                - type: "null"
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                - type: "null"
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                - type: "null"
          required:
            - id
            - workspaceId
            - orgId
            - userId
            - title
            - pinned
            - model
            - status
            - surface
            - contextSeed
            - lastMessageAt
            - createdAt
            - updatedAt
          additionalProperties: false
        messages:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
              sessionId:
                type: string
                minLength: 1
              role:
                type: string
                enum:
                  - user
                  - assistant
              status:
                type: string
                enum:
                  - complete
                  - streaming
                  - error
                  - awaiting_approval
              parts:
                type: array
                items:
                  oneOf:
                    - type: object
                      properties:
                        type:
                          type: string
                          const: text
                        text:
                          type: string
                      required:
                        - type
                        - text
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: mention
                        entityType:
                          anyOf:
                            - type: string
                            - type: "null"
                        entityId:
                          anyOf:
                            - type: string
                            - type: "null"
                        label:
                          anyOf:
                            - type: string
                            - type: "null"
                      required:
                        - type
                        - entityType
                        - entityId
                        - label
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: attachment
                        name:
                          anyOf:
                            - type: string
                            - type: "null"
                        mime:
                          anyOf:
                            - type: string
                            - type: "null"
                        extractionStatus:
                          anyOf:
                            - type: string
                              enum:
                                - pending
                                - processing
                                - complete
                                - failed
                            - type: "null"
                      required:
                        - type
                        - name
                        - mime
                        - extractionStatus
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: tool_call
                        toolName:
                          anyOf:
                            - type: string
                            - type: "null"
                        tier:
                          anyOf:
                            - type: string
                              enum:
                                - read
                                - write
                                - send
                            - type: "null"
                      required:
                        - type
                        - toolName
                        - tier
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: tool_result
                        toolName:
                          anyOf:
                            - type: string
                            - type: "null"
                        summary:
                          anyOf:
                            - type: string
                            - type: "null"
                      required:
                        - type
                        - toolName
                        - summary
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: approval
                        approvalId:
                          anyOf:
                            - type: string
                            - type: "null"
                        toolName:
                          anyOf:
                            - type: string
                            - type: "null"
                        tier:
                          anyOf:
                            - type: string
                              enum:
                                - write
                                - send
                            - type: "null"
                        state:
                          anyOf:
                            - type: string
                              enum:
                                - pending
                                - approved
                                - edited_approved
                                - rejected
                                - expired
                                - answered
                                - invalidated
                            - type: "null"
                        rejectReason:
                          anyOf:
                            - type: string
                            - type: "null"
                      required:
                        - type
                        - approvalId
                        - toolName
                        - tier
                        - state
                        - rejectReason
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: component
                        componentType:
                          anyOf:
                            - type: string
                            - type: "null"
                      required:
                        - type
                        - componentType
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: marker
                        kind:
                          anyOf:
                            - type: string
                              enum:
                                - thinking
                                - tools
                                - compacted
                                - limit
                                - stopped
                            - type: "null"
                        label:
                          anyOf:
                            - type: string
                            - type: "null"
                      required:
                        - type
                        - kind
                        - label
                      additionalProperties: false
                    - type: object
                      properties:
                        type:
                          type: string
                          const: unknown
                      required:
                        - type
                      additionalProperties: false
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
                  - type: "null"
            required:
              - id
              - sessionId
              - role
              - status
              - parts
              - createdAt
              - updatedAt
            additionalProperties: false
        viewerRole:
          type: string
          enum:
            - author
            - viewer
      required:
        - session
        - messages
        - viewerRole
      additionalProperties: false
    PublicKnowledgeBaseGetResponse:
      type: object
      properties:
        knowledgeBase:
          type: object
          properties:
            id:
              type: string
            workspaceId:
              type: string
            name:
              type: string
            websiteUrl:
              type:
                - string
                - "null"
            customUrls:
              type: array
              items:
                type: string
            files:
              type: array
              items:
                type: object
                properties:
                  fileId:
                    type: string
                  originalName:
                    type: string
                  mimeType:
                    type: string
                  size:
                    type: number
                  status:
                    type: string
                  uploadedAt:
                    type:
                      - string
                      - "null"
                    format: date-time
                required:
                  - fileId
                  - originalName
                  - mimeType
                  - size
                  - status
                  - uploadedAt
                additionalProperties: false
            isDefault:
              type: boolean
            status:
              type: string
            processingSteps:
              type: array
              items:
                type: object
                additionalProperties: true
            processingStep:
              type:
                - string
                - "null"
            kgStats:
              type: object
              additionalProperties: true
            errorMessage:
              type:
                - string
                - "null"
            errorCode:
              type:
                - string
                - "null"
            wafProvider:
              type:
                - string
                - "null"
            processedAt:
              type:
                - string
                - "null"
              format: date-time
            createdAt:
              type:
                - string
                - "null"
              format: date-time
            updatedAt:
              type:
                - string
                - "null"
              format: date-time
          required:
            - id
            - workspaceId
            - name
            - websiteUrl
            - customUrls
            - files
            - isDefault
            - status
            - processingSteps
            - processingStep
            - kgStats
            - errorMessage
            - errorCode
            - wafProvider
            - processedAt
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - knowledgeBase
      additionalProperties: false
    PublicKnowledgeBaseListResponse:
      type: object
      properties:
        knowledgeBases:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              workspaceId:
                type: string
              name:
                type: string
              websiteUrl:
                type:
                  - string
                  - "null"
              customUrls:
                type: array
                items:
                  type: string
              files:
                type: array
                items:
                  type: object
                  properties:
                    fileId:
                      type: string
                    originalName:
                      type: string
                    mimeType:
                      type: string
                    size:
                      type: number
                    status:
                      type: string
                    uploadedAt:
                      type:
                        - string
                        - "null"
                      format: date-time
                  required:
                    - fileId
                    - originalName
                    - mimeType
                    - size
                    - status
                    - uploadedAt
                  additionalProperties: false
              isDefault:
                type: boolean
              status:
                type: string
              processingSteps:
                type: array
                items:
                  type: object
                  additionalProperties: true
              processingStep:
                type:
                  - string
                  - "null"
              kgStats:
                type: object
                additionalProperties: true
              errorMessage:
                type:
                  - string
                  - "null"
              errorCode:
                type:
                  - string
                  - "null"
              wafProvider:
                type:
                  - string
                  - "null"
              processedAt:
                type:
                  - string
                  - "null"
                format: date-time
              createdAt:
                type:
                  - string
                  - "null"
                format: date-time
              updatedAt:
                type:
                  - string
                  - "null"
                format: date-time
            required:
              - id
              - workspaceId
              - name
              - websiteUrl
              - customUrls
              - files
              - isDefault
              - status
              - processingSteps
              - processingStep
              - kgStats
              - errorMessage
              - errorCode
              - wafProvider
              - processedAt
              - createdAt
              - updatedAt
            additionalProperties: false
      required:
        - knowledgeBases
      additionalProperties: false
    PublicCompanyGetResponse:
      type: object
      properties:
        company:
          type: object
          properties:
            id:
              type: string
              pattern: ^[0-9a-fA-F]{24}$
            workspaceId:
              type: string
              minLength: 1
            name:
              type: string
            domain:
              anyOf:
                - type: string
                - type: "null"
            size:
              anyOf:
                - type: number
                - type: "null"
            industry:
              anyOf:
                - type: string
                - type: "null"
            ownerId:
              anyOf:
                - type: string
                  minLength: 1
                - type: "null"
            mergedInto:
              anyOf:
                - type: string
                  pattern: ^[0-9a-fA-F]{24}$
                - type: "null"
            createdAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - type: "null"
            updatedAt:
              anyOf:
                - type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                - type: "null"
          required:
            - id
            - workspaceId
            - name
            - domain
            - size
            - industry
            - ownerId
            - mergedInto
            - createdAt
            - updatedAt
          additionalProperties: false
      required:
        - company
      additionalProperties: false
    PublicCompanyListResponse:
      type: object
      properties:
        companies:
          maxItems: 100
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^[0-9a-fA-F]{24}$
              workspaceId:
                type: string
                minLength: 1
              name:
                type: string
              domain:
                anyOf:
                  - type: string
                  - type: "null"
              size:
                anyOf:
                  - type: number
                  - type: "null"
              industry:
                anyOf:
                  - type: string
                  - type: "null"
              ownerId:
                anyOf:
                  - type: string
                    minLength: 1
                  - type: "null"
              mergedInto:
                anyOf:
                  - type: string
                    pattern: ^[0-9a-fA-F]{24}$
                  - type: "null"
              createdAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
              updatedAt:
                anyOf:
                  - type: string
                    format: date-time
                    pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  - type: "null"
            required:
              - id
              - workspaceId
              - name
              - domain
              - size
              - industry
              - ownerId
              - mergedInto
              - createdAt
              - updatedAt
            additionalProperties: false
        pagination:
          type: object
          properties:
            page:
              type: integer
              minimum: 1
              maximum: 9007199254740991
            limit:
              type: integer
              minimum: 1
              maximum: 100
            total:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            totalPages:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
            - page
            - limit
            - total
            - totalPages
          additionalProperties: false
      required:
        - companies
        - pagination
      additionalProperties: false
    Pagination:
      type: object
      properties:
        page:
          type: integer
        limit:
          type: integer
        total:
          type: integer
        totalPages:
          type: integer
      required:
        - page
        - limit
        - total
        - totalPages
paths:
  /api/v1/organizations:
    get:
      operationId: getApiV1Organizations
      summary: PublicApiListOrganizations
      tags:
        - Organizations
      security:
        - developerKeyBearer: []
      parameters: []
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicOrganizationListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/api-keys:
    post:
      operationId: createApiKey
      summary: PublicApiCreateApiKey
      tags:
        - API Keys
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "201":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CreateApiKeyResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateApiKeyRequest"
    get:
      operationId: listApiKeys
      summary: PublicApiListApiKeys
      tags:
        - API Keys
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10000
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ListApiKeysResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/api-keys/{keyId}:
    delete:
      operationId: revokeApiKey
      summary: PublicApiRevokeApiKey
      tags:
        - API Keys
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: keyId
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RevokeApiKeyResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing:
    get:
      operationId: getApiV1OrganizationsOrgIdBilling
      summary: PublicApiGetBilling
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicBillingOverviewResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing/checkout:
    post:
      operationId: postApiV1OrganizationsOrgIdBillingCheckout
      summary: PublicApiCreateBillingCheckout
      tags:
        - Billing
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                country:
                  type: string
                  minLength: 2
                  maxLength: 2
                returnPath:
                  type: string
                amount:
                  type: integer
                  minimum: 0
                  maximum: 9007199254740991
              additionalProperties: false
  /api/v1/organizations/{orgId}/billing/credits:
    get:
      operationId: getBillingCreditBalance
      summary: PublicApiGetCreditBalance
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicBillingCreditsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing/credits/history:
    get:
      operationId: listBillingCreditHistory
      summary: PublicApiGetCreditHistory
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: from
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: action
          in: query
          required: false
          schema:
            type: string
            enum:
              - manual_email
              - ai_email_standard
              - ai_email_premium
              - lead_find
              - lead_deep_enrich
              - maps_find
              - maps_enrich
              - ai_research_standard
              - ai_research_premium
              - ai_signature_polish
              - learning_sample_batch
              - learning_rerank_draft
              - learning_model_refresh
              - contact_cleaning
              - contact_cleaning_refund
              - copilot_turn
              - copilot_contact_import
              - copilot_research
              - copilot_briefing
              - thin_domain_enrichment
              - admin_refund
        - name: campaignId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCreditHistoryResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing/credits/usage-summary:
    get:
      operationId: getBillingUsageSummary
      summary: PublicApiGetUsageSummary
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 30
        - name: from
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
        - name: to
          in: query
          required: false
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicUsageSummaryResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing/payments:
    get:
      operationId: getApiV1OrganizationsOrgIdBillingPayments
      summary: PublicApiGetPaymentHistory
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicPaymentHistoryResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "502":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/billing/top-up:
    post:
      operationId: postApiV1OrganizationsOrgIdBillingTopup
      summary: PublicApiPurchaseTopUp
      tags:
        - Billing
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                amountUsd:
                  type: integer
                  minimum: 50
                  maximum: 10000
              required:
                - amountUsd
              additionalProperties: false
  /api/v1/organizations/{orgId}/billing/top-ups:
    get:
      operationId: getApiV1OrganizationsOrgIdBillingTopups
      summary: PublicApiGetTopUpHistory
      tags:
        - Billing
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicTopUpHistoryResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/domains:
    post:
      operationId: postApiV1OrganizationsOrgIdDomains
      summary: PublicApiAddDomain
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  minLength: 3
                  maxLength: 253
                maxRole:
                  type: string
                  minLength: 1
                maxRoleSlug:
                  type: string
                  minLength: 1
              required:
                - domain
              additionalProperties: false
    get:
      operationId: getApiV1OrganizationsOrgIdDomains
      summary: PublicApiListDomains
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/domains/{domainId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdDomainsDomainId
      summary: PublicApiRemoveDomain
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: domainId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/groups:
    post:
      operationId: postApiV1OrganizationsOrgIdGroups
      summary: PublicApiCreateGroup
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                permissions:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                      - campaign:create
                      - campaign:edit
                      - campaign:delete
                      - campaign:view
                      - campaign:launch
                      - campaign:pause
                      - contact:create
                      - contact:edit
                      - contact:delete
                      - contact:view
                      - contact:import
                      - contact_list:create
                      - contact_list:edit
                      - contact_list:delete
                      - contact_list:view
                      - connector:connect
                      - connector:disconnect
                      - connector:view
                      - inbox:view
                      - inbox:reply
                      - inbox:approve_draft
                      - inbox:reject_draft
                      - kb:create
                      - kb:edit
                      - kb:delete
                      - kb:view
                      - offering:create
                      - offering:edit
                      - offering:delete
                      - offering:view
                      - tracking_domain:create
                      - tracking_domain:delete
                      - tracking_domain:view
                      - domain_auth:view
                      - domain_auth:create
                      - deal:create
                      - deal:edit
                      - deal:delete
                      - deal:view
                      - deal:move_stage
                      - deal:set_status
                      - pipeline:create
                      - pipeline:edit
                      - pipeline:delete
                      - pipeline:view
                      - company:create
                      - company:edit
                      - company:delete
                      - company:view
                      - activity:create
                      - activity:view
                      - scheduled_activity:create
                      - scheduled_activity:edit
                      - scheduled_activity:delete
                      - scheduled_activity:view
                      - org:settings
                      - org:billing
                      - org:transfer
                      - org:delete
                      - org:view
                      - member:invite
                      - member:remove
                      - member:suspend
                      - member:view
                      - group:create
                      - group:edit
                      - group:delete
                      - group:assign
                      - domain_allowlist:view
                      - domain_allowlist:manage
                      - workspace:create
                      - workspace:view
                      - workspace:delete
                      - workspace:settings
                      - api_key:view
                      - api_key:create
                      - api_key:revoke
              required:
                - name
                - permissions
              additionalProperties: false
    get:
      operationId: getApiV1OrganizationsOrgIdGroups
      summary: PublicApiListGroups
      tags:
        - Team
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicTeamGroupsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/groups/{groupId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdGroupsGroupId
      summary: PublicApiDeleteGroup
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: groupId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      operationId: patchApiV1OrganizationsOrgIdGroupsGroupId
      summary: PublicApiUpdateGroup
      tags:
        - Team
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: groupId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicTeamGroupMutationResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    name:
                      type: string
                      minLength: 1
                      maxLength: 80
                    permissions:
                      minItems: 1
                      maxItems: 77
                      type: array
                      items:
                        type: string
                        enum:
                          - campaign:create
                          - campaign:edit
                          - campaign:delete
                          - campaign:view
                          - campaign:launch
                          - campaign:pause
                          - contact:create
                          - contact:edit
                          - contact:delete
                          - contact:view
                          - contact:import
                          - contact_list:create
                          - contact_list:edit
                          - contact_list:delete
                          - contact_list:view
                          - connector:connect
                          - connector:disconnect
                          - connector:view
                          - inbox:view
                          - inbox:reply
                          - inbox:approve_draft
                          - inbox:reject_draft
                          - kb:create
                          - kb:edit
                          - kb:delete
                          - kb:view
                          - offering:create
                          - offering:edit
                          - offering:delete
                          - offering:view
                          - tracking_domain:create
                          - tracking_domain:delete
                          - tracking_domain:view
                          - domain_auth:view
                          - domain_auth:create
                          - deal:create
                          - deal:edit
                          - deal:delete
                          - deal:view
                          - deal:move_stage
                          - deal:set_status
                          - pipeline:create
                          - pipeline:edit
                          - pipeline:delete
                          - pipeline:view
                          - company:create
                          - company:edit
                          - company:delete
                          - company:view
                          - activity:create
                          - activity:view
                          - scheduled_activity:create
                          - scheduled_activity:edit
                          - scheduled_activity:delete
                          - scheduled_activity:view
                          - org:settings
                          - org:billing
                          - org:transfer
                          - org:delete
                          - org:view
                          - member:invite
                          - member:remove
                          - member:suspend
                          - member:view
                          - group:create
                          - group:edit
                          - group:delete
                          - group:assign
                          - domain_allowlist:view
                          - domain_allowlist:manage
                          - workspace:create
                          - workspace:view
                          - workspace:delete
                          - workspace:settings
                          - api_key:view
                          - api_key:create
                          - api_key:revoke
                  required:
                    - targetVersion
                    - name
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    name:
                      type: string
                      minLength: 1
                      maxLength: 80
                    permissions:
                      minItems: 1
                      maxItems: 77
                      type: array
                      items:
                        type: string
                        enum:
                          - campaign:create
                          - campaign:edit
                          - campaign:delete
                          - campaign:view
                          - campaign:launch
                          - campaign:pause
                          - contact:create
                          - contact:edit
                          - contact:delete
                          - contact:view
                          - contact:import
                          - contact_list:create
                          - contact_list:edit
                          - contact_list:delete
                          - contact_list:view
                          - connector:connect
                          - connector:disconnect
                          - connector:view
                          - inbox:view
                          - inbox:reply
                          - inbox:approve_draft
                          - inbox:reject_draft
                          - kb:create
                          - kb:edit
                          - kb:delete
                          - kb:view
                          - offering:create
                          - offering:edit
                          - offering:delete
                          - offering:view
                          - tracking_domain:create
                          - tracking_domain:delete
                          - tracking_domain:view
                          - domain_auth:view
                          - domain_auth:create
                          - deal:create
                          - deal:edit
                          - deal:delete
                          - deal:view
                          - deal:move_stage
                          - deal:set_status
                          - pipeline:create
                          - pipeline:edit
                          - pipeline:delete
                          - pipeline:view
                          - company:create
                          - company:edit
                          - company:delete
                          - company:view
                          - activity:create
                          - activity:view
                          - scheduled_activity:create
                          - scheduled_activity:edit
                          - scheduled_activity:delete
                          - scheduled_activity:view
                          - org:settings
                          - org:billing
                          - org:transfer
                          - org:delete
                          - org:view
                          - member:invite
                          - member:remove
                          - member:suspend
                          - member:view
                          - group:create
                          - group:edit
                          - group:delete
                          - group:assign
                          - domain_allowlist:view
                          - domain_allowlist:manage
                          - workspace:create
                          - workspace:view
                          - workspace:delete
                          - workspace:settings
                          - api_key:view
                          - api_key:create
                          - api_key:revoke
                  required:
                    - targetVersion
                    - permissions
                  additionalProperties: false
  /api/v1/organizations/{orgId}/invitations:
    post:
      operationId: postApiV1OrganizationsOrgIdInvitations
      summary: PublicApiAddInvitation
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                role:
                  type: string
                  enum:
                    - admin
                    - manager
                    - member
                    - viewer
                groupSlug:
                  type: string
                  minLength: 1
                workspaceScope:
                  type: string
                  enum:
                    - all
                    - specific
                workspaceIds:
                  type: array
                  items:
                    type: string
              required:
                - email
              additionalProperties: false
    get:
      operationId: getApiV1OrganizationsOrgIdInvitations
      summary: PublicApiListInvitations
      tags:
        - Team
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - pending
              - all
            default: pending
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicTeamInvitationsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/invitations/{invitationId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdInvitationsInvitationId
      summary: PublicApiCancelInvitation
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: invitationId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/members:
    get:
      operationId: listTeamMembers
      summary: PublicApiListMembers
      tags:
        - Team
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: search
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
            default: ""
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 9007199254740991
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicTeamMembersResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/teams/api-usage:
    get:
      operationId: getApiUsage
      summary: PublicApiGetApiUsage
      tags:
        - API Keys
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: days
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 90
            default: 7
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiUsageResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspaces
      summary: PublicApiListWorkspaces
      tags:
        - Organizations
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicWorkspaceListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/activities:
    get:
      operationId: listActivities
      summary: PublicApiListActivities
      tags:
        - Activities
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: contactId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: companyId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - deal_stage
              - deal_won
              - deal_lost
              - note
              - call
              - meeting
              - task
              - file
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicActivityListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdActivities
      summary: PublicApiLogActivity
      tags:
        - Activities
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - note
                    - call
                    - meeting
                    - task
                    - file
                contactId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                companyId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                dealId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                payload:
                  default: {}
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties: {}
              required:
                - type
                - contactId
                - payload
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/alerts:
    get:
      operationId: listAlerts
      summary: PublicApiListAlerts
      tags:
        - Alerts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: category
          in: query
          required: false
          schema:
            type: string
            enum:
              - Mailboxes
              - AI
              - Campaigns
              - Billing
        - name: severity
          in: query
          required: false
          schema:
            type: string
            enum:
              - critical
              - warning
              - info
              - success
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 100
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicAlertListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/alerts/{alertId}/ack:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdAlertsAlertIdAck
      summary: PublicApiAckAlert
      tags:
        - Alerts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: alertId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/alerts/{alertId}/resolve:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdAlertsAlertIdResolve
      summary: PublicApiResolveAlert
      tags:
        - Alerts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: alertId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns:
    post:
      operationId: createCampaign
      summary: PublicApiCreateCampaign
      description: Creates one campaign synchronously. The canonical JSON request body is limited to 32768 UTF-8 bytes.
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: false
          schema:
            type: string
            minLength: 1
      responses:
        "201":
          description: Campaign created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CampaignResponse"
        "400":
          description: Bad request
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Not found
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Conflict
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "413":
          description: Payload too large
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Service unavailable
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreateCampaignRequest"
    get:
      operationId: listCampaigns
      summary: PublicApiListCampaigns
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - draft
              - configuring
              - ready
              - active
              - paused
              - completed
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CampaignListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}:
    get:
      operationId: getCampaign
      summary: PublicApiGetCampaign
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/CampaignResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignId
      summary: PublicApiUpdateCampaign
      tags:
        - Campaigns
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/actions/{action}:
    post:
      operationId: runCampaignAction
      summary: PublicApiCampaignAction
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
        - name: action
          in: path
          required: true
          schema:
            type: string
            enum:
              - start
              - pause
              - resume
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StartCampaignActionSuccessResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Launch pending, unknown, or blocked response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StartCampaignActionConflictResponse"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StartCampaignActionRequest"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/analytics:
    get:
      operationId: getCampaignAnalytics
      summary: PublicApiGetCampaignAnalytics
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: range
          in: query
          required: false
          schema:
            type: string
            enum:
              - 7d
              - 30d
              - all
            default: all
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCampaignAnalyticsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/events:
    get:
      operationId: getCampaignEvents
      summary: PublicApiGetCampaignEvents
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: since
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: until
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: severity
          in: query
          required: false
          schema:
            type: string
        - name: category
          in: query
          required: false
          schema:
            type: string
        - name: search
          in: query
          required: false
          schema:
            type: string
            maxLength: 100
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCampaignEventsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/leads:
    get:
      operationId: listCampaignLeads
      summary: PublicApiListCampaignLeads
      tags:
        - Campaigns
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/learning/activity:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdLearningActivity
      summary: PublicApiGetLearningActivity
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            format: date-time
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningActivityResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/learning/auto-mode-state:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdLearningAutomodestate
      summary: PublicApiGetAutoModeState
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningAutoModeStateResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/learning/graph:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdLearningGraph
      summary: PublicApiGetLearningGraph
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: topN
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 20
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningGraphResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/learning/outcomes:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdLearningOutcomes
      summary: PublicApiGetLearningOutcomes
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningOutcomesResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/learning/overview:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdLearningOverview
      summary: PublicApiGetLearningOverview
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: segmentKey
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningOverviewResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/progress:
    get:
      operationId: getCampaignProgress
      summary: PublicApiGetCampaignProgress
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCampaignProgressResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/sources:
    get:
      operationId: getCampaignSources
      summary: PublicApiGetCampaignSources
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCampaignSourcesResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/campaigns/{campaignId}/workflow:
    get:
      operationId: getCampaignWorkflow
      summary: PublicApiGetCampaignWorkflow
      tags:
        - Campaigns
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCampaignWorkflowResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    put:
      operationId: putApiV1OrganizationsOrgIdWorkspacesWsIdCampaignsCampaignIdWorkflow
      summary: PublicApiSaveCampaignWorkflow
      tags:
        - Campaigns
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: campaignId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/companies:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdCompanies
      summary: PublicApiCreateCompany
      tags:
        - Companies
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                domain:
                  type: string
                  minLength: 1
                  maxLength: 255
                size:
                  type: number
                  minimum: 0
                industry:
                  type: string
                  minLength: 1
                  maxLength: 100
                ownerId:
                  type: string
                  minLength: 1
              required:
                - name
              additionalProperties: false
    get:
      operationId: listCompanies
      summary: PublicApiListCompanies
      tags:
        - Companies
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 9007199254740991
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCompanyListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/companies/{companyId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdCompaniesCompanyId
      summary: PublicApiDeleteCompany
      tags:
        - Companies
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getCompany
      summary: PublicApiGetCompany
      tags:
        - Companies
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: companyId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCompanyGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdCompaniesCompanyId
      summary: PublicApiUpdateCompany
      tags:
        - Companies
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 200
                domain:
                  type: string
                  minLength: 1
                  maxLength: 255
                size:
                  type: number
                  minimum: 0
                industry:
                  type: string
                  minLength: 1
                  maxLength: 100
                ownerId:
                  type: string
                  minLength: 1
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/companies/{companyId}/duplicates:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdCompaniesCompanyIdDuplicates
      summary: PublicApiListCompanyDuplicates
      tags:
        - Companies
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: companyId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/companies/merge:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdCompaniesMerge
      summary: PublicApiMergeCompanies
      tags:
        - Companies
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdConnectors
      summary: PublicApiListConnectors
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdConnectorsConnectorId
      summary: PublicApiDeleteConnector
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}/display-name:
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdConnectorsConnectorIdDisplayname
      summary: PublicApiUpdateConnectorDisplayName
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  maxLength: 100
              required:
                - displayName
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}/sender-profile:
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdConnectorsConnectorIdSenderprofile
      summary: PublicApiUpdateConnectorSenderProfile
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                displayName:
                  type: string
                  maxLength: 100
                title:
                  type: string
                  maxLength: 100
                department:
                  type: string
                  maxLength: 100
                contactNumber:
                  anyOf:
                    - type: string
                      maxLength: 30
                      pattern: ^\+?[\d\s()-]{4,30}$
                    - type: string
                      const: ""
                socialLinkedin:
                  type: string
                  maxLength: 200
                socialTwitter:
                  type: string
                  maxLength: 200
                socialWebsite:
                  type: string
                  maxLength: 200
                signature:
                  type: string
                  maxLength: 5000
                signatureFields:
                  type: object
                  properties:
                    name:
                      default: true
                      type: boolean
                    title:
                      default: false
                      type: boolean
                    department:
                      default: false
                      type: boolean
                    phone:
                      default: false
                      type: boolean
                    company:
                      default: false
                      type: boolean
                    website:
                      default: false
                      type: boolean
                    address:
                      default: false
                      type: boolean
                    linkedin:
                      default: false
                      type: boolean
                    twitter:
                      default: false
                      type: boolean
                  required:
                    - name
                    - title
                    - department
                    - phone
                    - company
                    - website
                    - address
                    - linkedin
                    - twitter
                  additionalProperties: false
                signatureEnabled:
                  type: boolean
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}/settings:
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdConnectorsConnectorIdSettings
      summary: PublicApiUpdateConnectorSettings
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sendingConfig:
                  type: object
                  properties:
                    dailyLimit:
                      type: integer
                      minimum: 20
                      maximum: 500
                    autoAdjust:
                      type: boolean
                    userDailySendLimit:
                      anyOf:
                        - type: integer
                          minimum: 20
                          maximum: 500
                        - type: "null"
                  additionalProperties: false
                syncSettings:
                  type: object
                  properties:
                    twoWaySync:
                      type: boolean
                    historicalSyncWindowDays:
                      type: integer
                      minimum: 3
                      maximum: 730
                    visibility:
                      type: string
                      enum:
                        - shared
                        - private
                  additionalProperties: false
                resetBackfillCursor:
                  type: boolean
                  const: true
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}/test:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdConnectorsConnectorIdTest
      summary: PublicApiTestEmailConnection
      tags:
        - Connectors
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/connectors/{connectorId}/warmup:
    get:
      operationId: getConnectorWarmupStatus
      summary: PublicApiGetWarmupStatus
      tags:
        - Warmup
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: connectorId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicWarmupStatusResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-exports:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdContactexports
      summary: PublicApiContactExports
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-fields:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdContactfields
      summary: PublicApiListContactFields
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactFieldsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-imports:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdContactimports
      summary: PublicApiContactImports
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contacts:
                  minItems: 1
                  maxItems: 10000
                  type: array
                  items:
                    type: object
                    properties:
                      email:
                        type: string
                        maxLength: 255
                      firstName:
                        type: string
                        maxLength: 100
                      lastName:
                        type: string
                        maxLength: 100
                      fullName:
                        type: string
                        maxLength: 200
                      headline:
                        type: string
                        maxLength: 500
                      linkedinUrl:
                        type: string
                        maxLength: 500
                      company:
                        anyOf:
                          - type: string
                            maxLength: 200
                          - type: object
                            properties:
                              name:
                                type: string
                                maxLength: 200
                              website:
                                type: string
                                maxLength: 500
                              domain:
                                type: string
                                maxLength: 253
                              linkedinUrl:
                                type: string
                                maxLength: 500
                              industry:
                                type: string
                                maxLength: 200
                              size:
                                type: integer
                                minimum: 0
                                maximum: 9007199254740991
                            additionalProperties: false
                      title:
                        type: string
                        maxLength: 200
                      phone:
                        type: string
                        maxLength: 50
                      location:
                        type: object
                        properties:
                          city:
                            type: string
                            maxLength: 100
                          state:
                            type: string
                            maxLength: 100
                          country:
                            type: string
                            maxLength: 100
                        additionalProperties: false
                      enrichment:
                        type: object
                        properties:
                          source:
                            type: string
                            maxLength: 100
                          enrichedAt:
                            type: string
                            format: date-time
                            pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                        additionalProperties: false
                      timezone:
                        type: string
                        maxLength: 64
                      customFields:
                        type: object
                        propertyNames:
                          type: string
                          maxLength: 50
                        additionalProperties:
                          anyOf:
                            - anyOf:
                                - type: string
                                  maxLength: 2000
                                - type: number
                                - type: boolean
                                - type: "null"
                            - maxItems: 50
                              type: array
                              items:
                                anyOf:
                                  - type: string
                                    maxLength: 2000
                                  - type: number
                                  - type: boolean
                                  - type: "null"
                      contactKind:
                        type: string
                        enum:
                          - person
                          - business
                      tags:
                        maxItems: 20
                        type: array
                        items:
                          type: string
                          maxLength: 50
                    additionalProperties: false
                listId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                source:
                  default: csv-import
                  type: string
                  enum:
                    - csv-import
                    - ai-leads
                    - webhook
                    - signal
                tags:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    maxLength: 50
                idempotencyKey:
                  type: string
                  minLength: 8
                  maxLength: 200
              required:
                - contacts
                - listId
                - source
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-lists:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdContactlists
      summary: PublicApiCreateContactList
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdContactlists
      summary: PublicApiListContactLists
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactListsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-lists/{listId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdContactlistsListId
      summary: PublicApiDeleteContactList
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: listId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdContactlistsListId
      summary: PublicApiUpdateContactList
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: listId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-tags:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdContacttags
      summary: PublicApiDeleteContactTag
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdContacttags
      summary: PublicApiListContactTags
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactTagsResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contact-tags/rename:
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdContacttagsRename
      summary: PublicApiRenameContactTag
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contacts:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdContacts
      summary: PublicApiCreateContact
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  maxLength: 255
                  format: email
                  pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                firstName:
                  type: string
                  maxLength: 100
                lastName:
                  type: string
                  maxLength: 100
                fullName:
                  type: string
                  maxLength: 200
                headline:
                  type: string
                  maxLength: 500
                linkedinUrl:
                  type: string
                  maxLength: 500
                company:
                  anyOf:
                    - type: string
                      maxLength: 200
                    - type: object
                      properties:
                        name:
                          type: string
                          maxLength: 200
                        website:
                          type: string
                          maxLength: 500
                        domain:
                          type: string
                          maxLength: 253
                        linkedinUrl:
                          type: string
                          maxLength: 500
                        industry:
                          type: string
                          maxLength: 200
                        size:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                      additionalProperties: false
                title:
                  type: string
                  maxLength: 200
                phone:
                  type: string
                  maxLength: 50
                location:
                  type: object
                  properties:
                    city:
                      type: string
                      maxLength: 100
                    state:
                      type: string
                      maxLength: 100
                    country:
                      type: string
                      maxLength: 100
                  additionalProperties: false
                enrichment:
                  type: object
                  properties:
                    source:
                      type: string
                      maxLength: 100
                    enrichedAt:
                      type: string
                      format: date-time
                      pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                  additionalProperties: false
                timezone:
                  type: string
                  maxLength: 64
                customFields:
                  type: object
                  propertyNames:
                    type: string
                    maxLength: 50
                  additionalProperties: {}
                listId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                source:
                  default: webhook
                  type: string
                  enum:
                    - csv-import
                    - ai-leads
                    - webhook
                    - signal
                tags:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    maxLength: 50
              required:
                - email
                - listId
                - source
              additionalProperties: false
    get:
      operationId: listContacts
      summary: PublicApiListContacts
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: sortBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - createdAt
              - email
              - firstName
              - company
            default: createdAt
        - name: sortOrder
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: search
          in: query
          required: false
          schema:
            type: string
            maxLength: 100
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - bounced
              - unsubscribed
        - name: source
          in: query
          required: false
          schema:
            type: string
            enum:
              - csv-import
              - ai-leads
              - webhook
              - signal
              - manual
        - name: tags
          in: query
          required: false
          schema:
            type: string
            maxLength: 500
        - name: company
          in: query
          required: false
          schema:
            type: string
            maxLength: 200
        - name: listId
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: verificationStatus
          in: query
          required: false
          schema:
            type: string
            enum:
              - clean
              - risky
              - dirty
              - unknown
        - name: mobileOnly
          in: query
          required: false
          schema:
            type: boolean
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdContactsContactId
      summary: PublicApiDeleteContact
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: contactId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getContact
      summary: PublicApiGetContact
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: contactId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdContactsContactId
      summary: PublicApiUpdateContact
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: contactId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/{contactId}/overview:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdContactsContactIdOverview
      summary: PublicApiGetContactOverview
      tags:
        - Contacts
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: contactId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicContactOverviewResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/contacts/merge:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdContactsMerge
      summary: PublicApiMergeContacts
      tags:
        - Contacts
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdCopilotSessions
      summary: PublicApiCreateCopilotSession
      tags:
        - Copilot
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: listCopilotSessions
      summary: PublicApiListCopilotSessions
      tags:
        - Copilot
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - active
              - archived
            default: active
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCopilotSessionListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions/{sessionId}:
    get:
      operationId: getCopilotSession
      summary: PublicApiGetCopilotSession
      tags:
        - Copilot
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicCopilotSessionGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions/{sessionId}/messages:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdCopilotSessionsSessionIdMessages
      summary: PublicApiPostCopilotMessage
      tags:
        - Copilot
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: sessionId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/dashboard:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdDashboard
      summary: PublicApiGetWorkspaceDashboard
      tags:
        - Dashboard
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/deal-forecast:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdDealforecast
      summary: PublicApiGetDealForecast
      tags:
        - Deals
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/deals:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdDeals
      summary: PublicApiCreateDeal
      tags:
        - Deals
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contactId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                companyId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                value:
                  type: number
                  minimum: 0
                currency:
                  default: USD
                  type: string
                  minLength: 1
                  maxLength: 10
                pipelineId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                stageId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                expectedClose:
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                ownerId:
                  type: string
                  minLength: 1
                labels:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 50
              required:
                - contactId
                - value
                - currency
                - pipelineId
                - ownerId
              additionalProperties: false
    get:
      operationId: listDeals
      summary: PublicApiListDeals
      tags:
        - Deals
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 10
        - name: stage
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: pipeline
          in: query
          required: false
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
        - name: owner
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: q
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicDealListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/deals/{dealId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdDealsDealId
      summary: PublicApiDeleteDeal
      tags:
        - Deals
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: dealId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getDeal
      summary: PublicApiGetDeal
      tags:
        - Deals
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: dealId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicDealGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdDealsDealId
      summary: PublicApiUpdateDeal
      tags:
        - Deals
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: dealId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                contactId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                companyId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                value:
                  type: number
                  minimum: 0
                currency:
                  type: string
                  minLength: 1
                  maxLength: 10
                expectedClose:
                  type: string
                  format: date-time
                  pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
                ownerId:
                  type: string
                  minLength: 1
                labels:
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 50
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/deals/{dealId}/move:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdDealsDealIdMove
      summary: PublicApiMoveDeal
      tags:
        - Deals
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: dealId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                stageId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
              required:
                - stageId
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/email-auth:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdEmailauth
      summary: PublicApiGetEmailAuthStatus
      tags:
        - Email Authentication
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/drafts/{emailId}/approve:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxDraftsEmailIdApprove
      summary: PublicApiApproveInboxDraft
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: emailId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties: {}
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/drafts/{emailId}/reject:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxDraftsEmailIdReject
      summary: PublicApiRejectInboxDraft
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: emailId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                reason:
                  type: string
                  maxLength: 500
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads:
    get:
      operationId: listInboxThreads
      summary: PublicApiListInboxThreads
      tags:
        - Inbox
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: tab
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - needs-approval
              - unread
              - replies
              - completed
              - active
              - bounced
              - failed
              - warmup
            default: all
        - name: senderConnectorId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: campaignId
          in: query
          required: false
          schema:
            type: string
            minLength: 1
        - name: category
          in: query
          required: false
          schema:
            type: string
            enum:
              - outreaching
              - marketing
              - warmup
        - name: from
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 64
        - name: to
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 64
        - name: sort
          in: query
          required: false
          schema:
            type: string
            enum:
              - newest
              - oldest
            default: newest
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10000
            default: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicInboxThreadListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads/{threadId}:
    get:
      operationId: getInboxThread
      summary: PublicApiGetInboxThread
      tags:
        - Inbox
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: threadId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 1024
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicInboxThreadDetailResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads/{threadId}/assign:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxThreadsThreadIdAssign
      summary: PublicApiAssignInboxThread
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: threadId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads/{threadId}/read:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxThreadsThreadIdRead
      summary: PublicApiMarkInboxThreadRead
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: threadId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads/{threadId}/reply:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxThreadsThreadIdReply
      summary: PublicApiReplyToInboxThread
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: threadId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                connectorId:
                  type: string
                  pattern: ^[0-9a-fA-F]{24}$
                subject:
                  type: string
                  minLength: 1
                  maxLength: 300
                body:
                  type: string
                  minLength: 1
                  maxLength: 50000
              required:
                - connectorId
                - subject
                - body
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/inbox/threads/bulk-read:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdInboxThreadsBulkread
      summary: PublicApiBulkMarkInboxThreadsRead
      tags:
        - Inbox
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/knowledge-bases:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdKnowledgebases
      summary: PublicApiCreateKnowledgeBase
      tags:
        - Knowledge Bases
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                description:
                  type: string
                  maxLength: 2000
                websiteUrl:
                  type: string
                isDefault:
                  default: false
                  type: boolean
              required:
                - name
                - isDefault
              additionalProperties: false
    get:
      operationId: listKnowledgeBases
      summary: PublicApiListKnowledgeBases
      tags:
        - Knowledge Bases
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicKnowledgeBaseListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/knowledge-bases/{kbId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdKnowledgebasesKbId
      summary: PublicApiDeleteKnowledgeBase
      tags:
        - Knowledge Bases
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: kbId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getKnowledgeBase
      summary: PublicApiGetKnowledgeBase
      tags:
        - Knowledge Bases
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: kbId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicKnowledgeBaseGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdKnowledgebasesKbId
      summary: PublicApiUpdateKnowledgeBase
      tags:
        - Knowledge Bases
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: kbId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                websiteUrl:
                  type: string
                isDefault:
                  type: boolean
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/knowledge-bases/{kbId}/query:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdKnowledgebasesKbIdQuery
      summary: PublicApiQueryKnowledgeBase
      tags:
        - Knowledge Bases
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: kbId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                question:
                  type: string
                  minLength: 1
                  maxLength: 2000
              required:
                - question
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/knowledge-bases/{kbId}/sources:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdKnowledgebasesKbIdSources
      summary: PublicApiAddKnowledgeBaseSources
      tags:
        - Knowledge Bases
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: kbId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                urls:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    type: string
              required:
                - urls
              additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/learning/overview:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdLearningOverview
      summary: PublicApiGetWorkspaceLearningOverview
      tags:
        - Learning
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: segmentKey
          in: query
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicLearningOverviewResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/offerings:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdOfferings
      summary: PublicApiCreateOffering
      tags:
        - Offerings
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - product
                    - service
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                shortDescription:
                  type: string
                  maxLength: 200
                information:
                  type: string
                  minLength: 1
                keyBenefits:
                  type: array
                  items:
                    type: string
                    maxLength: 200
                url:
                  type: string
                  maxLength: 500
                  format: uri
              required:
                - type
                - name
                - information
              additionalProperties: false
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdOfferings
      summary: PublicApiListOfferings
      tags:
        - Offerings
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: wsId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicOfferingListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/offerings/{offeringId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdOfferingsOfferingId
      summary: PublicApiDeleteOffering
      tags:
        - Offerings
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: offeringId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdOfferingsOfferingId
      summary: PublicApiGetOffering
      tags:
        - Offerings
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: wsId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: offeringId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicOfferingGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdOfferingsOfferingId
      summary: PublicApiUpdateOffering
      tags:
        - Offerings
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: wsId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: offeringId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicOfferingUpdateResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "409":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              anyOf:
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - type
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - name
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - shortDescription
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - information
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - keyBenefits
                  additionalProperties: false
                - type: object
                  properties:
                    targetVersion:
                      type: integer
                      minimum: 0
                      maximum: 9007199254740991
                    type:
                      type: string
                      enum:
                        - product
                        - service
                    name:
                      type: string
                      minLength: 1
                      maxLength: 100
                    shortDescription:
                      type: string
                      maxLength: 200
                    information:
                      type: string
                      minLength: 1
                    keyBenefits:
                      type: array
                      items:
                        type: string
                        maxLength: 200
                    url:
                      type: string
                      maxLength: 500
                      format: uri
                  required:
                    - targetVersion
                    - url
                  additionalProperties: false
  /api/v1/organizations/{orgId}/workspaces/{wsId}/pipelines:
    get:
      operationId: listPipelines
      summary: PublicApiListPipelines
      tags:
        - Deals
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicPipelineListResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/pipelines/{pipelineId}:
    get:
      operationId: getPipeline
      summary: PublicApiGetPipeline
      tags:
        - Deals
      security:
        - developerKeyBearer: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: pipelineId
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F]{24}$
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicPipelineGetResponse"
        "400":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "401":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "403":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "404":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "429":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "500":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        "503":
          description: Public API error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/sequence-library:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdSequencelibrary
      summary: PublicApiCreateSequenceTemplate
      tags:
        - Sequence Library
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdSequencelibrary
      summary: PublicApiListSequenceTemplates
      tags:
        - Sequence Library
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/sequence-library/{templateId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdSequencelibraryTemplateId
      summary: PublicApiDeleteSequenceTemplate
      tags:
        - Sequence Library
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: templateId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
    patch:
      operationId: patchApiV1OrganizationsOrgIdWorkspacesWsIdSequencelibraryTemplateId
      summary: PublicApiUpdateSequenceTemplate
      tags:
        - Sequence Library
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: templateId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/teams/members:
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdTeamsMembers
      summary: PublicApiListTeamMembers
      tags:
        - Team
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/tracking-domains:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdTrackingdomains
      summary: PublicApiCreateTrackingDomain
      tags:
        - Tracking Domains
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                domain:
                  type: string
                  minLength: 1
                  maxLength: 253
                  pattern: ^[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)+$
              required:
                - domain
              additionalProperties: false
    get:
      operationId: getApiV1OrganizationsOrgIdWorkspacesWsIdTrackingdomains
      summary: PublicApiListTrackingDomains
      tags:
        - Tracking Domains
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/tracking-domains/{domainId}:
    delete:
      operationId: deleteApiV1OrganizationsOrgIdWorkspacesWsIdTrackingdomainsDomainId
      summary: PublicApiDeleteTrackingDomain
      tags:
        - Tracking Domains
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: domainId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/organizations/{orgId}/workspaces/{wsId}/tracking-domains/{domainId}/verify:
    post:
      operationId: postApiV1OrganizationsOrgIdWorkspacesWsIdTrackingdomainsDomainIdVerify
      summary: PublicApiVerifyTrackingDomain
      tags:
        - Tracking Domains
      security:
        - bearerAuth: []
      parameters:
        - name: orgId
          in: path
          required: true
          schema:
            type: string
        - name: wsId
          in: path
          required: true
          schema:
            type: string
        - name: domainId
          in: path
          required: true
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
  /api/v1/whoami:
    get:
      operationId: getDeveloperIdentity
      summary: PublicApiWhoami
      tags:
        - Authentication
      security:
        - developerKeyBearer: []
      parameters: []
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/DeveloperIdentityResponse"
        default:
          description: Error response
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/PublicErrorEnvelope"
