Routes

All routes live under /api. The general shape, and how requests are encoded, is specified in HTTP conventions; this page is the map. Replace <guid> with the 36-character document id and <w> with the zero-based worksheet index; when <w> is omitted the first worksheet is used. Routes marked as extension routes exist only when the corresponding extension is registered on the server.

Global actions

Documents

POST   /api/create                       Create a spreadsheet (config as a JSON string field)
GET    /api/list                         Documents owned by the token's user (intrasheets extension)

AI chats

GET    /api/chats                        The user's AI chat sessions (agent extension)

Profile

GET    /api/profile                      The user's profile (intrasheets extension)
POST   /api/profile                      Update the user's profile (name, email, model)

Document routes

Document configuration

GET    /api/<guid>                       Full document configuration (all worksheets)
DELETE /api/<guid>                       Destroy the document (broadcasts forceRefresh, disconnects its sockets)
GET    /api/<guid>/<w>                   Configuration of one worksheet
POST   /api/<guid>/name                  Rename the document (owner only)

Users

Provided by the intrasheets extension; all three are owner-only.

GET    /api/<guid>/users                 Invited users
POST   /api/<guid>/users                 Invite users (data: JSON array of objects with an email)
DELETE /api/<guid>/users/<email>         Remove an invited user

History, privacy and images

History and images require the S3 configuration; history routes are owner-only.

GET    /api/<guid>/history               List snapshots
GET    /api/<guid>/history/<version>     Fetch one snapshot's configuration
POST   /api/<guid>/history               Create a snapshot
POST   /api/<guid>/history/<version>     Restore a snapshot (backs up the current state first)
DELETE /api/<guid>/history/<version>     Delete a snapshot
POST   /api/<guid>/privacy               Set the privacy flag (privacy=1 or 0)
GET    /api/<guid>/images/<filename>     Fetch a stored image

AI chat

Provided by the agent extension.

GET    /api/<guid>/prompt                AI chat messages (?session=<id>, ?list=1 to list sessions)
POST   /api/<guid>/prompt                Send a prompt, streams the response (SSE)
DELETE /api/<guid>/prompt?session=<id>   Delete a chat session
GET    /api/<guid>/usage                 Accumulated AI token usage on this document

Worksheet modules

Modules accept GET to read and POST/DELETE to change; only the methods listed here are registered, and anything else returns 404.

Data and values

GET    /api/<guid>/<w>/data              Full data matrix
POST   /api/<guid>/<w>/data              Set data (array of rows, or objects with row and data)
GET    /api/<guid>/<w>/value/A1,B2       Values by cell list or range (A1:E10)
POST   /api/<guid>/<w>/value             Set values (data: array of { x, y, value })

Rows and columns

POST   /api/<guid>/<w>/rows/insert       Insert rows          (also /rows/move, /rows/show, /rows/hide)
DELETE /api/<guid>/<w>/rows/<list>       Delete rows          (also /rows/<start>/<count>)
POST   /api/<guid>/<w>/columns/insert    Insert columns       (also /columns/move, /columns/show, /columns/hide)
DELETE /api/<guid>/<w>/columns/<list>    Delete columns

Configuration

GET    /api/<guid>/<w>/config            Worksheet configuration (also /config/<prop,prop> for selected properties)
POST   /api/<guid>/<w>/config            Update configuration properties

Formatting

GET    /api/<guid>/<w>/style             All styles (?indexes=true), or /style/<cells> for specific cells
POST   /api/<guid>/<w>/style             Set styles           DELETE /style/<cells> to reset them
GET    /api/<guid>/<w>/meta              Meta information, or /meta/<cells>
POST   /api/<guid>/<w>/meta              Set meta             DELETE /meta or /meta/<cells> to reset
GET    /api/<guid>/<w>/comments          Comments, or /comments/<cells>
POST   /api/<guid>/<w>/comments          Set comments
GET    /api/<guid>/<w>/merge             Merged cells, or /merge/<cells>
POST   /api/<guid>/<w>/merge             Set merges           DELETE /merge (all) or /merge/<cells>

Headers and footers

GET    /api/<guid>/<w>/header            Headers, or /header/<columns>
POST   /api/<guid>/<w>/header            Set a header (column, title)
POST   /api/<guid>/<w>/nested            Set nested headers   (also /nested/update; DELETE /nested to reset)
GET    /api/<guid>/<w>/footers           Footers
POST   /api/<guid>/<w>/footers           Set footers          (also /footers/value; DELETE /footers to reset)

Structure

GET    /api/<guid>/<w>/width             Column widths, or /width/<columns>     POST to set
GET    /api/<guid>/<w>/height            Row heights, or /height/<rows>         POST to set
POST   /api/<guid>/<w>/freeze/rows       Set frozen rows      (also /freeze/columns)
POST   /api/<guid>/<w>/group/rows        Set a row group      (also /group/columns)

Sorting, properties and validations

POST   /api/<guid>/<w>/order             Sort by a column (columnNumber, direction)
GET    /api/<guid>/<w>/properties/<c>    Column properties    (also /properties/<c>/<r> for one cell)
POST   /api/<guid>/<w>/properties        Set properties       (also /properties/update to merge)
GET    /api/<guid>/<w>/definedNames      Defined names        POST to set; DELETE /definedNames/<names>
GET    /api/<guid>/<w>/validations       Validations          POST to set

Media

POST   /api/<guid>/<w>/media             Set charts and images

Worksheet management

POST   /api/<guid>/<w>/worksheet         Create a worksheet   (also /worksheet/move, /worksheet/rename)
DELETE /api/<guid>/<w>/worksheet/<index> Delete a worksheet

Formify

Self-authorized: these routes skip the server auth hooks and respond only for worksheets with a formify configuration. The worksheet index is required in the path.

GET    /api/<guid>/<w>/formify           HTML page embedding the public form
GET    /api/<guid>/<w>/formify/config    Form configuration (declared columns)
POST   /api/<guid>/<w>/formify           Public form submission (inserts one row, restricted to the form columns)

Each module's exact methods, parameters and response shapes are documented on its page in this section. See Rows, Data, Values, and the rest of the sidebar.