RowScribe Document Generation API
The RowScribe API generates PDFs and emails from your own software. Send rows as JSON and get documents back, using your RowScribe templates, data and delivery settings. Your plan, your monthly document allowance and who may edit what all apply, just as they do in the app.
Last updated November 27, 2026
https://rowscribe.com/api/v1Quickstart
On a plan with API access (Starter and above), an Owner or Admin, or a Member whose permission set includes Use the API, opens Developers → API and creates a key with the scopes it needs. The key is shown once, so copy it then. The examples read it from an environment variable:
export ROWSCRIBE_API_KEY="rsc_…"The steps build on each other: in each language, run them in order as one script. Want the whole program in one file? It's in the quickstarts for Node.js, Python, C#. Prefer to click through the steps? The API reference has a Postman collection with every endpoint.
Check the key
GET /meworks with any key. It shows the key's scopes, the workspace and plan, and how many documents are left this period.curl "https://rowscribe.com/api/v1/me" \ -H "X-API-Key: $ROWSCRIBE_API_KEY"const api = "https://rowscribe.com/api/v1"; const headers = { "X-API-Key": process.env.ROWSCRIBE_API_KEY }; const me = await (await fetch(`${api}/me`, { headers })).json(); console.log(me.key.scopes, me.allowance.documentsRemaining);import os import requests api = "https://rowscribe.com/api/v1" headers = {"X-API-Key": os.environ["ROWSCRIBE_API_KEY"]} me = requests.get(f"{api}/me", headers=headers).json() print(me["key"]["scopes"], me["allowance"].get("documentsRemaining"))using System.Net.Http.Json; using System.Text.Json; const string api = "https://rowscribe.com/api/v1"; using var http = new HttpClient(); http.DefaultRequestHeaders.Add("X-API-Key", Environment.GetEnvironmentVariable("ROWSCRIBE_API_KEY")); var me = await http.GetFromJsonAsync<JsonElement>($"{api}/me"); Console.WriteLine(me.GetProperty("allowance"));Find a template and its columns
GET /templateslists your templates.GET /templates/{id}returnsdataColumns: the columns each row needs.curl "https://rowscribe.com/api/v1/templates?search=invoice" \ -H "X-API-Key: $ROWSCRIBE_API_KEY"const templates = await (await fetch(`${api}/templates?search=invoice`, { headers })).json(); const templateId = templates.data[0].id;templates = requests.get(f"{api}/templates", headers=headers, params={"search": "invoice"}).json() template_id = templates["data"][0]["id"]var templates = await http.GetFromJsonAsync<JsonElement>($"{api}/templates?search=invoice"); var templateId = templates.GetProperty("data")[0].GetProperty("id").GetString();Create a job
Each row becomes one document. Send an
Idempotency-Keyso a retried request can't create the job twice.curl -X POST "https://rowscribe.com/api/v1/jobs" \ -H "X-API-Key: $ROWSCRIBE_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: invoices-2026-11" \ -d '{ "templateId": "TEMPLATE_ID", "rows": [ { "Name": "John Smith", "Amount": 120 }, { "Name": "Jane Doe", "Amount": 95.5 } ] }'const created = await fetch(`${api}/jobs`, { method: "POST", headers: { ...headers, "Content-Type": "application/json", "Idempotency-Key": "invoices-2026-11" }, body: JSON.stringify({ templateId, rows: [ { Name: "John Smith", Amount: 120 }, { Name: "Jane Doe", Amount: 95.5 }, ], }), }); let job = await created.json();job = requests.post( f"{api}/jobs", headers={**headers, "Idempotency-Key": "invoices-2026-11"}, json={ "templateId": template_id, "rows": [ {"Name": "John Smith", "Amount": 120}, {"Name": "Jane Doe", "Amount": 95.5}, ], }, ).json()using var request = new HttpRequestMessage(HttpMethod.Post, $"{api}/jobs"); request.Headers.Add("Idempotency-Key", "invoices-2026-11"); request.Content = JsonContent.Create(new { templateId, // A dictionary per row, so the column names keep their case. rows = new[] { new Dictionary<string, object> { ["Name"] = "John Smith", ["Amount"] = 120 }, new Dictionary<string, object> { ["Name"] = "Jane Doe", ["Amount"] = 95.5 }, }, }); var created = await http.SendAsync(request); var job = await created.Content.ReadFromJsonAsync<JsonElement>();Get the result
Jobs are queued, so creating one never waits for the documents: it answers at once with the job, and the documents follow. There are two ways to know when they're ready.
Recommended: a webhook
Create a webhook endpoint once with
POST /webhook-endpointsand keep the signing secret it returns. Name the endpoint in a job's delivery,"delivery": { "method": "webhook", "endpointId": "…" }, and when the job completes RowScribe posts ajob.completedevent to your server with a link to the file. The link works for 24 hours, without your key. Webhooks are on Pro and above. A job that fails or is canceled sends no event, so a job you're waiting on that never reports is worth checking.job.completed{ "type": "job.completed", "timestamp": "2026-11-04T14:30:00Z", "data": { "jobId": "8d0f6c2a-4b1e-4c57-9a3e-2f6d1b7c9e40", "templateId": "3f6a1c2e-9b7d-4e51-8a20-6c4d2b9e1f07", "templateName": "Monthly invoices", "totalRows": 2, "completedAt": "2026-11-04T14:30:00Z", "file": { "url": "https://…", "expiresAt": "2026-11-05T14:30:00Z", "name": "Monthly invoices.zip", "contentType": "application/zip", "sizeBytes": 48213, "sha256": "…" } } }The event carries everything you need. If you also read the job straight away, its
statuscan still showprocessingfor a moment.Check the signature before trusting an event. Deliveries follow the Standard Webhooks format, so a library for it works too. A failed delivery is sent again with the same
webhook-id, so skip one you've already handled.import crypto from "node:crypto"; // body: the raw request body, exactly as received (a Buffer), not re-serialised JSON. function verify(body, headers) { const secret = Buffer.from(process.env.ROWSCRIBE_WEBHOOK_SECRET.replace(/^whsec_/, ""), "base64"); const id = headers["webhook-id"]; const timestamp = headers["webhook-timestamp"]; if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 5 * 60) return false; const expected = Buffer.from("v1," + crypto.createHmac("sha256", secret) .update(`${id}.${timestamp}.`).update(body).digest("base64")); return headers["webhook-signature"].split(" ").some((signature) => signature.length === expected.length && crypto.timingSafeEqual(Buffer.from(signature), expected)); }import base64, hashlib, hmac, os, time # body: the raw request body, exactly as received (bytes), not re-serialised JSON. def verify(body: bytes, headers) -> bool: secret = base64.b64decode(os.environ["ROWSCRIBE_WEBHOOK_SECRET"].removeprefix("whsec_")) msg_id, timestamp = headers["webhook-id"], headers["webhook-timestamp"] if abs(time.time() - int(timestamp)) > 5 * 60: return False signed = f"{msg_id}.{timestamp}.".encode() + body expected = "v1," + base64.b64encode(hmac.new(secret, signed, hashlib.sha256).digest()).decode() return any(hmac.compare_digest(signature, expected) for signature in headers["webhook-signature"].split())using System.Security.Cryptography; using System.Text; // body: the raw request body, exactly as received, not re-serialised JSON. static bool Verify(string body, IHeaderDictionary headers) { var secret = Convert.FromBase64String( Environment.GetEnvironmentVariable("ROWSCRIBE_WEBHOOK_SECRET")!.Replace("whsec_", "")); string id = headers["webhook-id"]!, timestamp = headers["webhook-timestamp"]!; if (Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - long.Parse(timestamp)) > 5 * 60) return false; var mac = HMACSHA256.HashData(secret, Encoding.UTF8.GetBytes($"{id}.{timestamp}.{body}")); var expected = Encoding.UTF8.GetBytes("v1," + Convert.ToBase64String(mac)); return headers["webhook-signature"].ToString().Split(' ') .Any(signature => CryptographicOperations.FixedTimeEquals(Encoding.UTF8.GetBytes(signature), expected)); }Or: check the job
Ask
GET /jobs/{id}for the job. While it waits or runs, the answer has aRetry-Afterheader: wait that many seconds before asking again. Oncestatusiscompleted,downloadUrlis where to get the output, one PDF or a ZIP with a PDF per row. Give up after a while rather than checking forever; the job carries on either way.curl -i "https://rowscribe.com/api/v1/jobs/JOB_ID" \ -H "X-API-Key: $ROWSCRIBE_API_KEY" # While it waits or runs, the answer says how long to wait: Retry-After: 5 # Once "status" is "completed", get the file from "downloadUrl": curl "https://rowscribe.com/api/v1/jobs/JOB_ID/download" \ -H "X-API-Key: $ROWSCRIBE_API_KEY" \ -OJimport { writeFile } from "node:fs/promises"; const waiting = ["pending", "scheduled", "processing"]; const deadline = Date.now() + 10 * 60 * 1000; let check = await fetch(`${api}/jobs/${job.id}`, { headers }); job = await check.json(); while (waiting.includes(job.status) && Date.now() < deadline) { const seconds = Number(check.headers.get("retry-after") ?? 5); await new Promise((r) => setTimeout(r, seconds * 1000)); check = await fetch(`${api}/jobs/${job.id}`, { headers }); job = await check.json(); } if (job.downloadUrl) { const file = await fetch(job.downloadUrl, { headers }); // One PDF when the documents are merged or there's only one; otherwise a ZIP. const ext = file.headers.get("content-type")?.includes("pdf") ? "pdf" : "zip"; await writeFile(`output.${ext}`, Buffer.from(await file.arrayBuffer())); }import time waiting = ("pending", "scheduled", "processing") deadline = time.time() + 10 * 60 check = requests.get(f"{api}/jobs/{job['id']}", headers=headers) job = check.json() while job["status"] in waiting and time.time() < deadline: time.sleep(int(check.headers.get("Retry-After", 5))) check = requests.get(f"{api}/jobs/{job['id']}", headers=headers) job = check.json() if job.get("downloadUrl"): file = requests.get(job["downloadUrl"], headers=headers) # One PDF when the documents are merged or there's only one; otherwise a ZIP. ext = "pdf" if "pdf" in file.headers.get("Content-Type", "") else "zip" with open(f"output.{ext}", "wb") as f: f.write(file.content)var id = job.GetProperty("id").GetString(); string[] waiting = ["pending", "scheduled", "processing"]; var deadline = DateTime.UtcNow.AddMinutes(10); var check = await http.GetAsync($"{api}/jobs/{id}"); job = await check.Content.ReadFromJsonAsync<JsonElement>(); while (waiting.Contains(job.GetProperty("status").GetString()) && DateTime.UtcNow < deadline) { await Task.Delay(check.Headers.RetryAfter?.Delta ?? TimeSpan.FromSeconds(5)); check = await http.GetAsync($"{api}/jobs/{id}"); job = await check.Content.ReadFromJsonAsync<JsonElement>(); } if (job.TryGetProperty("downloadUrl", out var url) && url.GetString() is { } link) { // One PDF when the documents are merged or there's only one; otherwise a ZIP. var file = await http.GetAsync(link); var ext = file.Content.Headers.ContentType?.MediaType == "application/pdf" ? "pdf" : "zip"; await File.WriteAllBytesAsync($"output.{ext}", await file.Content.ReadAsByteArrayAsync()); }
POST /documents takes a single row instead of a list. It's queued like any job and answered at once with 202 Accepted and the job (POST /jobs answers 201 Created), so you follow it the same way, or name a webhook endpoint in its delivery.Authentication
Send your key in the X-API-Key header on every request. A key works only in the workspace it was created in, and only for what its scopes allow. It's tied to the person who created it, and their role in the workspace applies to every request: a Member's key can read the workspace's items and create new ones, but change or delete only what that Member created, as in the app. What it creates is listed as theirs, and it stops working if they leave the workspace.
X-API-Key: rsc_…A key stops working the moment it's revoked or expires, or its creator leaves the workspace. It also stops working while the workspace's plan doesn't include API access. Keep keys on your server: anyone holding one can use your document allowance.
Scopes
Each key holds scopes, chosen when it's created. A write scope includes its read scope. Scopes can't be changed later; create a new key for different access. A request without the scope it needs answers 403 insufficient_scope, naming the scope.
| Scope | Allows |
|---|---|
templates:read | List and read templates, starters, versions, sample data, previews and export files. |
templates:write | Create from a starter, duplicate, rename, archive, restore, import and send test emails. |
jobs:read | List jobs, read their status, logs and webhook deliveries, and download their output. |
jobs:write | Create, validate, cancel, delete, re-run and retry jobs, send a webhook delivery again, and generate single documents. |
datasets:read | List, read and export stored datasets. |
datasets:write | Create, update, add or replace rows in, and delete stored datasets. |
schedules:read | List and read schedules and their run history. |
schedules:write | Create, update, delete, enable, disable and run schedules. |
runs:approve | Approve runs waiting for the key's creator as a named approver. Add schedules:read to find them. |
recipients:read | List, read and export recipient lists. |
recipients:write | Create, update and delete recipient lists. |
webhooks:read | List and read webhook endpoints. |
webhooks:write | Create, update, delete and rotate webhook endpoints. |
workspace:read | Read the workspace's members and verified recipients, and the Gmail, Outlook and Google accounts the key's creator has connected. |
Never available to a key, whatever its scopes: AI template generation, your account, password and two-factor, billing and purchases, API keys themselves, connecting Gmail, Outlook or Google, confirming verified recipients, workspace settings, invitations and roles, and support tickets. Those stay in the app.
Errors
Every error has the same JSON shape. Branch on code, which never changes; show message to a person. Some errors add details. For example, a refused recipient list names each rejected address and why.
{
"code": "missing_merge_field",
"message": "Data file does not match template. Your data has no InvoiceNumber column, which this template uses."
}| Code | Status | Meaning |
|---|---|---|
missing_api_key | 401 | No X-API-Key header was sent. |
invalid_api_key | 401 | The key isn't one of ours, or its creator has left the workspace. Check you copied the whole key. |
api_key_revoked | 401 | The key was revoked. Create a new one in Developers → API. |
api_key_expired | 401 | The key's expiry date has passed. Create a new one. |
unauthorized | 401 | The request isn't signed in. |
account_suspended | 403 | The account that created the key is suspended. |
email_not_verified | 403 | The account that created the key hasn't verified its email address. |
legal_acceptance_required | 403 | The key's creator needs to review the updated policies in the app before the key can make changes. Reads still work. |
api_access_disabled | 403 | API access is turned off for this workspace. |
api_access_not_allowed | 403 | The key's creator doesn't have API access in this workspace: their permission set doesn't include Use the API. A workspace Owner or Admin can give it back; the key works again once they do. |
plan_required | 403 | The workspace's plan doesn't include this. The message names the plan that does. |
insufficient_scope | 403 | The key doesn't hold the scope this operation needs. The message names it; scopes can't be added to a key, so create a new one. |
forbidden | 403 | The key's creator isn't allowed to do this in the workspace (for example, a Member editing someone else's work). |
not_found | 404 | No such resource in the key's workspace. Ids from another workspace answer this too. |
method_not_allowed | 405 | The route exists but not with this HTTP method. |
validation_failed | 400 | The request was refused; the message says why. |
unsupported_media_type | 415 | The body's Content-Type isn't one this operation accepts. |
file_too_large | 413 | The upload or request body is over the size limit. |
missing_merge_field | 400 | The data has no column for a merge field the template uses. The message names it. |
invalid_merge_tag | 400 | A merge tag in the template can't be rendered (a misspelled filter, an unquoted format). The message names the tag. |
row_cap_exceeded | 400 | More rows than one job may hold. Split the data into several jobs. |
template_grouping_not_allowed | 400 | A combined email + PDF job can't use a template that groups line items. |
recipient_not_verified | 400 | An email recipient isn't a workspace member or a verified recipient. |
connection_expired | 400 | The connected Gmail, Outlook or Google account needs reconnecting in the app. |
endpoint_not_found | 400 | The webhook endpoint named in the request doesn't exist in this workspace. |
endpoint_paused | 400 | The webhook endpoint named in the request has been paused by support. |
schedule_spent | 400 | A one-time schedule that has already run can't be enabled again. Give it a new run time. |
allowance_exceeded | 402 | The monthly document allowance and any document packs can't cover this many documents. |
job_not_completed | 409 | The job hasn't finished, or finished without a file to download. Check its status first. |
edit_conflict | 409 | Someone changed this since you read it. Read it again and reapply your change with the new revision. |
duplicate_row_key | 409 | Two rows would have the same row key. The message names them. To change a row that's already there, send it to PATCH /datasets/{id}/rows. |
in_use | 409 | Something still uses this (a schedule, for example). The message says what. |
limit_reached | 409 | The workspace has reached a count limit (keys, webhook endpoints…). The message names it. |
idempotency_conflict | 409 | This Idempotency-Key was already used with a different request body. |
idempotency_in_progress | 409 | A request with this Idempotency-Key is still being processed. Retry shortly. |
concurrent_job_limit | 429 | This key already has the maximum number of jobs waiting or running. Retry after one finishes. |
rate_limited | 429 | Too many requests for this key. Wait for the Retry-After seconds. |
service_busy | 503 | RowScribe is busy accepting other jobs. Retry after the Retry-After seconds. |
maintenance | 503 | RowScribe is in maintenance mode; changes are paused for a few minutes. Reads still work. |
api_paused | 503 | The API is paused for a short while. Retry later. |
internal_error | 500 | Something went wrong on our side. It has been reported. |
Rate limits
- Over a limit, the answer is
429 rate_limitedwith aRetry-Afterheader in seconds. Too many jobs queued or running at once answers429 concurrent_job_limit; jobs set for a later time don't count. - When RowScribe is busy accepting jobs, a create can answer
503 service_busywithRetry-After. Retry with the sameIdempotency-Key. - The limit that matters most is your plan's monthly document allowance, then any document packs. A job they can't cover is refused with
402 allowance_exceeded.GET /meandGET /jobs/limitsshow what's left, andPOST /jobs/validateshows what a job would use without creating it. - A workspace can have up to 10 active keys.
Idempotency
Every POST accepts an Idempotency-Key header of up to 255 characters; a UUID works. Send the same key with the same body within 24 hours and you get the first answer back, marked Idempotent-Replayed: true. No second job is created and nothing is counted twice.
- The same key with a different body answers
409 idempotency_conflict. - A retry while the first request is still running answers
409 idempotency_in_progress. - Only answers from requests that ran are kept. A refused request (any
4xx, such as a validation error) or a busy503leaves nothing behind, so fixing it and retrying with the same key runs it again. - Answers over 1 MB, such as a large PDF preview, aren't kept; the request runs again.
Pagination and revisions
Every list has the same shape. Ask for more with ?page= and ?pageSize= (up to 200). An id from another workspace answers 404 not_found, as if it didn't exist.
{
"data": [ ... ],
"page": 1,
"pageSize": 20,
"total": 132
}Templates, datasets and schedules carry a revision. Send back the revision you read when you update one: renaming a template or restoring a version, replacing a dataset or its rows, or updating a schedule. If someone changed the item since, the answer is 409 edit_conflict: read it again and reapply your change.
Delivering documents
A job's delivery says where its documents go. Left out, a PDF template's documents wait for download. An email template, or a combined job, must use connected_email; any other method is refused.
| method | What happens | Needs | Plan |
|---|---|---|---|
download | The output waits for GET /jobs/{id}/download. | Nothing | Any |
email | RowScribe emails the documents from its own address. | to or recipientListId; recipients outside the workspace must be verified | Starter and above |
connected_email | Sent from a Gmail or Outlook account the key's creator has connected: one email per row for an email template, or for a PDF template whose to is a column tag. | connectedAccountId | Starter and above |
webhook | A signed job.completed event, with a 24-hour link to the output, is posted to one of your webhook endpoints. | endpointId | Pro and above |
storage | The output is uploaded to your own storage. | storageUrl, a pre-signed PUT URL | Business and above |
For an email template, to must be a column tag such as {{ Email }}, and cc and subject can use tags too: each row gets its own email. Name each PDF from its row with fileNamePattern, for example Invoice-{{ InvoiceNumber }}.
"delivery": {
"method": "connected_email",
"connectedAccountId": "8d0f6c2a-4b1e-4c57-9a3e-2f6d1b7c9e40",
"to": "{{ Email }}",
"subject": "Your invoice {{ InvoiceNumber }}",
"fileNamePattern": "Invoice-{{ InvoiceNumber }}"
}Webhooks
To be told when a job finishes, create a webhook endpoint with POST /webhook-endpoints. Its signing secret is returned once, so store it then. Name the endpoint in the job's delivery, as in the example above.
- Each delivery is signed. Check the signature with the secret before trusting the body.
- A failed delivery is tried again on its own, with the same
webhook-id, up to five more times: after 30 seconds, 5 minutes, 30 minutes, 2 hours and 6 hours, about eight and a half hours in all. A redirect isn't retried, and retries stop if the endpoint is paused or deleted. Every attempt shows inGET /jobs/{id}/webhook-deliveries, and you can send one again. - Rotating the secret keeps the old one valid for 24 hours, so you can switch over without missing a delivery.
How to verify the signature: step 4 of the quickstart.
What the API covers
Templates are designed in the editor; the API never edits a design. It reads names, merge fields and the columns a job needs, and the design itself travels only inside the export file. To move a template between workspaces or accounts, export it and import the file (formatVersion 2). Every version RowScribe has written still imports.