Update a text snippet in place: change its title, its content, or both. Omitted fields keep their current values. The old content stops matching and the new content is re-indexed in the background; watch the source status until it becomes indexed. Only text sources can be updated; refresh url sources by retraining and file sources by uploading a new file. Requires the write:sources permission.
Authorization
BearerAuth write:sourcesIn: header
Scope: write:sources
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/agents/string/sources/1" \ -H "Content-Type: application/json" \ -d '{ "content": "Refunds are available within 45 days of purchase." }'{
"id": 0,
"agentId": "string",
"type": "text",
"name": "string",
"status": "string"
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"issues": [
{
"path": "string",
"message": "string"
}
]
}Get a source GET
Read one training source, including the stored text of a text snippet so it can be edited and sent back. `content` is null for url and file sources, and while a snippet is still being stored. Requires the `read:sources` permission.
Delete a training source DELETE
Remove a source and everything indexed from it. This cannot be undone. Requires the `write:sources` permission.