Context API
Documents and synced sources that ground what AdVentur.ai writes.
8 endpoints. Every path is relative to the API base URL and needs a bearer token unless it is marked public. See the REST API overview for authentication, errors and pagination.
GET/v1/orgs/{orgId}/context/documents
List synced context library documents
Path parameters
orgIdstring (uuid)required
Responses
200List synced context library documents
dataobjectrequiredFields
documentsarray<object>requiredItem fields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceIdstring (uuid)requiredsourceTypestringrequiredone of
notionexternalIdstringrequiredtitlestringrequiredcontentTextstringrequiredcontentUrlstring | nullrequiredenabledbooleanrequireddisclosurestringrequiredone of
public,private,restrictedsyncedAtstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/context/documents" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"PATCH/v1/orgs/{orgId}/context/documents/{documentId}
Update a context library document
Path parameters
orgIdstring (uuid)requireddocumentIdstring (uuid)required
Request body application/json
enabledbooleandisclosurestringone of
public,private,restricted
Responses
200Update a context library document
dataobjectrequiredFields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceIdstring (uuid)requiredsourceTypestringrequiredone of
notionexternalIdstringrequiredtitlestringrequiredcontentTextstringrequiredcontentUrlstring | nullrequiredenabledbooleanrequireddisclosurestringrequiredone of
public,private,restrictedsyncedAtstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
curl -X PATCH "https://api.adventur.ai/v1/orgs/$ORG_ID/context/documents/$DOCUMENT_ID" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'DELETE/v1/orgs/{orgId}/context/documents/{documentId}
Delete a context library document
Path parameters
orgIdstring (uuid)requireddocumentIdstring (uuid)required
Responses
200Delete a context library document
dataobjectrequiredFields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceIdstring (uuid)requiredsourceTypestringrequiredone of
notionexternalIdstringrequiredtitlestringrequiredcontentTextstringrequiredcontentUrlstring | nullrequiredenabledbooleanrequireddisclosurestringrequiredone of
public,private,restrictedsyncedAtstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
curl -X DELETE "https://api.adventur.ai/v1/orgs/$ORG_ID/context/documents/$DOCUMENT_ID" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"GET/v1/orgs/{orgId}/context/sources
List connected workspace context sources
Path parameters
orgIdstring (uuid)required
Responses
200List connected workspace context sources
dataobjectrequiredFields
sourcesarray<object>requiredItem fields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceTypestringrequiredone of
notionstatusstringrequiredone of
connected,disconnected,errorexternalWorkspaceIdstring | nullrequiredworkspaceNamestring | nullrequiredlastSyncedAtstring | nullrequiredlastErrorstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/context/sources" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"DELETE/v1/orgs/{orgId}/context/sources/{sourceId}
Disconnect a workspace context source
Path parameters
orgIdstring (uuid)requiredsourceIdstring (uuid)required
Responses
200Disconnect a workspace context source
dataobjectrequiredFields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceTypestringrequiredone of
notionstatusstringrequiredone of
connected,disconnected,errorexternalWorkspaceIdstring | nullrequiredworkspaceNamestring | nullrequiredlastSyncedAtstring | nullrequiredlastErrorstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
curl -X DELETE "https://api.adventur.ai/v1/orgs/$ORG_ID/context/sources/$SOURCE_ID" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"GET/v1/orgs/{orgId}/context/sources/{sourceId}/pages
List Notion pages available for sync into the context library
Path parameters
orgIdstring (uuid)requiredsourceIdstring (uuid)required
Query parameters
querystring
Responses
200List Notion pages available for sync into the context library
dataobjectrequiredFields
pagesarray<object>requiredItem fields
idstringrequiredtitlestringrequiredurlstring | nullrequiredlastEditedTimestring | nullrequired
curl -X GET "https://api.adventur.ai/v1/orgs/$ORG_ID/context/sources/$SOURCE_ID/pages" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN"POST/v1/orgs/{orgId}/context/sources/{sourceId}/sync
Sync selected Notion pages into the context library
Path parameters
orgIdstring (uuid)requiredsourceIdstring (uuid)required
Request body application/json
pageIdsarray<string>required
Responses
200Sync selected Notion pages into the context library
dataobjectrequiredFields
syncedarray<object>requiredItem fields
idstring (uuid)requiredorgIdstring (uuid)requiredsourceIdstring (uuid)requiredsourceTypestringrequiredone of
notionexternalIdstringrequiredtitlestringrequiredcontentTextstringrequiredcontentUrlstring | nullrequiredenabledbooleanrequireddisclosurestringrequiredone of
public,private,restrictedsyncedAtstring | nullrequiredcreatedAtstringrequiredupdatedAtstringrequired
failedarray<object>requiredItem fields
pageIdstringrequirederrorstringrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/context/sources/$SOURCE_ID/sync" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"pageIds":["string"]}'POST/v1/orgs/{orgId}/context/sources/notion/oauth/start
Start Notion OAuth for workspace context library
Path parameters
orgIdstring (uuid)required
Request body application/json
redirectUristring (uri)requiredlinkedinTargetstringone of
profile,pageblueskyHandlestring
Responses
200Start Notion OAuth for workspace context library
dataobjectrequiredFields
authorizationUrlstring (uri)requiredstatestringrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/context/sources/notion/oauth/start" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"redirectUri":"https://example.com"}'