Skip to content

REST API

PLUR Enterprise exposes a REST API at /api/v1/. It mirrors the MCP tools one-to-one with the same data model and the same permission enforcement. Use it for CI, automation, dashboards, mobile clients, and anything that doesn’t speak MCP.

The canonical OpenAPI 3 spec is served at:

https://your-server/api/v1/openapi.yaml

Generate clients with openapi-generator-cli, import into Postman, or read it directly.

Every request needs an Authorization: Bearer <token> header. Tokens come from one of:

  • OAuth/OIDC session — short-lived tokens issued after SSO login.
  • API key — long-lived tokens issued from the admin dashboard for service-to-service traffic.
  • SCIM-provisioned identity — for automated user provisioning.

Tokens scope to a single user; permission resolution happens server-side against the user’s group memberships. See Authentication and Permissions & scopes.

MethodPathDescription
GET/api/v1/engramsList engrams in a scope (paginated).
POST/api/v1/engramsCreate an engram.
GET/api/v1/engrams/{id}Retrieve.
PATCH/api/v1/engrams/{id}Update specific fields.
DELETE/api/v1/engrams/{id}Retire (soft delete).
POST/api/v1/engrams/{id}/feedbackSubmit positive/negative feedback.
POST/api/v1/engrams/{id}/promotePromote a candidate.
POST/api/v1/engrams/{id}/pinPin (admin). Audited.

Example — create:

Terminal window
curl -X POST https://plur.your-org.com/api/v1/engrams \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"statement": "Deploys must run migrations first.",
"type": "procedural",
"scope": "group:platform",
"domain": "software.deployment",
"tags": ["deploy", "migrations"]
}'
MethodPathDescription
POST/api/v1/recallBM25 + embeddings + RRF.
POST/api/v1/recall/bm25BM25 only.
POST/api/v1/injectInject relevant engrams for a task.

Example — inject:

Terminal window
curl -X POST https://plur.your-org.com/api/v1/inject \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"task": "Add a POST /users endpoint with validation.",
"scope": "group:platform",
"max_engrams": 10
}'
MethodPathDescription
GET/api/v1/episodesQuery timeline (filters: from, to, agent, channel, session).
POST/api/v1/episodesCapture an episode.
GET/api/v1/episodes/{id}Retrieve.
MethodPathDescription
POST/api/v1/sessionsStart a session.
POST/api/v1/sessions/{id}/endEnd a session, attach learnings.
GET/api/v1/sessions/{id}Retrieve.
MethodPathDescription
GET/api/v1/packsList installed packs.
POST/api/v1/packsInstall (multipart upload or URL).
DELETE/api/v1/packs/{name}Uninstall.
POST/api/v1/packs/exportExport a scope as a pack.

These endpoints require admin role.

MethodPathDescription
GET/api/v1/admin/usersList users.
POST/api/v1/admin/usersProvision (or via SCIM).
GET/api/v1/admin/groupsList groups.
POST/api/v1/admin/groups/{id}/membersAdd member.
GET/api/v1/admin/api-keysList API keys.
POST/api/v1/admin/api-keysIssue API key.
DELETE/api/v1/admin/api-keys/{id}Revoke.
GET/api/v1/admin/auditQuery audit log.
GET/api/v1/admin/insightsQuality metrics, engram health.
MethodPathDescription
GET/api/v1/admin/webhooksList webhooks.
POST/api/v1/admin/webhooksRegister.
DELETE/api/v1/admin/webhooks/{id}Remove.
POST/api/v1/admin/webhooks/{id}/testSend a test event.

Delivery signing: every webhook POST carries X-PLUR-Signature: sha256=<hmac> computed over the raw body with the webhook’s secret. Verify before processing. See Webhooks.

SCIM endpoints live at /scim/v2/ (separate root for protocol compliance):

PathDescription
/scim/v2/UsersUser provisioning.
/scim/v2/GroupsGroup provisioning.
/scim/v2/ServiceProviderConfigSCIM capabilities.

SCIM bearer tokens are managed in the admin dashboard. See SCIM 2.0 provisioning.

Errors are RFC 7807 problem documents:

{
"type": "https://docs.plur.ai/errors/insufficient-permission",
"title": "Insufficient permission",
"status": 403,
"detail": "User does not have write access to scope group:platform.",
"instance": "/api/v1/engrams"
}

Common statuses:

  • 400 — validation error
  • 401 — missing/invalid token
  • 403 — token valid but insufficient scope
  • 404 — not found (or hidden by permissions — same shape, by design)
  • 409 — conflict (e.g., duplicate engram id, pack integrity mismatch)
  • 429 — rate limit
  • 500 — server error

Default: 600 req/min/token. Per-route caps for write-heavy endpoints (POST/PATCH) at 60 req/min/token. Configurable per-deployment. Rate-limit state surfaces in RateLimit-* response headers.

v1 is the current contract. Breaking changes will bump to v2 with parallel hosting and a deprecation window. Additive changes (new fields, new endpoints) ship continuously without a version bump.