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

# Delete an Agent

> Delete a specific agent

<Warning>An agent can't be deleted if it's being used in a campaign, error code 400 will be returned.</Warning>


## OpenAPI

````yaml DELETE /agents/{agentId}
openapi: 3.0.1
info:
  title: AI Phone Call Service API
  description: >-
    API for managing AI-based phone calls, including call initiation and result
    retrieval.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://my.cald.ai/client/api/v1
security:
  - apiKeyAuth: []
paths:
  /agents/{agentId}:
    delete:
      description: Delete a specific agent
      parameters:
        - name: agentId
          in: path
          description: The agent ID of the agent
          required: true
          schema:
            type: string
            description: The agent ID of the agent
      responses:
        '200':
          description: Success response with agent details
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      Whether the agent was successfully deleted, can be either
                      `success` or `failed`
        '400':
          description: Agent is currently in use and cannot be deleted
        '404':
          description: Agent not found
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Your API key, e.g. `caldLiveDe39a3accb206dd615f30d118e519df0`

````