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

# Start New Session

> Creates a new session thread for a given agent.

Create a new session thread for an agent.


## OpenAPI

````yaml POST /api/assistants/threads
openapi: 3.1.0
info:
  title: Session Thread API
  description: API for managing session threads.
  license:
    name: MIT
    identifier: ''
  version: 1.0.0
servers:
  - url: https://agent-service-511985928315.us-east4.run.app
security:
  - bearerAuth: []
    XEnvoleUserId: []
paths:
  /api/assistants/threads:
    post:
      summary: Start a new session thread
      description: Creates a new session thread for a given agent.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionThreadDto'
            example:
              agentId: agent_123
      responses:
        '200':
          description: Session thread created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionThreadResp'
              example:
                id: thread_456
                threadName: Project Ideas
                agentId: agent_123
                agentName: Demo Agent
                agentHandle: demo-agent
                rootAgentBuildId: build_123
                lastMessageTime: '2024-01-01T12:00:00Z'
                sessionType: LIVE
        '500':
          description: Internal server error.
components:
  schemas:
    SessionThreadDto:
      type: object
      properties:
        agentId:
          type: string
      required:
        - agentId
      example:
        agentId: agent_123
    SessionThreadResp:
      type: object
      properties:
        id:
          type: string
        threadName:
          type: string
        agentId:
          type: string
        agentName:
          type: string
        agentHandle:
          type: string
        rootAgentBuildId:
          type: string
        lastMessageTime:
          type: string
          format: date-time
        sessionType:
          type: string
          enum:
            - LIVE
            - TESTING
      example:
        id: thread_456
        threadName: Project Ideas
        agentId: agent_abc
        agentName: Demo Agent
        agentHandle: demo-agent
        rootAgentBuildId: build_123
        lastMessageTime: '2024-01-01T12:00:00Z'
        sessionType: LIVE
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
    XEnvoleUserId:
      type: apiKey
      in: header
      name: X-Envole-User-Id
      description: External user identifier; not necessarily registered with Envole

````