Vai al contenuto

API REST

URL di base, accesso, tenant, gli endpoint principali ed eventi in tempo reale.

DisponibileAggiornato: 9 novembre 2026

Il testo di questa pagina è in inglese (disponibile anche in tedesco).

The REST API is the same interface the demi app, the CLI and the MCP server work with. What the app can do, your integration can do too, with the same permissions.

Base URL
https://api.godemi.com
Format
JSON over HTTPS, paths under /v1/
Contract
OpenAPI 3.1. We send you the document on request.
Sign-in
API key or OAuth token as a bearer token
Real time
Server-sent events under /v1/stream/

First request

Terminal
curl https://api.godemi.com/v1/me/profile \  -H "Authorization: Bearer <your-api-key>"

Without a valid token the API answers 401. How to create a key: Sign-in and keys.

Tenants

Every request runs in exactly one tenant. An API key uses the one it was created in. Pick another tenant you are a member of with the x-demi-tenant-id header:

Terminal
curl https://api.godemi.com/v1/tenants/current \  -H "Authorization: Bearer <your-api-key>" \  -H "x-demi-tenant-id: <workspace-id>"

A token that spans several tenants needs the header to write. Without it the API answers 422 with the code TENANT_NOT_SELECTED.

What the API covers

  • Pages and blocks: read, search, create, change, move, publish, export
  • Links, files and uploads, comments, versions
  • Members, org units, roles and permissions
  • Agents and their runs
  • Lead report orders
  • Your profile: keys, second factor, sessions
  • Real-time events over server-sent events

Key endpoints

GET/v1/me/profile
Your profile. The simplest test for key and connection.
GET/v1/docs
List pages. Search with q, page through with cursor and limit (up to 200).
GET/v1/docs/grep
Full-text search across every page you may see.
GET/v1/docs/{id}
One page with its blocks and links. format=ddmd returns it as Markdown.
POST/v1/docs
Create a page, optionally with its first blocks.
PATCH/v1/docs/{id}
Change a page's title, description or status.
GET/v1/agents
The agents of your tenant.
POST/v1/runs
Start a run; GET /v1/runs/{id} shows its state.
SSE/v1/stream/events
Real-time events for up to 50 pages.

Read and search pages

Terminal
curl "https://api.godemi.com/v1/docs?q=quote&limit=20" \  -H "Authorization: Bearer <your-api-key>"

Lists come in pages. Pass the cursor from the last answer to fetch the next one.

Real-time events

Terminal
curl -N "https://api.godemi.com/v1/stream/events?docs=<page-id>" \  -H "Authorization: Bearer <your-api-key>" \  -H "Accept: text/event-stream"

The connection stays open, and each event arrives as its own message. Separate several pages with commas. The CLI does the same with demi events subscribe.

Permissions and errors

The API never widens your permissions. If you cannot see a page in the app, the API will not return it either, and it refuses what you may not change. demi checks this on the server for every request.

  • 401: the token is missing, expired or revoked.
  • 422: the request does not fit, for example a missing or contradicting tenant.

Good to know

Il tuo configuratore

Ancora nessun caso d'uso

Il tuo configuratore è ancora vuoto

Aggiungi un caso d'uso da qualsiasi scheda o pagina del caso e guarda quanto vale all'anno, con il calcolo. Gratis, senza registrazione, senza impegno: provalo e cambia ogni numero.

Vedi i casi d'uso