AgentDocs

View as Markdown

Api List Projects

GET/api/v1/docs/projects

List documentation projects for the current brand.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Project

POST/api/v1/docs/projects

Create a new documentation project.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Get Project

GET/api/v1/docs/projects/{project_id}

Get a documentation project with page count.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Update Project

PATCH/api/v1/docs/projects/{project_id}

Update a documentation project. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/projects/{project_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Delete Project

DELETE/api/v1/docs/projects/{project_id}

Soft-delete a documentation project. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/projects/{project_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api List Pages

GET/api/v1/docs/projects/{project_id}/pages

List pages in a project. Use view=tree for nested structure.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Page

POST/api/v1/docs/projects/{project_id}/pages

Create a new page with initial content (first revision).

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Get Page

GET/api/v1/docs/projects/{project_id}/pages/{slug}

Get a page with its current content.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/{slug}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Update Page

PUT/api/v1/docs/projects/{project_id}/pages/{slug}

Update a page (creates a new revision). Deduplicates identical content.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PUT "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/{slug}" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Delete Page

DELETE/api/v1/docs/projects/{project_id}/pages/{slug}

Soft-delete a page.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/{slug}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Move Page

PATCH/api/v1/docs/projects/{project_id}/pages/{slug}/move

Move a page to a new path or change sort order. Does not create a revision.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/{slug}/move" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Get Revision History

GET/api/v1/docs/pages/{page_id}/history

Get revision history for a page.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/pages/{page_id}/history" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Get Revision

GET/api/v1/docs/revisions/{revision_id}

Get a specific revision with full content.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/revisions/{revision_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Compute Diff

GET/api/v1/docs/pages/{page_id}/diff

Compute unified diff between two revisions. Omit 'from' for parent comparison.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/pages/{page_id}/diff" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Rollback

POST/api/v1/docs/pages/{page_id}/rollback

Rollback a page to a previous revision. Creates a new (non-destructive) revision.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/pages/{page_id}/rollback" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api List Media

GET/api/v1/docs/projects/{project_id}/media

List media files in a project.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/media" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Upload Media

POST/api/v1/docs/projects/{project_id}/media

Upload a media file (image, PDF, etc.) to R2 storage.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/media" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api List Recent Pages

GET/api/v1/docs/recent-pages

List the most recently updated pages across every project in the brand.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/recent-pages" \
  -H "Authorization: Bearer $OPVS_TOKEN"
GET/api/v1/docs/search

Full-text search across all pages in the brand's documentation.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/search" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api List Branches

GET/api/v1/docs/projects/{project_id}/branches

List branches for a project.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/branches" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Branch

POST/api/v1/docs/projects/{project_id}/branches

Create a new branch for draft/review workflows.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/branches" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Branch Diff

GET/api/v1/docs/projects/{project_id}/branches/{branch_name}/diff

Get diff summary for a branch compared to main.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/branches/{branch_name}/diff" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Merge Branch

POST/api/v1/docs/projects/{project_id}/branches/{branch_name}/merge

Merge a branch into main. Creates new revisions for affected pages.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/branches/{branch_name}/merge" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Close Branch

DELETE/api/v1/docs/projects/{project_id}/branches/{branch_name}

Close a branch without merging.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/projects/{project_id}/branches/{branch_name}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Bulk Create Pages

POST/api/v1/docs/projects/{project_id}/pages/bulk

Bulk create/update pages. Used by agents for multi-page writes.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/bulk" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api List Tokens

GET/api/v1/docs/tokens

List all access tokens for the brand. Brand admin only.

Request
curl "https://app.opvs.ai/api/v1/docs/tokens" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Token

POST/api/v1/docs/tokens

Create a new access token. Returns the full token once (never again). Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/tokens" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Update Token

PATCH/api/v1/docs/tokens/{token_id}

Update token permissions or status. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/tokens/{token_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Revoke Token

DELETE/api/v1/docs/tokens/{token_id}

Revoke an access token. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/tokens/{token_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Export Project

GET/api/v1/docs/projects/{project_id}/export

Export all project pages as a ZIP of markdown files.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/export" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api List Webhooks

GET/api/v1/docs/webhooks

List webhooks for the brand. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/webhooks" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Webhook

POST/api/v1/docs/webhooks

Create a webhook endpoint. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/webhooks" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Delete Webhook

DELETE/api/v1/docs/webhooks/{webhook_id}

Delete a webhook. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/webhooks/{webhook_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api List Templates

GET/api/v1/docs/templates

List available page templates (system + brand-specific).

Request
curl "https://app.opvs.ai/api/v1/docs/templates" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Create Template

POST/api/v1/docs/templates

Create a brand-specific page template. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/templates" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Delete Template

DELETE/api/v1/docs/templates/{template_id}

Delete a brand-specific template. Cannot delete system templates. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/templates/{template_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api List Project Members

GET/api/v1/docs/projects/{project_id}/members

List members of a project.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/members" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Add Project Member

POST/api/v1/docs/projects/{project_id}/members

Add a member (user or agent) to a project. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X POST "https://app.opvs.ai/api/v1/docs/projects/{project_id}/members" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Remove Project Member

DELETE/api/v1/docs/projects/{project_id}/members/{member_type}/{member_id}

Remove a member from a project. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X DELETE "https://app.opvs.ai/api/v1/docs/projects/{project_id}/members/{member_type}/{member_id}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Update Visibility

PATCH/api/v1/docs/projects/{project_id}/visibility

Update project visibility. Automatically manages members on transitions. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/projects/{project_id}/visibility" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Update Page Visibility

PATCH/api/v1/docs/projects/{project_id}/pages/{slug}/visibility

Update a single page's visibility (public/private). Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages/{slug}/visibility" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Bulk Update Page Visibility

PATCH/api/v1/docs/projects/{project_id}/pages-visibility

Bulk update visibility for multiple pages. Brand admin only.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PATCH "https://app.opvs.ai/api/v1/docs/projects/{project_id}/pages-visibility" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Api Project View

GET/api/v1/docs/projects/{project_id}/view

Full project overview in agent-readable format (markdown, YAML, or JSON).

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/view" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Page View

GET/api/v1/docs/projects/{project_id}/page-view/{slug}

Single page with content in agent-readable format.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/page-view/{slug}" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Search View

GET/api/v1/docs/search/view

Search results in agent-readable format.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/search/view" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Get Docs Graph

GET/api/v1/docs/projects/{project_id}/graph

Return pages + saved node positions + cross-references for Knowledge Canvas.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl "https://app.opvs.ai/api/v1/docs/projects/{project_id}/graph" \
  -H "Authorization: Bearer $OPVS_TOKEN"

Api Save Docs Positions

PUT/api/v1/docs/projects/{project_id}/graph/positions

Save per-user node positions for Knowledge Canvas.

Errors

CodeWhenWhat to do
422Validation Error—
Request
curl -X PUT "https://app.opvs.ai/api/v1/docs/projects/{project_id}/graph/positions" \
  -H "Authorization: Bearer $OPVS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Did this answer your question?