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

# Create a custom team subagent

> Creates a customer-defined subagent for future sessions. Team skills are automatically available; per-subagent skill, extension, credential, and execution-limit fields are not accepted.



## OpenAPI

````yaml /openapi/v1.json post /teams/{teamSlug}/subagents
openapi: 3.1.0
info:
  title: Felan API
  description: >-
    Team-scoped access to Felan sessions, integrations, environments,
    environment variables, automations, skills, custom subagents, 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: Skills
  - name: Subagents
  - name: Sessions
  - name: Events
  - name: OpenAPI
paths:
  /teams/{teamSlug}/subagents:
    post:
      tags:
        - Subagents
      summary: Create a custom team subagent
      description: >-
        Creates a customer-defined subagent for future sessions. Team skills are
        automatically available; per-subagent skill, extension, credential, and
        execution-limit fields are not accepted.
      operationId: createTeamSubagent
      parameters:
        - $ref: '#/components/parameters/TeamSlug'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamSubagentCreateInput'
      responses:
        '201':
          description: Custom subagent created
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/TeamSubagent'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
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:
    TeamSubagentCreateInput:
      type: object
      additionalProperties: false
      required:
        - name
        - description
        - instructions
        - model
      properties:
        name:
          type: string
          maxLength: 100
          example: Release helper
        description:
          type: string
          maxLength: 1024
          example: Prepares and verifies releases.
        instructions:
          type: string
          maxLength: 65536
          example: Check the changelog, run release checks, and report blockers.
        model:
          $ref: '#/components/schemas/SubagentModel'
    TeamSubagent:
      type: object
      additionalProperties: false
      required:
        - id
        - name
        - description
        - instructions
        - model
      properties:
        id: 2a236abe-1d59-4a6d-a565-f16803b5b8af
        name:
          type: string
          maxLength: 100
          example: Release helper
        description:
          type: string
          maxLength: 1024
          example: Prepares and verifies releases.
        instructions:
          type: string
          maxLength: 65536
          example: Check the changelog, run release checks, and report blockers.
        model:
          $ref: '#/components/schemas/SubagentModel'
    SubagentModel:
      type: string
      description: >-
        Inherit the team default, choose a portable model tier, or select an
        exact configured provider/model.
      anyOf:
        - enum:
            - inherit
            - xhigh
            - high
            - medium
            - low
        - pattern: ^[a-z0-9][a-z0-9._-]*/[^/]+$
      example: high
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              examples:
                - VALIDATION_ERROR
                - UNAUTHORIZED
                - NOT_FOUND
                - SKILL_SOURCE_UNAVAILABLE
                - EXECUTION_DENIED
                - CONFLICT
                - RATE_LIMITED
                - SESSION_START_FAILED
                - SESSION_PUBLISH_FAILED
                - MESSAGE_PUBLISH_FAILED
                - INTERNAL_ERROR
            message:
              type: string
  responses:
    ValidationError:
      description: The request body or source reference is invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: VALIDATION_ERROR
              message: Invalid subagent fields
    Unauthorized:
      description: Missing or invalid team API key
      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'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Team API key. Current keys retain the bzy_team_ compatibility prefix.

````