Delete FAQ entries
curl --request DELETE \
--url https://api.inya.ai/platform/v1/agents/{botId}/faqs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"botId": "<string>",
"faqIds": [
"<string>"
]
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/faqs"
payload = {
"botId": "<string>",
"faqIds": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({botId: '<string>', faqIds: ['<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": "Successfully deleted 1 FAQ(s)",
"response": {
"deletedCount": 1,
"deletedFaqIds": [
"faq_xyz001"
],
"remainingFaqs": 0
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Agent FAQ API
Delete FAQs
Delete one or more FAQ entries from an agent
DELETE
/
v1
/
agents
/
{botId}
/
faqs
Delete FAQ entries
curl --request DELETE \
--url https://api.inya.ai/platform/v1/agents/{botId}/faqs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"botId": "<string>",
"faqIds": [
"<string>"
]
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/faqs"
payload = {
"botId": "<string>",
"faqIds": ["<string>"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.delete(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'DELETE',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({botId: '<string>', faqIds: ['<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": "Successfully deleted 1 FAQ(s)",
"response": {
"deletedCount": 1,
"deletedFaqIds": [
"faq_xyz001"
],
"remainingFaqs": 0
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: 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. |
Minimum working example
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)
{
"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. |
Errors
404 Not Found - Agent not found{
"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
This action is permanent. Confirm the IDs with List FAQs before deleting.
Deleting all entries automatically sets
faqEnabled = false on the agent. Adding new entries via Add FAQs or Import FAQs will re-enable it.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?