Changes settings within their bounds; null returns a setting to its default.
const url = 'https://api.contentsurface.io/v1/admin/settings';const options = { method: 'PATCH', headers: { 'If-Match': '"1"', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"crawlIntervalMinutes":240,"excludedExtensions":["bak","tmp"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.contentsurface.io/v1/admin/settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'If-Match: "1"' \ --data '{ "crawlIntervalMinutes": 240, "excludedExtensions": [ "bak", "tmp" ] }'Changes settings: send only those to change, by name, as in values; null returns one to its default. Each must be within its range and choices (400 validation-failed naming it). A longer crawl interval reschedules scans; removing an allowed sign-in directory removes its users’ sign-in links and ends their sessions. Turning mcpAccess off ends every AI application’s (MCP client’s) access at once; removing a host from mcpClientHosts ends the access of that host’s applications. Needs If-Match. Tenant admins.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”The ETag of the version being changed. Required when the operation changes or deletes an administrative object; relation changes (PATCH …/members, …/labels, …/clients, …/agents) do not need it.
Example
"1"Request Body
Section titled “Request Body”Responses
Section titled “Responses”OK
The tenant’s settings: what is set, what is in force, and what is allowed.
object
The values set; null means the default.
object
How often every active mount folder is rescanned; never shorter than the plan allows, at most 24 hours.
How long deleted items are kept, restorable, before they are removed for good.
How long an invitation is valid.
Larger files are listed and can be opened, but their text is not indexed.
File extensions never indexed, lower case without the dot; on top of the types never indexed on any plan.
The languages scanned images are read in; an empty list turns OCR off.
saas or onPrem: where text is read from documents; a choice only where the plan permits several.
provider, saas or onPrem: where text is embedded for meaning-based search; a choice only where the plan permits several.
The external provider while the embedding service is provider.
Allowed Entra ID directories (tenant GUIDs); empty: no sign-in with Microsoft.
Allowed Google Workspace domains; empty: no sign-in with Google.
How long a federated session lasts before the provider sign-in is required again.
Whether AI applications (MCP clients) may sign users in and read content through the MCP endpoint; off by default. Turning it off ends every MCP grant.
The AI application hosts allowed to sign in, such as claude.ai; empty: any, while mcpAccess is on. Removing a host ends its grants.
The values in force, defaults filled in and bounded by the plan.
object
How often every active mount folder is rescanned; never shorter than the plan allows, at most 24 hours.
How long deleted items are kept, restorable, before they are removed for good.
How long an invitation is valid.
Larger files are listed and can be opened, but their text is not indexed.
File extensions never indexed, lower case without the dot; on top of the types never indexed on any plan.
The languages scanned images are read in; an empty list turns OCR off.
saas or onPrem: where text is read from documents; a choice only where the plan permits several.
provider, saas or onPrem: where text is embedded for meaning-based search; a choice only where the plan permits several.
The external provider while the embedding service is provider.
Allowed Entra ID directories (tenant GUIDs); empty: no sign-in with Microsoft.
Allowed Google Workspace domains; empty: no sign-in with Google.
How long a federated session lasts before the provider sign-in is required again.
Whether AI applications (MCP clients) may sign users in and read content through the MCP endpoint; off by default. Turning it off ends every MCP grant.
The AI application hosts allowed to sign in, such as claude.ai; empty: any, while mcpAccess is on. Removing a host ends its grants.
Number settings’ defaults and ranges, by setting name.
object
A number setting’s default and allowed range, from the plan and the platform.
object
The value when none is set.
The smallest allowed.
The largest allowed.
What list and choice settings may hold.
object
The OCR languages offered.
The OCR languages used when none are set.
How many may be chosen.
How many extensions may be excluded.
Extensions never indexed on any plan: archives, disk images, audio, video, programs.
The extraction services the plan permits.
The embedding services the plan permits.
The external providers offered, by region.
The sign-in providers offered: entra, google.
How many directories may be allowed per provider.
Values set by ContentSurface, read-only.
object
The plan’s limits that are not settings.
object
The indexed-text cap: characters of one document searchable by meaning and kept for passages.
Pages of one document read by OCR.
The fair-use extracted text volume, in bytes.
The extraction services the plan permits.
The embedding services the plan permits.
Values the same for every tenant.
object
How long reading one document’s text may take.
Characters read from one document at most; the rest is not indexed.
The longest text attribute value kept.
The most values a text list attribute keeps.
The longest value in a text list.
The attribute preview’s length at most.
One value’s length in the attribute preview at most.
The default search profile’s fixed settings; null before it exists.
object
The profile’s catalogue entry.
Its display name.
The embedding model.
The model’s pinned revision.
The vectors’ dimensions.
How vectors are compared.
How keyword search treats words: simple, a language with stemming, or simple with one or two stemmed languages (simple+english+german).
How documents are split into passages.
object
A passage’s usual length, in characters.
Its greatest length.
Its least length.
How much consecutive passages may overlap.
How much of the enclosing heading a passage carries.
One attribute value’s length at most in the search data.
The attributes’ total length at most in the search data.
The settings’ version, also their ETag.
Example
{ "values": { "crawlIntervalMinutes": 240, "deletedNodeRetentionDays": null, "invitationExpiryDays": null, "fileSizeLimitMegabytes": null, "excludedExtensions": [ "bak", "tmp" ], "ocrLanguages": null, "extractionService": null, "embeddingService": null, "embeddingProvider": null, "entraTenantIds": [ "3f1c2a8e-5b7d-4e0a-9c61-2d84b7f0a913" ], "googleWorkspaceDomains": null, "federatedSessionHours": null, "mcpAccess": true, "mcpClientHosts": [ "ai.example.com" ] }, "effective": { "crawlIntervalMinutes": 240, "deletedNodeRetentionDays": 30, "invitationExpiryDays": 14, "fileSizeLimitMegabytes": 100, "excludedExtensions": [ "bak", "tmp" ], "ocrLanguages": [ "eng", "deu" ], "extractionService": "saas", "embeddingService": "provider", "embeddingProvider": "ovhcloud", "entraTenantIds": [ "3f1c2a8e-5b7d-4e0a-9c61-2d84b7f0a913" ], "googleWorkspaceDomains": [], "federatedSessionHours": 168, "mcpAccess": true, "mcpClientHosts": [ "ai.example.com" ] }, "bounds": { "crawlIntervalMinutes": { "default": 120, "min": 120, "max": 1440 }, "deletedNodeRetentionDays": { "default": 30, "min": 7, "max": 90 }, "invitationExpiryDays": { "default": 14, "min": 1, "max": 30 } }, "choices": { "ocrLanguages": [ "eng", "deu", "fra", "ita", "spa" ], "defaultOcrLanguages": [ "eng", "deu" ], "maxOcrLanguages": 5, "maxExcludedExtensions": 50, "platformExcludedExtensions": [ "zip", "iso", "mp4", "exe" ], "extractionServices": [ "saas" ], "embeddingServices": [ "provider" ], "embeddingProviders": [ "ovhcloud" ], "federatedProviders": [ "entra", "google" ], "maxAllowedDirectories": 10 }, "vendor": { "plan": { "maxIndexedTextCharsPerNode": 500000, "maxOcrPagesPerDocument": 50, "maxExtractedTextBytes": 500000000000, "extractionServices": [ "saas" ], "embeddingServices": [ "provider" ] }, "platform": { "extractionTimeoutSeconds": 120, "maxExtractedCharsPerDocument": 5000000, "maxTextValueChars": 4000, "maxTextListItems": 100, "maxTextListItemChars": 500, "attributePreviewMaxChars": 400, "attributePreviewMaxValueChars": 120 }, "profile": null }, "version": 7}The request is not valid: a malformed ID, body, filter or parameter.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:validation-failed", "title": "The request is not valid.", "status": 400, "detail": "'crawlIntervalMinutes' is between 120 and 1440.", "code": "validation-failed", "field": "crawlIntervalMinutes"}No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:unauthorized", "title": "Not authenticated.", "status": 401, "detail": "A valid access token is required.", "code": "unauthorized"}Authenticated but not allowed: a missing scope or role, an impersonated token on an admin endpoint, or an inactive tenant.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:role-required", "title": "Not allowed.", "status": 403, "detail": "This endpoint requires one of the roles: tenantAdmin.", "code": "role-required"}Absent: not existing, in another tenant, or not readable by the caller — never distinguished.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:not-found", "title": "Not found.", "status": 404, "detail": "The resource does not exist.", "code": "not-found"}If-Match does not match the current version.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:version-mismatch", "title": "The resource has changed.", "status": 412, "detail": "If-Match does not match the current version; read it again and retry.", "code": "version-mismatch"}If-Match is missing.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:if-match-required", "title": "If-Match is required.", "status": 428, "detail": "Send the ETag of the version you are changing in If-Match.", "code": "if-match-required"}Load protection: the tenant is making too many calls, or running too many searches or content streams, at once. Transient and never a quota; retry after Retry-After seconds.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:too-many-requests", "title": "Too many requests.", "status": 429, "detail": "The tenant is making more API calls than one replica serves at once; retry shortly.", "code": "too-many-requests", "retryAfter": 1}