Settings
Update AI optimization settings
Changes how a site exposes content to AI tools: llms.txt, markdown export and the article AI menu. Requires a plan with AI optimization.
curl --request PATCH \
--url 'https://api.notiondesk.so/sites/{site_id}/settings/ai-optimization' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"llms_txt_enabled": false,
"markdown_export_enabled": false,
"ai_contextual_menu_enabled": false
}'Authorizations
- Authorizationstringheader
api_key · http · bearer
write - Authorizationstringheader
oauth · oauth2
write
Path parameters
- site_idstringrequired
The
idof a site from List sites.
Headers
- nd-versionstring
The contract version your integration was written against. Without it, the request uses the current version. An unknown value answers 400
invalid_version. - Idempotency-Keystring
Makes a write safe to retry: the same key and body replay the first response with
X-Idempotent-Replay: true. A different body answers 422idempotency_key_reused; keys last at least 24 hours.
Body
application/jsonrequired- llms_txt_enabledboolean
Whether the site publishes
llms.txt. Read back in Get a site asllms_txt_enabled. - markdown_export_enabledboolean
Whether articles can be read as markdown. Read back in Get a site as
markdown_export_enabled. - ai_contextual_menu_enabledboolean
Whether articles show the AI contextual menu. Read back in Get a site as
ai_contextual_menu_enabled.
Responses
Done. The body is empty. A replay with the same Idempotency-Key also answers 204 with an empty body.
Headers
- nd-versionstring
The contract version that answered the request.
- X-Idempotent-Replaystring
truewhen the response replays an earlier request sent with the sameIdempotency-Key, otherwisefalse. - X-RateLimit-Limitinteger
Requests allowed per minute: 120 for
GET, 20 for writes, per key or OAuth grant. - X-RateLimit-Remaininginteger
Requests left in the current window.
- Retry-Afterinteger
Seconds until the next request is accepted;
0while requests remain.