REST API

API Reference

Complete reference for the Rasepi REST API. Manage hubs, entries, translations, expiry workflows, permissions, and more.

Open PlaygroundBase URL: https://api.rasepi.com

Authentication

The Rasepi API uses Bearer token authentication. All requests (except public endpoints) require an Authorization header.

Authorization: Bearer <your-token>

Dev Tokens (Development)

For local development, use dev tokens that encode both tenant and user IDs:

Authorization: Bearer dev-token-{tenantId}:{userId}

OAuth (Production)

In production, authenticate via the OAuth flow at GET /auth/login. This returns a JWT with sub and tenant_id claims.

Key Concepts

Multi-Tenant

All data is isolated per tenant. The tenant is resolved from the JWT tenant_id claim. EF global query filters enforce isolation automatically.

Block-Level Translation

Entries are broken into blocks (paragraphs, headings). Translations track each block independently via SHA256 content hashing — only stale blocks need retranslation.

Forced Expiry

Every entry has an expiration date. Expired entries are flagged for review. Reviews can renew, archive, or update content.

Soft Delete

When entries have translations, blocks are soft-deleted (marked IsDeleted) rather than physically removed to preserve translation alignment.

Hubs

Hubs are collaborative workspaces that contain entries. Every entry belongs to exactly one hub.

GET/hubsList all hubsAuthenticated+
GET/hubs/{key}Get hub by keyAuthenticated+
POST/hubsCreate a hubGlobal Admin+
PUT/hubs/{key}Update a hubHub Admin+
DELETE/hubs/{key}Delete a hubOwner Only+
POST/hubs/{key}/transfer-ownershipTransfer hub ownershipHub Admin+
PUT/hubs/{key}/entries/reorderReorder entries in hubHub Editor+
GET/hubs/{key}/permissionsMy permissions in hubAuthenticated+

Entries

Entries are documentation pages within a hub. They support block-based content, translations, expiry tracking, and version history.

GET/entries/hubs/{hubKey}List entries in hubAuthenticated+
GET/entries/{entryId}Get entry by IDAuthenticated+
POST/entriesCreate an entryAuthenticated+
PUT/entries/{entryId}Update an entryEditor+
DELETE/entries/{entryId}Delete an entryEditor+
POST/entries/{entryId}/publishPublish entryEditor+
PUT/entries/{entryId}/renewRenew entryEditor+
POST/entries/{entryId}/duplicateDuplicate entryEditor+
PATCH/entries/{entryId}/moveMove entry to another hubEditor+
POST/entries/{entryId}/starStar entryAuthenticated+
POST/entries/{entryId}/watchWatch entryAuthenticated+
GET/entries/{entryId}/versionsVersion historyAuthenticated+
GET/entries/recently-viewedRecently viewedAuthenticated+
GET/entries/expiring-soonExpiring soonAuthenticated+
GET/entries/pinnedPinned entriesAuthenticated+

Translations

Block-level translation system. Translations track source content via SHA256 hashes — when a block changes, its translations are marked stale. Only stale blocks need retranslation (94% cost savings on partial edits).

Translations are block-level, not entry-level. Each paragraph/heading gets its own translation that tracks staleness independently.

Templates

Entry templates provide reusable document structures. Templates can be created, rated, imported/exported, and applied to new entries.

See the Template Gallery for an interactive browser, or the Template Builder to create your own.

GET/templatesList templatesAuthenticated+
GET/templates/{templateId}Get template detailAuthenticated+
POST/templatesCreate templateAuthenticated+
PUT/templates/{templateId}Update templateOwner/Admin+
DELETE/templates/{templateId}Delete templateOwner/Admin+
POST/templates/{templateId}/applyApply templateAuthenticated+
POST/templates/{templateId}/rateRate templateAuthenticated+
POST/templates/importImport templateGlobal Admin+
GET/templates/{templateId}/exportExport templateGlobal Admin+

Expiry & Reviews

Rasepi enforces content freshness through expiry dates and review workflows. Entries must be periodically reviewed, renewed, or archived. Expiry templates define the rules; reviews record the decisions.

