> ## 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.

# Update FAQ

> Update a single FAQ entry by its faqId

## Overview

Modify an existing FAQ entry by providing its `faqId`. All supplied fields replace the current values for that entry. Retrieve `faqId` values from the **List FAQs** endpoint.

## 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`. |
| `faq.faqId`     | string    | Yes      | ID of the FAQ entry to update.                                 |
| `faq.questions` | string\[] | Yes      | Replacement list of question phrasings. Maximum 10 per entry.  |
| `faq.answer`    | string    | Yes      | Replacement answer text.                                       |
| `faq.language`  | string    | Yes      | BCP-47 language code for this entry (e.g. `en-IN`).            |

## Example cURL

```bash theme={null}
curl -X PUT "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",
    "faq": {
      "faqId": "faq_xyz001",
      "questions": ["What are your hours?", "Are you open weekends?"],
      "answer": "We are open Monday to Saturday, 9am to 6pm IST.",
      "language": "en-IN"
    }
  }'
```

## Response

### Success (200)

```json theme={null}
{
  "status": "success",
  "requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "message": "FAQ updated",
  "response": { "updated": true, "faqId": "faq_xyz001" }
}
```

### 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

* Correcting an answer after reviewing conversation logs
* Adding new question phrasings to improve match rate
* Updating content when business information changes

<Tip>
  Use **List FAQs** to retrieve the `faqId` values before updating.
</Tip>

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


## OpenAPI

````yaml PUT /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:
    put:
      tags:
        - AgentFAQ
      summary: Update a FAQ entry
      description: Update a single existing FAQ entry identified by its faqId.
      operationId: updateFaq
      parameters:
        - $ref: '#/components/parameters/AgentId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateFaqRequest'
      responses:
        '200':
          description: FAQ updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
              examples:
                success:
                  value:
                    status: success
                    requestId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                    message: FAQ updated
                    response:
                      updated: true
                      faqId: faq_xyz001
        '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:
    UpdateFaqRequest:
      type: object
      required:
        - botId
        - environment
        - faq
      properties:
        botId:
          type: string
        environment:
          type: string
          enum:
            - development
            - staging
            - production
        faq:
          type: object
          required:
            - faqId
            - questions
            - answer
            - language
          properties:
            faqId:
              type: string
            questions:
              type: array
              items:
                type: string
            answer:
              type: string
            language:
              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

````