API Reference
OpenOfficeAI lets you create spreadsheets and documents with a single API call. You get back a shareable URL that opens a full editor in the browser. No SDK needed — just HTTP.
Base URL
https://openofficeai.comQuick Start
Create a spreadsheet in 3 steps:
1. Get an API key
Sign up at /signup, then go to Dashboard and generate an API key.
2. Create a spreadsheet
curl -X POST https://openofficeai.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "My First Sheet",
"sheets": [{
"rows": [
["Name", "Email", "Role"],
["Arjav Jain", "arjav@example.com", "Founder"],
["Vaibhav Jain", "vaibhav@example.com", "Co-founder"]
]
}]
}'3. Open the link
The response includes a url field. Open it in a browser — full spreadsheet editor, instantly shareable.
{
"id": "x7k2m9p3",
"url": "https://openofficeai.com/s/x7k2m9p3",
"type": "sheet",
"title": "My First Sheet",
"edit_token": "tok_...",
"created_at": "2026-03-24T10:00:00.000Z"
}Authentication
All write operations (POST, PUT, DELETE) require a Bearer token. GET requests are public and free.
Authorization: Bearer YOUR_API_KEY
Generate API keys from your Dashboard under the API Keys tab.
Create a Spreadsheet
POST/api/v1/sheetsCreates a new spreadsheet with optional pre-filled data. Returns a shareable URL.
Request Body
titleTitle shown in the editor tab and dashboard. Defaults to "Untitled Spreadsheet".
sheetsArray of sheet objects. Each sheet becomes a tab in the spreadsheet.
sheets[].nameTab name (e.g. "Revenue", "Q1 Data"). Defaults to "Sheet1".
sheets[].rowsSimple 2D array. First row is typically headers. Each inner array is one row. Values can be strings, numbers, or booleans.
sheets[].cellsCell-by-cell data keyed by cell reference (e.g. "A1", "B2"). Use this instead of rows when you need formatting or formulas. See next section.
Example — Simple rows
curl -X POST https://openofficeai.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Sales Report Q1",
"sheets": [
{
"name": "Revenue",
"rows": [
["Product", "Revenue", "Units Sold"],
["Widget A", 50000, 1200],
["Widget B", 32000, 800],
["Widget C", 78000, 2100]
]
},
{
"name": "Costs",
"rows": [
["Category", "Amount"],
["Marketing", 12000],
["Engineering", 45000]
]
}
]
}'Response
{
"id": "x7k2m9p3",
"type": "sheet",
"title": "Sales Report Q1",
"url": "https://openofficeai.com/s/x7k2m9p3",
"edit_token": "tok_NEwHxoaxrJ1bILIa...",
"created_at": "2026-03-24T10:00:00.000Z"
}Formatting & Formulas
POSTUse the cells object instead of rows for per-cell control. Keys are cell references like "A1", "B2", etc.
Cell Properties
valueThe cell value.
formulaExcel-style formula. Must start with = (e.g. "=SUM(B2:B10)", "=A1*1.1"). Supports 400+ functions.
boldBold the cell text.
italicItalicize the cell text.
fontSizeFont size in points (e.g. 14).
fontColorText color as hex (e.g. "#ff0000" for red).
bgColorBackground color as hex (e.g. "#f0f0f0" for light gray).
Example
curl -X POST https://openofficeai.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Budget Calculator",
"sheets": [{
"name": "Summary",
"cells": {
"A1": { "value": "Category", "bold": true, "bgColor": "#1e1e1e", "fontColor": "#ffffff" },
"B1": { "value": "Budget", "bold": true, "bgColor": "#1e1e1e", "fontColor": "#ffffff" },
"C1": { "value": "Actual", "bold": true, "bgColor": "#1e1e1e", "fontColor": "#ffffff" },
"D1": { "value": "Diff", "bold": true, "bgColor": "#1e1e1e", "fontColor": "#ffffff" },
"A2": { "value": "Marketing" },
"B2": { "value": 15000 },
"C2": { "value": 12300 },
"D2": { "formula": "=B2-C2" },
"A3": { "value": "Engineering" },
"B3": { "value": 50000 },
"C3": { "value": 48700 },
"D3": { "formula": "=B3-C3" },
"A4": { "value": "Total", "bold": true },
"B4": { "formula": "=SUM(B2:B3)", "bold": true },
"C4": { "formula": "=SUM(C2:C3)", "bold": true },
"D4": { "formula": "=B4-C4", "bold": true, "fontColor": "#10b981" }
}
}]
}'Create a Document
POST/api/v1/docsCreates a rich text document with headings, paragraphs, and formatting.
Content Block Properties
type"heading" or "paragraph". Determines how the block is rendered.
textThe text content of the block.
levelHeading level from 1 (largest) to 5 (smallest). Only applies when type is "heading".
boldBold the entire block.
italicItalicize the entire block.
colorText color as hex.
Example
curl -X POST https://openofficeai.com/api/v1/docs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Project Brief",
"content": [
{ "type": "heading", "level": 1, "text": "Project Brief: OpenOfficeAI" },
{ "type": "heading", "level": 2, "text": "Overview" },
{ "type": "paragraph", "text": "OpenOfficeAI is an API-first document platform that lets developers and AI agents create spreadsheets and documents programmatically." },
{ "type": "heading", "level": 2, "text": "Goals" },
{ "type": "paragraph", "text": "1. Launch public beta by end of March" },
{ "type": "paragraph", "text": "2. Reach 500 API keys in first month" },
{ "type": "paragraph", "text": "3. Achieve $2k MRR by Q2" },
{ "type": "heading", "level": 2, "text": "Timeline" },
{ "type": "paragraph", "text": "Week 1: API docs + SDK. Week 2: Stripe billing. Week 3: Product Hunt launch." }
]
}'Get a Document
GET/api/v1/sheets/:idor/api/v1/docs/:idRetrieve a document by ID. Returns the full data. No authentication required — anyone with the ID can read it.
curl https://openofficeai.com/api/v1/sheets/x7k2m9p3
Update a Document
PUT/api/v1/sheets/:idor/api/v1/docs/:idReplace the document data. Requires authentication. The data field should contain the full Univer snapshot object (the same format returned by GET).
curl -X PUT https://openofficeai.com/api/v1/sheets/x7k2m9p3 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "data": { ... } }'Delete a Document
DELETE/api/v1/sheets/:idor/api/v1/docs/:idPermanently delete a document. Requires authentication. This cannot be undone.
curl -X DELETE https://openofficeai.com/api/v1/sheets/x7k2m9p3 \ -H "Authorization: Bearer YOUR_API_KEY"
Download / Export
GET/api/v1/download/:id?format=FORMATExport a document in various formats. No authentication required.
Spreadsheet Formats
xlsx — Excel workbook
csv — Comma-separated values
html — HTML table
json — Raw JSON snapshot
Document Formats
pdf — PDF document
docx — Word document
txt — Plain text
json — Raw JSON snapshot
# Download spreadsheet as Excel curl -O https://openofficeai.com/api/v1/download/x7k2m9p3?format=xlsx # Download document as PDF curl -O https://openofficeai.com/api/v1/download/p3n8q2w1?format=pdf
Rate Limits
API calls are counted per user per month. GET requests are free and unlimited. Usage resets on the 1st of each month.
| Plan | Price | API Calls / month | Documents | Overage |
|---|---|---|---|---|
| Free | $0 | 500 | 25 | Blocked |
| Pro | $12/mo | 25,000 | Unlimited | $0.002/call |
| Scale | $49/mo | 200,000 | Unlimited | $0.001/call |
When you hit the limit, the API returns 429 Too Many Requests. Existing documents remain accessible.
Error Responses
All errors return JSON with an error field.
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad request — invalid JSON or missing fields | {"error": "Invalid request"} |
| 401 | Missing or invalid API key | {"error": "Authentication required"} |
| 404 | Document not found | {"error": "Not found"} |
| 429 | Rate limit exceeded | {"error": "API call limit reached..."} |