Documents

Create a document

Creates a document or a spreadsheet. A new spreadsheet arrives with its workbook ready, so the spreadsheet endpoints work on it immediately.

POST /v1/documents

Permission

The key must be granted docs.documents.write

A key without it gets 403 insufficient_scope, with the missing permission named in details.

A new spreadsheet arrives with its workbook already seeded, so the spreadsheet endpoints work on it immediately rather than after a first write.

Request body

Field Type Description
type required string A file is not created here: uploading one creates it, and minting an empty file would leave a row with no bytes behind it. documentspreadsheet
title string Defaults to an untitled name.
folder_id string Where to file it. The root when omitted.
metadata object Anything you want to keep with the document. Yours to shape; this API does not read it.

Request

curl https://api.veruapis.com/v1/documents \
  -X POST \
  -H "Authorization: Bearer vak_live_..." \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "type": "spreadsheet", "title": "Q3 plan", "folder_id": "0192f001-0000-7a41-b8d2-5e9f0c3a7b41" }'

Idempotency-Key is required on every write. Retrying with the same key returns the original response rather than repeating the operation, so a timeout is something you retry rather than something you investigate.

Response

Answers 201.

Field Type Description
id string
type string documentspreadsheet
title string
state string activetrashed
owner_id string The workspace user who owns it, which is not necessarily the key's owner.
folder_id string Empty for a document in the root.
metadata object Whatever you stored on it.
created_at RFC 3339
updated_at RFC 3339
{
  "data": {
  "id": "0192a1c2-6f3e-7a41-b8d2-5e9f0c3a7b41",
  "type": "spreadsheet",
  "title": "Q3 plan",
  "state": "active",
  "folder_id": "0192f001-0000-7a41-b8d2-5e9f0c3a7b41",
  "created_at": "2026-09-10T09:00:00Z",
  "updated_at": "2026-09-10T09:00:00Z"
},
  "meta": { "request_id": "req_01j8z9...", "timestamp": "2026-09-02T10:00:00Z" }
}
Worth knowing

A new spreadsheet arrives with its workbook seeded, so you can write a range into it in the very next call. type file is not accepted here: uploading a file is what creates one.

Errors

Every failure uses the same shape, with a stable string code you can branch on. See the error reference.

Related

POST /v1/documents

Sends this body to your own workspace, for real. Edit it before running.