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

# PublicApiGetCopilotSession

> GET /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions/{sessionId}

Use this endpoint through the Developer API or the matching `firstsales` CLI command when available. Responses use the stable FirstSales public error envelope.


## OpenAPI

````yaml GET /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions/{sessionId}
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.
servers:
  - url: https://sandbox.api.app.firstsales.io
  - url: https://api.app.firstsales.io
security:
  - bearerAuth: []
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
paths:
  /api/v1/organizations/{orgId}/workspaces/{wsId}/copilot/sessions/{sessionId}:
    get:
      tags:
        - Copilot
      summary: PublicApiGetCopilotSession
      operationId: getCopilotSession
      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'
      security:
        - developerKeyBearer: []
components:
  schemas:
    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
    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
  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-*).

````