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

# List Agents

> Returns all agents from the system that the user has access to

<Endpoint method="GET" path="/v1/agents" description="Returns all agents from the system that the user has access to">
  <RequestHeaders>
    <RequestHeader name="x-api-key" description="API key for authentication" required example="YOUR_API_KEY" />
  </RequestHeaders>

  <ResponseFields>
    <ResponseField status="200" description="Agents retrieved successfully" contentType="application/json" schemaRef="#/components/schemas/AgentsResponse" />

    <ResponseField status="400" description="Unexpected error" contentType="application/json" schemaRef="#/components/schemas/Error" />
  </ResponseFields>
</Endpoint>


## OpenAPI

````yaml GET /v1/agents
openapi: 3.0.1
info:
  title: OpenAPI Example
  description: A sample API to demonstrate features in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.contactship.ai
security: []
paths:
  /v1/agents:
    get:
      description: Returns all agents from the system that the user has access to
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
          description: API key for authentication
      responses:
        '200':
          description: Agents retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentsResponse'
              example:
                statusCode: 200
                data:
                  - id: 337a9eeb-3e16-4cc5-94ec-25fa159eb57a
                    name: Sales Representative Agent
                    person_name: Sarah Johnson
                    language: en-US
                    webhook_url: https://webhook.example.com/sales-notifications
                    conversation_purpose: Qualify leads and schedule product demos
                    prompt: >-
                      You are Sarah, a professional sales representative. Your
                      goal is to understand potential customers' needs and
                      schedule product demonstrations when appropriate.
                    volume: 1.2
                    voice_id: custom_voice_sarah_123
                    interruption_sensitivity: 0.8
                    ambient_sound: call-center
                    voice_speed: 1.1
                    voice_temperature: 0.9
                    post_call_analysis_data:
                      - name: lead_score
                        type: number
                        description: Lead qualification score (1-100)
                      - name: demo_scheduled
                        type: boolean
                        description: Whether a product demo was scheduled
                    tools:
                      - name: schedule_demo
                        type: function
                        description: Schedule a product demonstration
                    created_at: '2024-01-15T10:30:00.000Z'
                    updated_at: '2024-01-15T15:45:00.000Z'
                  - id: b39d48c2-7340-446d-b08f-0e3204bc7cb4
                    name: Customer Support Agent
                    person_name: Michael Chen
                    language: multi
                    webhook_url: https://webhook.example.com/support-tickets
                    conversation_purpose: Provide technical support and resolve customer issues
                    prompt: >-
                      You are Michael, a technical support specialist. Help
                      customers resolve their issues efficiently and create
                      support tickets when necessary.
                    volume: 1
                    voice_id: custom_voice_michael_456
                    interruption_sensitivity: 0.7
                    ambient_sound: call-center
                    voice_speed: 1
                    voice_temperature: 0.8
                    post_call_analysis_data:
                      - name: issue_resolved
                        type: boolean
                        description: Whether the customer's issue was resolved
                      - name: satisfaction_score
                        type: number
                        description: Customer satisfaction rating (1-10)
                    tools:
                      - name: create_ticket
                        type: function
                        description: Create a support ticket
                      - name: search_knowledge_base
                        type: function
                        description: Search technical documentation
                    created_at: '2024-02-20T08:15:00.000Z'
                    updated_at: '2024-02-20T14:30:00.000Z'
                  - id: 209ed663-0dcf-41ba-aac8-9450303de1e2
                    name: Appointment Scheduler
                    person_name: Emma Wilson
                    language: en-GB
                    webhook_url: https://webhook.example.com/appointments
                    conversation_purpose: Schedule and manage medical appointments
                    prompt: >-
                      You are Emma, a medical office coordinator. Help patients
                      schedule, reschedule, or cancel their appointments
                      efficiently.
                    volume: 0.9
                    voice_id: custom_voice_emma_789
                    interruption_sensitivity: 0.6
                    ambient_sound: convention-hall
                    voice_speed: 0.95
                    voice_temperature: 0.7
                    post_call_analysis_data:
                      - name: appointment_scheduled
                        type: boolean
                        description: Whether an appointment was scheduled
                      - name: preferred_time_available
                        type: boolean
                        description: Whether patient's preferred time slot was available
                    tools:
                      - name: check_availability
                        type: function
                        description: Check calendar availability
                      - name: schedule_appointment
                        type: function
                        description: Schedule a new appointment
                    created_at: '2024-03-10T09:45:00.000Z'
                    updated_at: '2024-03-10T16:20:00.000Z'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AgentsResponse:
      type: object
      properties:
        statusCode:
          type: integer
          description: HTTP status code
        data:
          type: array
          items:
            $ref: '#/components/schemas/Agent'
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    Agent:
      type: object
      required:
        - id
        - name
        - created_at
        - language
      properties:
        id:
          type: string
          description: The ID of the agent
        name:
          type: string
          description: The name of the agent in our system
        person_name:
          type: string
          description: The name of the agent in the call
        language:
          type: string
          description: The language of the agent
        webhook_url:
          type: string
          nullable: true
          description: The webhook URL for call status updates
        conversation_purpose:
          type: string
          nullable: true
          description: The purpose of the conversation
        prompt:
          type: string
          nullable: true
          description: The prompt for the agent
        volume:
          type: number
          description: Volume level for the voice
        voice_id:
          type: string
          description: The ID of the voice to use
        interruption_sensitivity:
          type: number
          description: Sensitivity level for interruptions (0-1)
        ambient_sound:
          type: string
          nullable: true
          description: Background sound configuration
        voice_speed:
          type: number
          description: Speed of the voice
        voice_temperature:
          type: number
          description: Temperature parameter for voice generation
        post_call_analysis_data:
          type: array
          nullable: true
          description: Configuration for post-call analysis
          items:
            type: object
        tools:
          type: array
          nullable: true
          description: List of tools available to the agent
          items:
            type: object
        created_at:
          type: string
          format: date-time
          description: The creation time of the agent
        updated_at:
          type: string
          format: date-time
          description: The last update time of the agent

````