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

# Delete agent

> Permanently deletes the specified agent. This action cannot be undone.
All associated sessions and data will be removed.




## OpenAPI

````yaml delete /agent/{id}
openapi: 3.0.3
info:
  title: iwy API
  description: >
    API for managing AI agents and custom tools. Create conversational AI agents
    with custom capabilities,

    manage tool integrations, and embed AI avatars in your applications.


    ## Authentication

    All endpoints require authentication using a Bearer token
    (IWY_SERVICE_API_KEY).

    You can find your API key at
    [app.iwy.ai/settings](https://app.iwy.ai/settings).


    ## Base URL

    ```

    https://api.iwy.ai/v1

    ```
  version: 1.0.0
  contact:
    name: iwy Support
    url: https://www.iwy.ai/contact
servers:
  - url: https://api.iwy.ai/v1
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Ephemeral Agents
    description: Create one-time use agents with automatic expiration
  - name: Agents
    description: Manage AI agents and their configurations
  - name: Tools
    description: Manage custom tools and functions for agents
  - name: Sessions
    description: Start and manage agent video call sessions
paths:
  /agent/{id}:
    delete:
      tags:
        - Agents
      summary: Delete agent
      description: |
        Permanently deletes the specified agent. This action cannot be undone.
        All associated sessions and data will be removed.
      operationId: deleteAgent
      parameters:
        - $ref: '#/components/parameters/AgentId'
      responses:
        '204':
          description: Agent deleted successfully
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    AgentId:
      name: id
      in: path
      required: true
      description: The unique identifier (UUID) of the agent
      schema:
        type: string
        format: uuid
      example: 550e8400-e29b-41d4-a716-446655440000
  responses:
    UnauthorizedError:
      description: Authentication failed - invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Unauthorized
            details: Invalid or missing API key
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Not found
            details: The requested resource does not exist
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Internal server error
            details: An unexpected error occurred
  schemas:
    Error:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: Error message
          example: Parameter validation failed
        details:
          description: Additional error details
          oneOf:
            - type: string
            - type: object
        execution_time_ms:
          type: integer
          description: Execution time before error occurred
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        Your iwy Service API Key. Find it at
        [app.iwy.ai/settings](https://app.iwy.ai/settings).


        Include it in the Authorization header:

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````