Update the visitor attributes JSON schema for an adaptive content site
Replaces the JSON schema that defines expected visitor attributes for adaptive content. The schema controls which attributes (e.g., role, subscription tier) can be used in conditional expressions to show or hide content for specific visitors. After updating, existing conditional expressions are evaluated against the new schema.
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
Body
Responses
200
The site adaptive schema has been updated.
application/json
objectstring · enumRequiredPossible values:
updatedAtstring · date-timeRequired
When the adaptive schema was updated.
400
Bad Request
application/json
default
Unexpected Error
application/json
put/orgs/{organizationId}/sites/{siteId}/adaptive-schema
PUT /v1/orgs/{organizationId}/sites/{siteId}/adaptive-schema HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 445
{
"jsonSchema": {
"regions": {
"ANY_ADDITIONAL_PROPERTY": {
"countries": [
"AD"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"unsigned": {
"type": "object",
"description": "Unsigned claims of the site visitor.",
"properties": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "boolean",
"description": "text"
}
},
"additionalProperties": false
},
"ANY_ADDITIONAL_PROPERTY": {
"type": "boolean",
"description": "text"
}
},
"additionalProperties": false
}
}{
"object": "site-adaptive-schema",
"jsonSchema": {
"regions": {
"ANY_ADDITIONAL_PROPERTY": {
"countries": [
"AD"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"unsigned": {
"type": "object",
"description": "Unsigned claims of the site visitor.",
"properties": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "boolean",
"description": "text"
}
},
"additionalProperties": false
},
"ANY_ADDITIONAL_PROPERTY": {
"type": "boolean",
"description": "text"
}
},
"additionalProperties": false
},
"updatedAt": "2026-01-01T00:00:00.000Z"
}Last updated
Was this helpful?