PATCH
/
sources
/
{source_id}
curl --request PATCH \
  --url https://api.totoy.ai/v1/sources/{source_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form valid_until=2027-12-31T23:59:59Z
{
"source_id": "src_oXiYDg8QOc9JsOk86idRXiywD",
"source_type": "document",
"bytes": 1234567,
"created_at": "2024-03-01T00:00:00Z",
"updated_at": "2024-05-01T00:00:00Z",
"title": "Totoy Company Overview",
"document_file_name": "totoy-company-overview.pdf",
"backlink": "https://www.totoy.ai/totoy-company-overview.pdf",
"valid_from": "2024-01-01T00:00:00Z",
"valid_until": "2027-12-31T23:59:59Z",
"project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
"custom_metadata": {
"internal_tag": "general_documents"
},
"knowledge_base_ids": [
"kb_feMfJbeqbAEj4u8K5HqmKpUbY",
"kb_2eMfJbeqbAEj4u8K5HqmKpUbY"
],
"status": "completed",
"pages": 27
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

source_id
string
required

Unique identifier for a Source that was uploaded to Totoy.

Maximum length: 29

Body

Request body for modifying a document Source.

Response

200
application/json

OK

The Source object represents a document source (.pdf, .jpg, .png) or text source (plain-text) that has been uploaded to Totoy.