Fetchply Docs
PATCH
/api/v1/agents/{id}/sources/{sourceId}

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:sources
AuthorizationBearer <token>

In: header

Scope: write:sources

Path Parameters

id*string
sourceId*integer

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"
    }
  ]
}