Create or update context records
put
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$siteIdstringRequired
The unique id of the site
Bodyobject · ContextRecordInput[]
Input to ingest a new context record
idstringRequired
Unique local identifier for the record
typestring · enumRequiredPossible values:
titlestring · min: 1 · max: 256Required
Title for the context record
descriptionstring · max: 512Optional
Optional short description of the context record
bodystringRequired
Body content of the record as markdown
urlstring · uriOptional
URL of the record
createdAtstring · date-timeOptional
Date of the record creation in the original source
Responses
204
The context records have been created or updated
No content
put/orgs/{organizationId}/sites/{siteId}/context-records
PUT /v1/orgs/{organizationId}/sites/{siteId}/context-records HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 194
[
{
"id": "text",
"type": "ticket",
"title": "text",
"description": "text",
"body": "text",
"url": "https://example.com",
"createdAt": "2026-01-01T00:00:00.000Z",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}
]204
The context records have been created or updated
No content
Last updated
Was this helpful?