Create spreadsheets & documents with cURL
Create a shareable spreadsheet straight from your terminal or a shell script with a single curl command. This is the fastest way to test the API or wire document creation into bash scripts, CI pipelines, and cron jobs. The response includes a URL you can open immediately.
curl -X POST https://openofficeai.com/api/v1/sheets \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Q3 Revenue",
"sheets": [{
"rows": [
["Month", "Revenue", "Growth"],
["July", 48200, "+12%"],
["August", 61900, "+28%"]
]
}]
}'
# Response: { "id": "...", "url": "https://openofficeai.com/s/...", ... }How to create a spreadsheet with cURL
- 1Copy your API key from the dashboard.
- 2Run the curl command with your Bearer token and a JSON -d body.
- 3Open the url from the JSON response in any browser.
- 4Pipe the response through jq to extract the URL in scripts: ... | jq -r .url
Why use OpenOfficeAI with cURL
- One command — ideal for CI/CD, cron jobs, and quick testing.
- No language runtime or SDK required.
- Download the result as XLSX/PDF with curl -OJ /api/v1/download/{id}?format=pdf.
Frequently asked questions
How do I download the spreadsheet as a file from the command line?
Use curl -OJ "https://openofficeai.com/api/v1/download/{id}?format=xlsx" (swap xlsx for pdf or csv). The -OJ flags save the file with the server-provided filename.
Can I create a spreadsheet anonymously to test it?
Yes. You can omit the Authorization header to create a document anonymously for testing. Authenticated requests with an API key count toward your plan and appear in your dashboard.
How do I generate the JSON body dynamically in a script?
Build the JSON with a tool like jq or your language of choice and pass it to curl with -d @body.json, or pipe it via --data-binary @-. This keeps large datasets out of the command line.
Start creating documents with cURL
Free tier includes 500 API calls per month — no card required.
Related integrations