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

# Create transfer rule

> Create a new transfer rule between two agents in a squad



## OpenAPI

````yaml post /api/v1/squads/{squadId}/transfer-rules
openapi: 3.0.0
info:
  version: 1.0.0
  title: Feather AI API
servers:
  - url: https://prod.featherhq.com
    description: Production environment
security: []
paths:
  /api/v1/squads/{squadId}/transfer-rules:
    post:
      tags:
        - Squad
      summary: Create transfer rule
      description: Create a new transfer rule between two agents in a squad
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: squadId
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                fromAgentId:
                  type: string
                  format: uuid
                toAgentId:
                  type: string
                  format: uuid
                allowManualTrigger:
                  type: boolean
                  default: true
                toolDescription:
                  type: string
                  maxLength: 500
                variables:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                      description:
                        type: string
                        minLength: 1
                      required:
                        type: boolean
                    required:
                      - name
                      - description
                      - required
                speakBeforeTransfer:
                  type: string
              required:
                - fromAgentId
                - toAgentId
      responses:
        '201':
          description: Transfer rule created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  transferRule:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      squadId:
                        type: string
                        format: uuid
                      fromAgentId:
                        type: string
                        format: uuid
                      fromAgent:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                        required:
                          - id
                          - name
                      toAgentId:
                        type: string
                        format: uuid
                      toAgent:
                        type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                          name:
                            type: string
                        required:
                          - id
                          - name
                      allowManualTrigger:
                        type: boolean
                      toolDescription:
                        type: string
                        nullable: true
                      variables:
                        type: array
                        nullable: true
                        items:
                          type: object
                          properties:
                            name:
                              type: string
                              minLength: 1
                            description:
                              type: string
                              minLength: 1
                            required:
                              type: boolean
                          required:
                            - name
                            - description
                            - required
                      speakBeforeTransfer:
                        type: string
                        nullable: true
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                    required:
                      - id
                      - squadId
                      - fromAgentId
                      - toAgentId
                      - allowManualTrigger
                      - toolDescription
                      - variables
                      - speakBeforeTransfer
                      - createdAt
                      - updatedAt
                required:
                  - transferRule
        '400':
          description: Bad request - validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 400
                  message:
                    type: string
                    default: Bad request
                  code:
                    type: string
                    enum:
                      - BAD_REQUEST
                    default: BAD_REQUEST
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '404':
          description: Squad or agent not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 404
                  message:
                    type: string
                    default: Not found
                  code:
                    type: string
                    enum:
                      - NOT_FOUND
                    default: NOT_FOUND
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    default: 500
                  message:
                    type: string
                    default: Internal server error
                  code:
                    type: string
                    enum:
                      - INTERNAL_SERVER_ERROR
                    default: INTERNAL_SERVER_ERROR
                  success:
                    type: boolean
                    enum:
                      - false
                    default: false
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key

````