Docs

Agent API

One URL. Everyday JSON. Paths are names, not A1. Built so a language model can discover the surface, then read and write a nested workbook without guessing Excel.

Start here

If you are a model: GET this endpoint with no body. It returns the full catalog, examples, and error hints. Then authenticate.

GET  https://ficarra.app/api/metagrid
POST https://ficarra.app/api/metagrid
Content-Type: application/json
Authorization: Bearer mg_live_…

{ "op": "help" }

Machine-readable copy of this page: /metagrid/llms.txt. Keys: signed-in app → Settings → Agent API keys. The secret is shown once.

Mental model for callers

Operations

Closed set. Synonyms work (read→get, append→insert, ls→outline).

opDoes
helpCatalog. No auth.
whoamiConfirm the key.
listOwned sheets (id, title, etag).
createNew sheet from title + optional value JSON. Omit value for a blank grid.
outlineNames and kinds, no cell values. Cheap first read.
getEveryday JSON at path (omit path for the whole tree).
setWrite a cell, record, column, or replace a node. Creates missing dictionary keys.
insertAppend table records. New keys become fields.
updatewhere and/or record + set fields.
deleteRemove matching records. Does not delete the sheet.
dropDelete the sheet. confirm must equal the title.
batchSeveral mutations, one save. Stops on the first error.
identitiesLinked emails and phone numbers (From identities).
identity_addLink an email or phone. JWT session only. Sends a verification code.
identity_confirmConfirm the 6-digit code.
identity_default / identity_deleteDefault From, or unlink.
send_emailto, subject, body, optional from (linked address or label). Reply-To is that address.
send_textSMS when Twilio is configured. from is a linked number or label.

Example

{ "op": "create", "title": "Team", "value": {
  "People": [
    { "Name": "Ada", "Role": "Lead", "Salary": 120000 }
  ]
}}
{ "op": "insert", "sheet": "<id>", "path": "People", "etag": "<etag>",
  "records": [{ "Name": "Bob", "Role": "Eng", "Salary": 90000 }] }
{ "op": "update", "sheet": "<id>", "path": "People", "etag": "<etag>",
  "where": { "Name": "Ada" }, "set": { "Salary": 130000 } }
{ "op": "get", "sheet": "<id>", "path": "People.1.Salary" }

Errors look like { "ok": false, "error": "path_not_found", "message": "…", "hint": "…", "nearby": ["People"] }. Read hint and nearby before retrying.

What this is not