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

# Delete FAQs

> Delete one or more FAQ entries from an agent

## Overview

Permanently remove one or more FAQ entries from an agent by providing their `faqId` values. If all entries are deleted, `faqEnabled` is automatically set to `false` on the agent.

## Required Permission

`agents`

## Path Parameters

| Name    | Type   | Required | Description              |
| ------- | ------ | -------- | ------------------------ |
| `botId` | string | Yes      | Unique agent identifier. |

## Request Body

| Field         | Type      | Required | Description                                                    |
| ------------- | --------- | -------- | -------------------------------------------------------------- |
| `botId`       | string    | Yes      | Must match the `botId` path parameter.                         |
| `environment` | string    | Yes      | Target environment: `development`, `staging`, or `production`. |
| `faqIds`      | string\[] | Yes      | List of FAQ entry IDs to delete.                               |

## Example cURL

```bash theme={null}
curl -X DELETE "https://api.inya.ai/platform/v1/agents/fb79920229d144608ebf665a10e50275/faqs" \
  -H "x-api-key: <your_api_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "botId": "fb79920229d144608ebf665a10e50275",
    "environment": "development",
    "faqIds": ["faq_xyz001"]
  }'
```

## Response

### Success (200)

```json theme={null}
{
  "status": "success",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Successfully deleted 1 FAQ(s)",
  "response": {
    "deletedCount": 1,
    "deletedFaqIds": ["faq_xyz001"],
    "remainingFaqs": 0
  }
}
```

## Response Fields

| Field           | Type      | Description                                 |
| --------------- | --------- | ------------------------------------------- |
| `deletedCount`  | integer   | Number of entries successfully deleted.     |
| `deletedFaqIds` | string\[] | IDs of the deleted entries.                 |
| `remainingFaqs` | integer   | Total FAQ entries remaining after deletion. |

### Error Responses

**404 Not Found** - Agent does not exist

```json theme={null}
{
  "status": "failure",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "Agent not found"
}
```

## Use Cases

* Removing outdated or incorrect FAQ entries
* Clearing the knowledge base before a full re-import
* Freeing up capacity within the 100-entry limit

<Warning>
  This action is permanent. Confirm the IDs with **List FAQs** before deleting.
</Warning>

<Note>
  Deleting all entries automatically sets `faqEnabled = false` on the agent. Adding new entries via **Add FAQs** or **Import FAQs** will re-enable it.
</Note>

<Note>
  Save the `requestId` from every response. You will need it if you contact Inya support to trace a specific request.
</Note>


## OpenAPI

````yaml DELETE /v1/agents/{botId}/faqs
openapi: 3.0.3
info:
  title: Platform Agents API
  description: API endpoints for creating, managing, and interacting with voice agents
  version: 2.1.0
servers:
  - url: https://api.inya.ai/platform
    description: Production server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management operations
  - name: AgentFAQ
    description: Agent FAQ management
  - name: AgentCallTriggers
    description: Outbound call triggers
  - name: ChatSDK
    description: Chat Widget configuration
  - name: Conversations
    description: Conversation logs, statistics, and audio
paths:
  /v1/agents/{botId}/faqs:
    delete:
      tags:
        - AgentFAQ
      summary: Delete FAQ entries
      description: Delete one or more FAQ entries from an agent by providing their IDs.
      operationId: deleteFaqs
      parameters:
        - $ref: '#/components/parameters/AgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteFaqRequest'
      responses:
        '200':
          description: FAQs deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
              examples:
                success:
                  value:
                    status: success
                    requestId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    message: Successfully deleted 1 FAQ(s)
                    response:
                      deletedCount: 1
                      deletedFaqIds:
                        - faq_xyz001
                      remainingFaqs: 0
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    AgentId:
      name: botId
      in: path
      required: true
      description: Unique identifier of the agent
      schema:
        type: string
  schemas:
    DeleteFaqRequest:
      type: object
      required:
        - botId
        - environment
        - faqIds
      properties:
        botId:
          type: string
        environment:
          type: string
          enum:
            - development
            - staging
            - production
        faqIds:
          type: array
          items:
            type: string
    StandardResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
        response:
          type: object
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        requestId:
          type: string
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        message:
          type: string
  responses:
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key with 'agents' permission

````