API reference
Every operation of the Revdoku REST API with its TypeScript and Python SDK call, grouped by resource.
Requests go to https://api.revdoku.com. Every path starts with /v1, for example https://api.revdoku.com/v1/buckets. Send Authorization: Bearer $REVDOKU_API_KEY from your server; never put the key in a browser or a chat.
Responses use {"success": true, "data": ...}. Errors use {"success": false, "error": {"code": ..., "message": ...}}; branch on error.code.
The SDKs keep this envelope: TypeScript fields are camelCase, Python fields use the JSON names.
OpenAPI · Quickstart · TypeScript SDK · Python SDK · API guide
Authentication
Sign-in helpers for the CLI and AI agents. Backend applications use an API key from the dashboard.
Operations that need no API key run before you have one. They use the generated DefaultApi class instead of Revdoku, so their errors are ResponseError (TypeScript) or ApiException (Python), not RevdokuError.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| Email a sign-in code | POST /v1/auth/sign_in_code |
new DefaultApi().requestSignInCode |
DefaultApi().request_sign_in_code |
| Exchange a sign-in code for an API key | POST /v1/auth/sign_in_code/verify |
new DefaultApi().verifySignInCode |
DefaultApi().verify_sign_in_code |
| Exchange a one-time dashboard connection code for an API key | POST /v1/auth/grant/exchange |
new DefaultApi().exchangeConnectionGrant |
DefaultApi().exchange_connection_grant |
| Create a dashboard link | POST /v1/auth/dashboard_link |
client.api.createDashboardLink |
client.api.create_dashboard_link |
Accounts
Connection status, granted accounts and limits.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| Read the connection and selected account | GET /v1/status |
client.api.getStatus |
client.api.get_status |
| List accounts granted to this credential | GET /v1/accounts |
client.api.listAccounts |
client.api.list_accounts |
| Create a client account | POST /v1/accounts |
client.api.createClientAccount |
client.api.create_client_account |
| Read one granted account | GET /v1/accounts/{account_id} |
client.api.getAccount |
client.api.get_account |
| Read effective account limits | GET /v1/account/limits |
client.api.getAccountLimits |
client.api.get_account_limits |
Buckets
Create, read, archive and delete buckets. A bucket is the project of one docs site (the dashboard calls it a site).
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| List buckets | GET /v1/buckets |
client.listBuckets |
client.list_buckets |
| Create a bucket | POST /v1/buckets |
client.createBucket |
client.create_bucket |
| Read a bucket | GET /v1/buckets/{bucket_id} |
client.getBucket |
client.get_bucket |
| Update a bucket title, description or metadata | PATCH /v1/buckets/{bucket_id} |
client.api.updateBucket |
client.api.update_bucket |
| Permanently delete an archived bucket | DELETE /v1/buckets/{bucket_id} |
client.api.deleteBucket |
client.api.delete_bucket |
| Archive a bucket | POST /v1/buckets/{bucket_id}/archive |
client.api.archiveBucket |
client.api.archive_bucket |
| Unarchive a bucket | POST /v1/buckets/{bucket_id}/unarchive |
client.api.unarchiveBucket |
client.api.unarchive_bucket |
Files
Read the files that Revdoku copied from the bucket’s GitHub repository. Revdoku only reads a repository: change the files on GitHub.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| List files | GET /v1/buckets/{bucket_id}/files |
client.listFiles |
client.list_files |
| Write a knowledge base file | POST /v1/buckets/{bucket_id}/files |
client.api.writeFile |
client.api.write_file |
| Get an upload link for an image | POST /v1/buckets/{bucket_id}/uploads |
client.api.createFileUpload |
client.api.create_file_upload |
| Find a file by path | GET /v1/buckets/{bucket_id}/files/by_path |
client.api.getFileByPath |
client.api.get_file_by_path |
| Read file metadata | GET /v1/buckets/{bucket_id}/files/{file_id} |
client.api.getFile |
client.api.get_file |
| Delete a knowledge base file | DELETE /v1/buckets/{bucket_id}/files/{file_id} |
client.api.deleteFile |
client.api.delete_file |
| Get a download link for a file | GET /v1/buckets/{bucket_id}/files/{file_id}/download |
client.api.getFileDownload |
client.api.get_file_download |
| List file versions | GET /v1/buckets/{bucket_id}/files/{file_id}/versions |
client.api.listFileVersions |
client.api.list_file_versions |
| Move or rename a knowledge base file | POST /v1/buckets/{bucket_id}/files/{file_id}/move |
client.api.moveFile |
client.api.move_file |
| Restore a file version | POST /v1/buckets/{bucket_id}/files/{file_id}/versions/{version_id}/restore |
client.api.restoreFileVersion |
client.api.restore_file_version |
GitHub
Connect a GitHub repository to a bucket: its files become a copy of one branch, and each push updates them.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| List connected GitHub accounts | GET /v1/account/github/installations |
client.api.listGithubInstallations |
client.api.list_github_installations |
| List the repositories of a GitHub account | GET /v1/account/github/installations/{installation_id}/repositories |
client.api.listGithubRepositories |
client.api.list_github_repositories |
| Read the GitHub repository of a bucket | GET /v1/buckets/{bucket_id}/github |
client.api.getGithubSync |
client.api.get_github_sync |
| Connect a GitHub repository | POST /v1/buckets/{bucket_id}/github |
client.api.connectGithubRepository |
client.api.connect_github_repository |
| Change GitHub sync settings | PATCH /v1/buckets/{bucket_id}/github |
client.api.updateGithubSync |
client.api.update_github_sync |
| Disconnect the GitHub repository | DELETE /v1/buckets/{bucket_id}/github |
client.api.disconnectGithubRepository |
client.api.disconnect_github_repository |
| Sync the GitHub repository now | POST /v1/buckets/{bucket_id}/github/sync |
client.api.syncGithubRepository |
client.api.sync_github_repository |
| List the branches that can get a preview | GET /v1/buckets/{bucket_id}/github/branches |
client.api.listGithubBranches |
client.api.list_github_branches |
| Get the links to add a GitHub account | GET /v1/buckets/{bucket_id}/github/setup_link |
client.api.getGithubSetupLink |
client.api.get_github_setup_link |
Publications
A bucket’s site: publish its files, preview them for 24 hours, or take the site down.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| Get the site | GET /v1/buckets/{bucket_id}/publication |
client.api.getPublication |
client.api.get_publication |
| Publish the site | POST /v1/buckets/{bucket_id}/publication |
client.api.publishBucket |
client.api.publish_bucket |
| Unpublish the site | DELETE /v1/buckets/{bucket_id}/publication |
client.api.unpublishBucket |
client.api.unpublish_bucket |
| Get the preview | GET /v1/buckets/{bucket_id}/publication/preview |
client.api.getPublicationPreview |
client.api.get_publication_preview |
| Preview the site | POST /v1/buckets/{bucket_id}/publication/preview |
client.api.previewBucket |
client.api.preview_bucket |
| Get the site’s analytics | GET /v1/buckets/{bucket_id}/analytics |
client.api.getBucketAnalytics |
client.api.get_bucket_analytics |
Tickets
Support tickets: each conversation that someone started with the bucket, by email or a message left on the docs site. Read them, reply to the requester, solve and label them. Page feedback comments show in the dashboard and are not tickets of this API; the channel feedback is for tickets from earlier page feedback emails.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| List tickets | GET /v1/buckets/{bucket_id}/tickets |
client.listTickets |
client.list_tickets |
| Read a ticket | GET /v1/buckets/{bucket_id}/tickets/{ticket_id} |
client.getTicket |
client.get_ticket |
| Change a ticket: status, internal note or labels | PATCH /v1/buckets/{bucket_id}/tickets/{ticket_id} |
client.api.updateTicket |
client.api.update_ticket |
| List the messages of a ticket | GET /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages |
client.listTicketMessages |
client.list_ticket_messages |
| Reply to the requester | POST /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages |
client.replyToTicket |
client.reply_to_ticket |
| Read a message | GET /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages/{message_id} |
client.getTicketMessage |
client.get_ticket_message |
| Delete a message | DELETE /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages/{message_id} |
client.api.deleteTicketMessage |
client.api.delete_ticket_message |
| Get a download link for the original email | GET /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages/{message_id}/raw |
client.api.getTicketMessageOriginalDownload |
client.api.get_ticket_message_original_download |
| Get a download link for an attachment | GET /v1/buckets/{bucket_id}/tickets/{ticket_id}/messages/{message_id}/attachments/{attachment_id} |
client.getAttachmentDownload |
client.get_attachment_download |
Events
Ticket events of every channel: one signed webhook per bucket and live WebSocket subscriptions.
| Operation | HTTP | TypeScript | Python |
|---|---|---|---|
| Read the webhook | GET /v1/buckets/{bucket_id}/webhook |
client.api.getWebhook |
client.api.get_webhook |
| Set the webhook | PUT /v1/buckets/{bucket_id}/webhook |
client.api.setWebhook |
client.api.set_webhook |
| Remove the webhook | DELETE /v1/buckets/{bucket_id}/webhook |
client.api.deleteWebhook |
client.api.delete_webhook |
| Get a live event subscription ticket | GET /v1/buckets/{bucket_id}/events/subscription |
client.api.getEventSubscription |
client.api.get_event_subscription |