Skip to content

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

Bearer token

List synced context library documents

Path parameters

  • orgIdstring (uuid)required

Responses

200List synced context library documents
  • dataobjectrequired
    Fields
    • documentsarray<object>required
      Item fields
      • idstring (uuid)required
      • orgIdstring (uuid)required
      • sourceIdstring (uuid)required
      • sourceTypestringrequired

        one of notion

      • externalIdstringrequired
      • titlestringrequired
      • contentTextstringrequired
      • contentUrlstring | nullrequired
      • enabledbooleanrequired
      • disclosurestringrequired

        one of public, private, restricted

      • syncedAtstring | nullrequired
      • createdAtstringrequired
      • updatedAtstringrequired
Request
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}

Bearer token

Update a context library document

Path parameters

  • orgIdstring (uuid)required
  • documentIdstring (uuid)required

Request body application/json

  • enabledboolean
  • disclosurestring

    one of public, private, restricted

Responses

200Update a context library document
  • dataobjectrequired
    Fields
    • idstring (uuid)required
    • orgIdstring (uuid)required
    • sourceIdstring (uuid)required
    • sourceTypestringrequired

      one of notion

    • externalIdstringrequired
    • titlestringrequired
    • contentTextstringrequired
    • contentUrlstring | nullrequired
    • enabledbooleanrequired
    • disclosurestringrequired

      one of public, private, restricted

    • syncedAtstring | nullrequired
    • createdAtstringrequired
    • updatedAtstringrequired
Request
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}

Bearer token

Delete a context library document

Path parameters

  • orgIdstring (uuid)required
  • documentIdstring (uuid)required

Responses

200Delete a context library document
  • dataobjectrequired
    Fields
    • idstring (uuid)required
    • orgIdstring (uuid)required
    • sourceIdstring (uuid)required
    • sourceTypestringrequired

      one of notion

    • externalIdstringrequired
    • titlestringrequired
    • contentTextstringrequired
    • contentUrlstring | nullrequired
    • enabledbooleanrequired
    • disclosurestringrequired

      one of public, private, restricted

    • syncedAtstring | nullrequired
    • createdAtstringrequired
    • updatedAtstringrequired
Request
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

Bearer token

List connected workspace context sources

Path parameters

  • orgIdstring (uuid)required

Responses

200List connected workspace context sources
  • dataobjectrequired
    Fields
    • sourcesarray<object>required
      Item fields
      • idstring (uuid)required
      • orgIdstring (uuid)required
      • sourceTypestringrequired

        one of notion

      • statusstringrequired

        one of connected, disconnected, error

      • externalWorkspaceIdstring | nullrequired
      • workspaceNamestring | nullrequired
      • lastSyncedAtstring | nullrequired
      • lastErrorstring | nullrequired
      • createdAtstringrequired
      • updatedAtstringrequired
Request
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}

Bearer token

Disconnect a workspace context source

Path parameters

  • orgIdstring (uuid)required
  • sourceIdstring (uuid)required

Responses

200Disconnect a workspace context source
  • dataobjectrequired
    Fields
    • idstring (uuid)required
    • orgIdstring (uuid)required
    • sourceTypestringrequired

      one of notion

    • statusstringrequired

      one of connected, disconnected, error

    • externalWorkspaceIdstring | nullrequired
    • workspaceNamestring | nullrequired
    • lastSyncedAtstring | nullrequired
    • lastErrorstring | nullrequired
    • createdAtstringrequired
    • updatedAtstringrequired
Request
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

Bearer token

List Notion pages available for sync into the context library

Path parameters

  • orgIdstring (uuid)required
  • sourceIdstring (uuid)required

Query parameters

  • querystring

Responses

200List Notion pages available for sync into the context library
  • dataobjectrequired
    Fields
    • pagesarray<object>required
      Item fields
      • idstringrequired
      • titlestringrequired
      • urlstring | nullrequired
      • lastEditedTimestring | nullrequired
Request
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

Bearer token

Sync selected Notion pages into the context library

Path parameters

  • orgIdstring (uuid)required
  • sourceIdstring (uuid)required

Request body application/json

  • pageIdsarray<string>required

Responses

200Sync selected Notion pages into the context library
  • dataobjectrequired
    Fields
    • syncedarray<object>required
      Item fields
      • idstring (uuid)required
      • orgIdstring (uuid)required
      • sourceIdstring (uuid)required
      • sourceTypestringrequired

        one of notion

      • externalIdstringrequired
      • titlestringrequired
      • contentTextstringrequired
      • contentUrlstring | nullrequired
      • enabledbooleanrequired
      • disclosurestringrequired

        one of public, private, restricted

      • syncedAtstring | nullrequired
      • createdAtstringrequired
      • updatedAtstringrequired
    • failedarray<object>required
      Item fields
      • pageIdstringrequired
      • errorstringrequired
Request
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

Bearer token

Start Notion OAuth for workspace context library

Path parameters

  • orgIdstring (uuid)required

Request body application/json

  • redirectUristring (uri)required
  • linkedinTargetstring

    one of profile, page

  • blueskyHandlestring

Responses

200Start Notion OAuth for workspace context library
  • dataobjectrequired
    Fields
    • authorizationUrlstring (uri)required
    • statestringrequired
Request
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"}'