Update a FAQ entry
curl --request PUT \
--url https://api.inya.ai/platform/v1/agents/{botId}/faqs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"botId": "<string>",
"faq": {
"faqId": "<string>",
"questions": [
"<string>"
],
"answer": "<string>",
"language": "<string>"
}
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/faqs"
payload = {
"botId": "<string>",
"faq": {
"faqId": "<string>",
"questions": ["<string>"],
"answer": "<string>",
"language": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
botId: '<string>',
faq: {
faqId: '<string>',
questions: ['<string>'],
answer: '<string>',
language: '<string>'
}
})
};
fetch('https://api.inya.ai/platform/v1/agents/{botId}/faqs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "FAQ updated",
"response": {
"updated": true,
"faqId": "faq_xyz001"
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Agent FAQ API
Update FAQ
Update a single FAQ entry by its faqId
PUT
/
v1
/
agents
/
{botId}
/
faqs
Update a FAQ entry
curl --request PUT \
--url https://api.inya.ai/platform/v1/agents/{botId}/faqs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"botId": "<string>",
"faq": {
"faqId": "<string>",
"questions": [
"<string>"
],
"answer": "<string>",
"language": "<string>"
}
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/faqs"
payload = {
"botId": "<string>",
"faq": {
"faqId": "<string>",
"questions": ["<string>"],
"answer": "<string>",
"language": "<string>"
}
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
botId: '<string>',
faq: {
faqId: '<string>',
questions: ['<string>'],
answer: '<string>',
language: '<string>'
}
})
};
fetch('https://api.inya.ai/platform/v1/agents/{botId}/faqs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "FAQ updated",
"response": {
"updated": true,
"faqId": "faq_xyz001"
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: 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). |
Minimum working example
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)
{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "FAQ updated",
"response": { "updated": true, "faqId": "faq_xyz001" }
}
Errors
404 Not Found - Agent not found{
"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
Use List FAQs to retrieve the
faqId values before updating.Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Authorizations
API key with 'agents' permission
Path Parameters
Unique identifier of the agent
Body
application/json
Was this page helpful?