Overview

The Office Runtime API tracks Office add-in bindings and active sessions on the local gateway. It is used by the Allternit Office add-in to bootstrap a document binding, sync runtime state, and query active bindings. State is persisted to ~/.allternit/gateway-office-runtime.json and cleaned up automatically based on TTL rules. A binding represents a unique Office document; a session represents one active add-in instance attached to a binding.

Base URL

For local development:

Authentication

Office runtime routes are currently local-gateway routes. When accessed through the platform API they inherit the standard bearer-token auth middleware. See Authentication.

Data models

OfficeBinding

OfficeRuntimeSession

Endpoints

Bootstrap a document

Creates a binding for the document if one does not exist, creates or updates a session, and returns both plus gateway metadata.

Request body

Example request

Example response

Sync runtime state

Updates an existing binding and session with new document, platform, or runtime state.

Request body

Example response

Same shape as /bootstrap.

List bindings

Returns all non-stale bindings with their active sessions.

Example response

Get a binding

Returns a single binding with active sessions.

Error codes