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

# Set the default agent

> Makes an enabled agent that places calls (`outbound` or `both`) your account's default. Only this one setting changes.

Scope: `agents:manage`.



## OpenAPI

````yaml /api-reference/openapi.json put /settings/default-agent
openapi: 3.1.0
info:
  title: Telleo API
  version: 1.3.0
  description: >-
    Start AI phone calls, or connect your counsellors to contacts, from your own
    systems and get each call's outcome back. Manage your counsellors and AI
    agents from the same API.
servers:
  - url: https://api.telleo.ai/v1
security:
  - ApiKey: []
tags:
  - name: Calls
  - name: Batches
  - name: Agents
  - name: Human calls
  - name: Counsellors
  - name: Credits
  - name: Webhook
paths:
  /settings/default-agent:
    put:
      tags:
        - Agents
      summary: Set the default agent
      description: >-
        Makes an enabled agent that places calls (`outbound` or `both`) your
        account's default. Only this one setting changes.


        Scope: `agents:manage`.
      operationId: setDefaultAgent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRef'
            example:
              agent_id: 17ea33d2-5b6c-4c1e-9a1f-2d4e6f8a9b0c
      responses:
        '200':
          description: The new default.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultAgent'
        '401':
          description: The key is missing, unknown, revoked or expired.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_api_key:
                  value:
                    error:
                      code: missing_api_key
                      message: Send your API key in the X-API-Key header.
                      request_id: req_8f2c1a7e
                invalid_api_key:
                  value:
                    error:
                      code: invalid_api_key
                      message: This API key is not valid.
                      request_id: req_8f2c1a7e
        '403':
          description: >-
            The key lacks the agents:manage scope. Keys only have it when
            created with it.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                insufficient_scope:
                  value:
                    error:
                      code: insufficient_scope
                      message: This API key does not have the agents:manage scope.
                      request_id: req_8f2c1a7e
        '404':
          description: No agent with this id in your account.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                agent_not_found:
                  value:
                    error:
                      code: agent_not_found
                      message: >-
                        No agent 17ea… in this account. List your agents with
                        GET /v1/agents.
                      request_id: req_8f2c1a7e
        '409':
          description: This agent cannot be the default.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                agent_disabled:
                  value:
                    error:
                      code: agent_disabled
                      message: Agent 17ea… is turned off.
                      request_id: req_8f2c1a7e
                agent_inbound_only:
                  value:
                    error:
                      code: agent_inbound_only
                      message: Agent 17ea… only answers incoming calls…
                      request_id: req_8f2c1a7e
                ai_provider_not_supported:
                  value:
                    error:
                      code: ai_provider_not_supported
                      message: This account's AI calling provider is AAVTAAR…
                      request_id: req_8f2c1a7e
        '429':
          description: Too many requests for this key.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
            X-Request-Id:
              $ref: '#/components/headers/RequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limited:
                  value:
                    error:
                      code: rate_limited
                      message: Too many requests. Retry after 12 seconds.
                      request_id: req_8f2c1a7e
components:
  schemas:
    AgentRef:
      type: object
      required:
        - agent_id
      properties:
        agent_id:
          type: string
    DefaultAgent:
      type: object
      properties:
        object:
          type: string
          const: default_agent
        agent_id:
          type:
            - string
            - 'null'
        agent:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            object:
              type: string
            name:
              type: string
            enabled:
              type: boolean
            direction:
              type: string
            deleted:
              type: boolean
              description: The step points at an agent that no longer exists.
        ai_calling_provider:
          type:
            - string
            - 'null'
          description: >-
            The provider your workflow and bulk AI calls use (`VACADEMY_AI` for
            Telleo agents).
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/Warning'
          description: >-
            Non-fatal notes about what was (not) done, e.g.
            `mobile_number_missing`.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable code. Branch on this, not on the message.
              example: invalid_request
            message:
              type: string
              description: A sentence you can log or show to an operator.
            request_id:
              type: string
              description: Quote this when you contact support.
            details:
              type: object
              additionalProperties: true
              description: >-
                Extra context, e.g. `errors: [{field, message}]` for validation
                errors or `call_id` for conflicts.
    Warning:
      type: object
      description: >-
        Something in the request that was accepted but may not do what you
        expect.
      properties:
        field:
          type: string
          example: variables.date
        code:
          type: string
          enum:
            - reserved_variable
        message:
          type: string
          example: >-
            {{date}} in the agent's script is always filled with the current
            date and time; this value does not replace it. The agent receives it
            only as information about the contact.
  headers:
    RequestId:
      schema:
        type: string
      description: Unique id of this request. Quote it to support.
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Your AI calling API key (`vak_call_…`). `Authorization: Bearer <key>`
        also works.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.