ENDPOINT | POST

Make a PDF from a template

From a Doc with {{gaps}} (laid out with the organisation's letterhead from Docs → Letterhead) or from a PDF, copied with its boxes so it can be sent for signing. values maps each gap (or each of your boxes, by label) to its text.

POSThttps://api.cloverr.co.uk/v1/pdfs/generate

Scope: writeSuccess: 201120 requests a minute per token

Body (JSON)

templateIduuidrequiredA Doc or a PDF you can open.
titlestringThe new PDF's name (else the template's).
valuesobject{ "Client name": "Northwind" }
letterheadbooleanFor a Doc: false for a plain page. Defaults to true.

Example request & response

Send your token in the Authorization header. A successful response wraps the result in data.

curl -X POST https://api.cloverr.co.uk/v1/pdfs/generate \
  -H "Authorization: Bearer $CLOVERR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"templateId":"9b2e4f61-7c3d-4a5b-8e9f-0a1b2c3d4e5f","title":"Agreement: Northwind","values":{"Client name":"Northwind","Start date":"3 November 2026"}}'
201 · JSON
{
  "data": {
    "id": "3f6c1d2e-8a4b-4c1d-9e2f-5a6b7c8d9e0f",
    "title": "Agreement: Northwind",
    "pageCount": 3,
    "link": "https://cloverr.co.uk/docs/3f6c…",
    "roles": [
      "Client"
    ],
    "fields": [
      {
        "label": "Client signature",
        "role": "Client",
        "type": "signature",
        "required": true,
        "page": 3
      }
    ],
    "signRequests": []
  }
}

Errors

StatusCodeWhen
403forbiddenYour role can't create docs.
404not_foundNo such template, or you can't open it.
422not_madeIt couldn't be made (the reason is given).
401unauthorizedNo token, or it's invalid, expired, revoked, or its owner left the organisation.
403ip_not_allowedThe token only works from listed addresses, and this request came from another.
403two_factor_requiredThe organisation requires login verification and the token's owner hasn't set it up.
429rate_limitedMore than 120 requests in a minute with this token. Wait for Retry-After.
500server_errorSomething went wrong on our side. Safe to retry.

Errors look like { "error": { "code", "message" } }. All error codes.