Skip to content

Templates

Store the blank forms your organization fills, and inspect their fields.

Updated

A template is an organization-level document that you fill in many times. Examples: a W-9, an onboarding packet, a claim form. Templates are persistent and have no TTL. CloudRaker never parses or indexes them. Fill references a template as template: { "id": "…" }.

Templates are a different noun from files by design. Files are the inputs a run reads. A file that a run creates is subject to a TTL. Templates are curated assets that live until you delete them.

Add a template

There are two shapes, the same as files. Send url, or send name + mimeType for a presigned upload.

{
  "object": "template",
  "id": "23e0a865-0be9-45b1-a491-f1b6bd58a31a",
  "name": "w9-template.pdf",
  "mimeType": "application/pdf",
  "kind": "pdf-form",
  "status": "uploading",
  "createdAt": "2026-07-25T18:01:28.026Z"
}

status moves from uploading to ready. CloudRaker does not parse templates, so a template reaches ready when the bytes land. This usually takes seconds.

Field What it is
object Always template.
id Pass this as template: { "id": … }. Ids are opaque strings. Do not parse them.
kind What the template is. pdf-form today.
status uploading, processing, ready, or failed.
uploadUrl / uploadExpiresAt Only on the presigned shape. Valid for 15 minutes. The PUT’s Content-Type must equal the registered mimeType exactly, or storage rejects the upload.

Read, list, delete

# one template — includes a signed downloadUrl (~1 hour)
curl https://api.cloudraker.com/v1/templates/23e0a865-0be9-45b1-a491-f1b6bd58a31a \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

# the library — picker rows, newest first, no download URLs
curl "https://api.cloudraker.com/v1/templates?limit=50" \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

# remove one
curl -X DELETE https://api.cloudraker.com/v1/templates/23e0a865-0be9-45b1-a491-f1b6bd58a31a \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"

?limit caps the page (1–200, default 50). There is no cursor. The list is a single newest-first page. DELETE returns 204.

Inspect the fields

POST /v1/templates/:id/inspect returns the field inventory with page geometry, a values schema, and a content hash. CloudRaker detects fields when the PDF carries no fillable form. It also reads each field’s printed caption as its label. The first call can be slow. Later calls reuse the result. Templates over 32 MB answer 413 template_too_large.

Inspect is the configure-time step of fill. Curate the returned fields — labels, descriptions, ignore flags — and save them with the templateHash on a fill config. A fill run never re-inspects the form.

curl -X POST https://api.cloudraker.com/v1/templates/23e0a865-0be9-45b1-a491-f1b6bd58a31a/inspect \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY"
{
  "fields": [
    {
      "name": "topmostSubform[0].Page1[0].f1_01[0]",
      "type": "text",
      "label": "1 Name of entity/individual. An entry is required.",
      "required": false,
      "page": 0,
      "box": { "x": 58.6, "y": 118.0, "width": 517.4, "height": 14 },
      "ignore": false
    }
    // …22 more on this form
  ],
  "schema": { "type": "object", "properties": { "values": { /* one property per field */ } }, "required": ["values"] },
  "pageBoxes": [{ "width": 611.976, "height": 791.968 }],
  "pageCount": 6,
  "detected": false,
  "templateHash": "9c56cc51b374c3ba189210d5b6d4bf57790d351c96c47c02190ecf1e430635ab"
}
Field What it is
fields[].name The PDF’s own field name. This is the key values takes on POST /v1/fill.
fields[].type text, checkbox, and the other AcroForm types. Choice fields also carry options[].
fields[].label / description The human caption, read from the form or inferred from the page. description starts as the section heading; overwrite it with your own guidance when you curate.
fields[].page / box The 0-based page index and the field rectangle in PDF points, measured against the matching pageBoxes entry.
fields[].ignore false on every inspected field. Set it to true when you curate a field no run should touch.
schema A JSON Schema describing the exact values object the fields accept.
pageBoxes[] / pageCount Page geometry, so you can render the form yourself.
detected false when the PDF already had form fields. true when CloudRaker detected them for you.
templateHash sha256 of the prepared template bytes. Save it with the curated fields to spot a stale curation after the template changes.

Fill from a template

curl -X POST https://api.cloudraker.com/v1/fill \
  -H "Authorization: Bearer $CLOUDRAKER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": { "id": "23e0a865-0be9-45b1-a491-f1b6bd58a31a" },
    "files": [{ "id": "a04d6597-4e34-4a99-94ea-964c289a4c68" }]
  }'

Fill also accepts template: { "url": "…" } for a one-off form. CloudRaker fetches that copy at run time and does not add it to your template library. Use a url for a form you will never see again. Use a saved {id} for a form you fill weekly.

Next steps

Type to search…

↑↓ navigate↵ selectEsc close