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

# Start a team session

> Creates a pending root conversational session, ensures the team's runtime is available, and publishes the initial prompt to the existing inbound flow.



## OpenAPI

````yaml /openapi/v1.json post /teams/{teamSlug}/sessions
openapi: 3.1.0
info:
  title: Felan API
  description: >-
    Team-scoped access to Felan sessions, integrations, environments,
    environment variables, automations, and inbound events.
  version: 1.0.0
  contact:
    name: Felan Support
    url: https://felan.ai
servers:
  - url: https://app.felan.ai/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Teams
  - name: Integrations
  - name: Environments
  - name: Environment Variables
  - name: Automations
  - name: Sessions
  - name: Events
  - name: OpenAPI
paths:
  /teams/{teamSlug}/sessions:
    post:
      tags:
        - Sessions
      summary: Start a team session
      description: >-
        Creates a pending root conversational session, ensures the team's
        runtime is available, and publishes the initial prompt to the existing
        inbound flow.
      operationId: createTeamSession
      parameters:
        - $ref: '#/components/parameters/TeamSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionCreateInput'
      responses:
        '202':
          description: Session accepted for execution
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/SessionSummary'
        '400':
          description: Missing, empty, invalid, or oversized prompt
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/ExecutionDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          $ref: '#/components/responses/BadGateway'
components:
  parameters:
    TeamSlug:
      name: teamSlug
      in: path
      required: true
      description: Felan team slug shown in dashboard URLs and Team Settings
      schema:
        type: string
        minLength: 1
  schemas:
    SessionCreateInput:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 10000
          description: Initial request. Leading and trailing whitespace is removed.
    SessionSummary:
      type: object
      required:
        - id
        - created_at
        - started_at
        - last_activity_at
        - completed_at
        - kind
        - parent_session_id
        - persona_id
        - prompt
        - title
        - status
        - llm_cost_usd
        - num_turns
        - num_tool_calls
        - model
      properties:
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        started_at:
          type:
            - string
            - 'null'
          format: date-time
        last_activity_at:
          type:
            - string
            - 'null'
          format: date-time
        completed_at:
          type:
            - string
            - 'null'
          format: date-time
        kind:
          type: string
          description: >-
            Session origin or execution kind, such as conversational or
            subagent.
        parent_session_id:
          type:
            - string
            - 'null'
          format: uuid
        persona_id:
          type: string
        prompt:
          type: string
        title:
          type:
            - string
            - 'null'
        status:
          $ref: '#/components/schemas/SessionStatus'
        llm_cost_usd:
          type:
            - number
            - 'null'
        num_turns:
          type:
            - integer
            - 'null'
        num_tool_calls:
          type:
            - integer
            - 'null'
        model:
          type:
            - string
            - 'null'
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              examples:
                - VALIDATION_ERROR
                - UNAUTHORIZED
                - NOT_FOUND
                - EXECUTION_DENIED
                - CONFLICT
                - RATE_LIMITED
                - SESSION_START_FAILED
                - SESSION_PUBLISH_FAILED
                - MESSAGE_PUBLISH_FAILED
                - INTERNAL_ERROR
            message:
              type: string
    SessionStatus:
      type: string
      enum:
        - pending
        - running
        - completed
        - failed
        - timed_out
        - cancelled
  responses:
    Unauthorized:
      description: Missing or invalid team API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ExecutionDenied:
      description: The team is not currently admitted to start or resume execution
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource missing or outside the authenticated team
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Team API key rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InternalError:
      description: The server could not complete the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    BadGateway:
      description: The agent runtime or inbound publisher could not accept the request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Team API key. Current keys retain the bzy_team_ compatibility prefix.

````