GET/entries/{entryId}/expiry-configGet expiry configAuthenticated+
GET/entries/{entryId}/expiry-statusGet expiry statusAuthenticated+
POST/entries/{entryId}/reviewCreate a reviewEditor+
GET/entries/{entryId}/review-historyReview historyAuthenticated+
POST/entries/{entryId}/renewRenew entryEditor+
GET/expiry-dashboard/mePersonal expiry dashboardAuthenticated+

Expiry Templates

Expiry templates define review cadence, warning thresholds, and renewal rules. Assign templates to entries or set a tenant-wide default.

GET/expiry-templatesList expiry templatesAuthenticated+
GET/expiry-templates/{templateId}Get expiry templateAuthenticated+
POST/expiry-templatesCreate expiry templateGlobal Admin+
PUT/expiry-templates/{templateId}Update expiry templateGlobal Admin+
DELETE/expiry-templates/{templateId}Delete expiry templateGlobal Admin+
POST/expiry-templates/{templateId}/set-defaultSet default templateGlobal Admin+

Freshness Scores

Freshness trust scores rate how up-to-date an entry is based on multiple signals: last edit, review history, expiry proximity, translation staleness, and more.

GET/entries/{entryId}/freshnessGet freshness scoreAuthenticated+
GET/entries/{entryId}/freshness/signalsGet freshness signalsAuthenticated+
POST/entries/{entryId}/freshness/recalculateRecalculate freshnessEditor+
GET/freshness-dashboard/summaryFreshness dashboardAuthenticated+

Analytics

Track entry views, time spent, and engagement. Identify inactive content and measure documentation impact.

GET/analytics/entries/{entryId}/summaryEntry analytics summaryAuthenticated+
GET/analytics/entries/{entryId}/eventsEntry eventsAuthenticated+
POST/analytics/entries/{entryId}/time-spentRecord time spentAuthenticated+
GET/analytics/inactiveInactive entriesGlobal Admin+

Access Control

Manage hub memberships, entry-level permissions, and user groups. Roles cascade: Hub roles apply to all entries within, but entry-level overrides are supported.

GET/hubs/{hubId}/membershipsList hub membersAuthenticated+
POST/hubs/{hubId}/memberships/usersAdd user to hubHub Admin+
POST/hubs/{hubId}/memberships/groupsAdd group to hubHub Admin+
DELETE/hubs/{hubId}/memberships/{membershipId}Remove hub memberHub Admin+
GET/entries/{entryId}/permissionsList entry permissionsAuthenticated+
POST/entries/{entryId}/permissions/usersAdd user to entryEditor+
GET/groupsList groupsGlobal Admin+
POST/groupsCreate groupGlobal Admin+

AI & Search

Conversational AI agent and hybrid search across your documentation. Supports keyword, semantic, and combined search modes.

POST/ai/conversationsCreate conversationAuthenticated+
GET/ai/conversationsList conversationsAuthenticated+
GET/ai/conversations/{conversationId}Get conversationAuthenticated+
POST/ai/conversations/{conversationId}/messagesSend messageAuthenticated+
GET/ai/usageAI usage statsAuthenticated+

Notifications

Expiry warnings, notification channels, and bulk actions. Configure Slack, email, or webhook channels for automated expiry alerts.

GET/notifications/expiry-warningsExpiry warningsAuthenticated+
POST/notifications/{notificationId}/acknowledgeAcknowledge notificationAuthenticated+
POST/notifications/bulk-renewBulk renew entriesAuthenticated+
GET/notification-channelsList channelsGlobal Admin+
POST/notification-channelsCreate channelGlobal Admin+
POST/notification-channels/{channelId}/testTest channelGlobal Admin+

Authentication Endpoints

OAuth login flow, tenant selection, and session management.

GET/auth/login/{provider}OAuth loginPublic+
GET/auth/tenantsList user tenantsAuthenticated+
POST/auth/select-tenantSelect tenantAuthenticated+
POST/auth/logoutLogoutAuthenticated+

Admin

Tenant administration: language configuration, glossaries, categories, tags, plugins, and style rules. All admin endpoints require Global Admin role.

GET/admin/languagesList languagesGlobal Admin+
GET/admin/glossariesList glossariesGlobal Admin+
GET/categoriesList categoriesAuthenticated+
GET/tagsList tagsAuthenticated+
GET/tenant/pluginsList pluginsAuthenticated+
GET/admin/style-rulesList style rulesGlobal Admin+
GET/billing/subscriptionGet subscriptionTenant Admin+