REST API · v1

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

Base URL https://rowscribe.com/api/v1

Quickstart

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:

Terminal
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.

  1. Check the key

    GET /me works 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"
  2. Find a template and its columns

    GET /templates lists your templates. GET /templates/{id} returns dataColumns: the columns each row needs.

    curl "https://rowscribe.com/api/v1/templates?search=invoice" \
      -H "X-API-Key: $ROWSCRIBE_API_KEY"
  3. Create a job

    Each row becomes one document. Send an Idempotency-Key so 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 }
      ]
    }'
  4. 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-endpoints and 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 a job.completed event 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 status can still show processing for 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));
    }

    Or: check the job

    Ask GET /jobs/{id} for the job. While it waits or runs, the answer has a Retry-After header: wait that many seconds before asking again. Once status is completed, downloadUrl is 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" \
      -OJ
One document at a time? 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.

Header
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.

ScopeAllows
templates:readList and read templates, starters, versions, sample data, previews and export files.
templates:writeCreate from a starter, duplicate, rename, archive, restore, import and send test emails.
jobs:readList jobs, read their status, logs and webhook deliveries, and download their output.
jobs:writeCreate, validate, cancel, delete, re-run and retry jobs, send a webhook delivery again, and generate single documents.
datasets:readList, read and export stored datasets.
datasets:writeCreate, update, add or replace rows in, and delete stored datasets.
schedules:readList and read schedules and their run history.
schedules:writeCreate, update, delete, enable, disable and run schedules.
runs:approveApprove runs waiting for the key's creator as a named approver. Add schedules:read to find them.
recipients:readList, read and export recipient lists.
recipients:writeCreate, update and delete recipient lists.
webhooks:readList and read webhook endpoints.
webhooks:writeCreate, update, delete and rotate webhook endpoints.
workspace:readRead 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.

Error response400
{
  "code": "missing_merge_field",
  "message": "Data file does not match template. Your data has no InvoiceNumber column, which this template uses."
}
CodeStatusMeaning
missing_api_key401No X-API-Key header was sent.
invalid_api_key401The key isn't one of ours, or its creator has left the workspace. Check you copied the whole key.
api_key_revoked401The key was revoked. Create a new one in Developers → API.
api_key_expired401The key's expiry date has passed. Create a new one.
unauthorized401The request isn't signed in.
account_suspended403The account that created the key is suspended.
email_not_verified403The account that created the key hasn't verified its email address.
api_access_disabled403API access is turned off for this workspace.
api_access_not_allowed403The 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_required403The workspace's plan doesn't include this. The message names the plan that does.
insufficient_scope403The 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.
forbidden403The key's creator isn't allowed to do this in the workspace (for example, a Member editing someone else's work).
not_found404No such resource in the key's workspace. Ids from another workspace answer this too.
method_not_allowed405The route exists but not with this HTTP method.
validation_failed400The request was refused; the message says why.
unsupported_media_type415The body's Content-Type isn't one this operation accepts.
file_too_large413The upload or request body is over the size limit.
missing_merge_field400The data has no column for a merge field the template uses. The message names it.
invalid_merge_tag400A merge tag in the template can't be rendered (a misspelled filter, an unquoted format). The message names the tag.
row_cap_exceeded400More rows than one job may hold. Split the data into several jobs.
template_grouping_not_allowed400A combined email + PDF job can't use a template that groups line items.
recipient_not_verified400An email recipient isn't a workspace member or a verified recipient.
connection_expired400The connected Gmail, Outlook or Google account needs reconnecting in the app.
endpoint_not_found400The webhook endpoint named in the request doesn't exist in this workspace.
endpoint_paused400The webhook endpoint named in the request has been paused by support.
schedule_spent400A one-time schedule that has already run can't be enabled again. Give it a new run time.
allowance_exceeded402The monthly document allowance and any document packs can't cover this many documents.
job_not_completed409The job hasn't finished, or finished without a file to download. Check its status first.
edit_conflict409Someone changed this since you read it. Read it again and reapply your change with the new revision.
duplicate_row_key409Two 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_use409Something still uses this (a schedule, for example). The message says what.
limit_reached409The workspace has reached a count limit (keys, webhook endpoints…). The message names it.
idempotency_conflict409This Idempotency-Key was already used with a different request body.
idempotency_in_progress409A request with this Idempotency-Key is still being processed. Retry shortly.
concurrent_job_limit429This key already has the maximum number of jobs waiting or running. Retry after one finishes.
rate_limited429Too many requests for this key. Wait for the Retry-After seconds.
service_busy503RowScribe is busy accepting other jobs. Retry after the Retry-After seconds.
maintenance503RowScribe is in maintenance mode; changes are paused for a few minutes. Reads still work.
api_paused503The API is paused for a short while. Retry later.
internal_error500Something went wrong on our side. It has been reported.

Rate limits

60requests a minute per key
10PDF previews a minute
20single documents a minute
5jobs queued or running per key
  • Over a limit, the answer is 429 rate_limited with a Retry-After header in seconds. Too many jobs queued or running at once answers 429 concurrent_job_limit; jobs set for a later time don't count.
  • When RowScribe is busy accepting jobs, a create can answer 503 service_busy with Retry-After. Retry with the same Idempotency-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 /me and GET /jobs/limits show what's left, and POST /jobs/validate shows 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 busy 503 leaves 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.

List response
{
  "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.

methodWhat happensNeedsPlan
downloadThe output waits for GET /jobs/{id}/download.NothingAny
emailRowScribe emails the documents from its own address.to or recipientListId; recipients outside the workspace must be verifiedStarter and above
connected_emailSent 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.connectedAccountIdStarter and above
webhookA signed job.completed event, with a 24-hour link to the output, is posted to one of your webhook endpoints.endpointIdPro and above
storageThe output is uploaded to your own storage.storageUrl, a pre-signed PUT URLBusiness 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
"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 in GET /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.