BunnyDoc
APIE-Signing API

Templates

List your E-Signing templates and read a single template's roles — the starting point for sending an envelope from the API.

Templates are the reusable documents your team has already set up in the app, with their fields and signer roles laid out. To send an envelope through the API you start from one of these, so the two read endpoints here are usually the first calls after authentication.

Both require the templates:read scope, and a key only ever sees the templates its owner can see in the app.

List templates

Endpoint

GET   https://api2.bunnydoc.com/v1/templates

Query parameters

ParameterTypeDescription
pageintegerPage number, from 1. Default 1.
per_pageintegerResults per page, 1–100. Default 25.
searchstringOptional. Filter by template name, up to 200 characters.

Example request

List templates
curl "https://api2.bunnydoc.com/v1/templates?per_page=25&search=nda" \
  -H "Authorization: Bearer <access_token>"

Response

200 OK
{
  "data": [
    {
      "id": "018f2c3d-4e5f-7a8b-9c0d-1e2f3a4b5c6d",
      "name": "Mutual NDA",
      "description": "Standard two-way non-disclosure agreement",
      "file_count": 1,
      "role_count": 2,
      "created_at": "2026-06-01T09:30:00.000Z",
      "updated_at": "2026-07-10T14:12:00.000Z"
    }
  ],
  "pagination": { "page": 1, "per_page": 25, "total": 1, "total_pages": 1 }
}
FieldTypeDescription
idstringThe template id — pass it to POST /v1/envelopes/from-template.
namestringTemplate name.
descriptionstring | nullOptional description.
file_countintegerNumber of documents in the template.
role_countintegerNumber of signer roles.
created_at / updated_atstringISO 8601 timestamps.

Get a template

Returns one template including its roles. Call this before sending — the roles array tells you exactly which role names to supply, and which ones are locked.

Endpoint

GET   https://api2.bunnydoc.com/v1/templates/{id}

Example request

Get one template
curl https://api2.bunnydoc.com/v1/templates/018f2c3d-4e5f-7a8b-9c0d-1e2f3a4b5c6d \
  -H "Authorization: Bearer <access_token>"

Response

200 OK
{
  "id": "018f2c3d-4e5f-7a8b-9c0d-1e2f3a4b5c6d",
  "name": "Mutual NDA",
  "description": "Standard two-way non-disclosure agreement",
  "file_count": 1,
  "role_count": 2,
  "created_at": "2026-06-01T09:30:00.000Z",
  "updated_at": "2026-07-10T14:12:00.000Z",
  "roles": [
    {
      "role": "Client",
      "recipient_type": "need-to-sign",
      "signing_order": 1,
      "locked": false
    },
    {
      "role": "Account manager",
      "recipient_type": "need-to-sign",
      "signing_order": 2,
      "locked": true,
      "name": "Dana Lee",
      "email": "dana@yourco.com"
    }
  ],
  "fields": [
    {
      "id": "018f2c3d-7a8b-7c9d-8e0f-1a2b3c4d5e6f",
      "role": "Client",
      "file_id": "018f2c3d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "page_number": 1,
      "type": "signature",
      "label": "Client signature",
      "required": true,
      "locked": false,
      "position": { "x": 72, "y": 540, "width": 180, "height": 48 }
    }
  ],
  "files": [
    { "file_id": "018f2c3d-5e6f-7a8b-9c0d-1e2f3a4b5c6d", "order": 1, "excluded_pages": [] }
  ],
  "settings": {
    "signing_order": true,
    "email_subject": "Please sign: Mutual NDA",
    "email_message": "<p>Please review and sign the enclosed NDA.</p>",
    "expiry_date": "2026-12-31T23:59:59.000Z",
    "timezone": "Australia/Sydney",
    "signed_date_format": "DD/MM/YYYY",
    "envelope_date_time_format": "DD/MM/YYYY HH:mm",
    "brand_id": "018f2c3d-9c0d-7e1f-8a2b-3c4d5e6f7a8b"
  }
}

roles

Role fieldTypeDescription
rolestringThe role name. Supply this in recipients[].role when you send.
recipient_typestringHow the recipient participates, e.g. need-to-sign, receives-a-copy.
signing_orderintegerThe order this role signs in.
lockedbooleanIf true, the name and email are fixed on the template — omit this role from your send request.
name / emailstring | nullPresent only for locked roles — the fixed recipient.

Locked roles can't be reassigned

A locked role already has a person attached (or it's the template's own sender). Sending a recipient for a locked role is rejected with unknown_signer_role. Only supply recipients for roles where locked is false.

fields

Every field placed on the template, so you can show your users what the document will ask for before they send it.

FieldTypeDescription
idstring | nullThe field's id.
rolestringThe signer role this field belongs to — join it to roles[].role.
file_idstringWhich of the template's files the field sits on.
page_numberinteger1-based page within that file.
typestringField kind — signature, initials, text, date, date_signed, checkbox, radio, dropdown, multi_select, email, phone, number, amount, address, company, job_title, title, full_name, first_name, last_name, masked_text, image, or file_attachment.
labelstring | nullThe field's label.
requiredbooleanWhether a signer must complete it.
lockedbooleanWhether the value is fixed on the template.
positionobjectx, y, width, height on the page.

Prepared values are not exposed

Field geometry is readable; the sender's prepared values are not. A sender-side value can be a signature reference or sensitive prefilled text, so it never leaves the app through this API.

files

Metadata only, in document order.

FieldTypeDescription
file_idstringThe file's id. Use it to join fields[].file_id.
orderintegerPosition in the document set.
excluded_pagesinteger[]Pages dropped from the template, if any.

Template files are not downloadable

There is no download URL and no storage path here, and no endpoint to fetch a template's document. This tells you which files are attached and in what order — nothing more. The finished, signed PDF is delivered through the envelope.document_ready webhook.

settings

What the envelope will inherit when you send from this template. Reading it is the reliable way to know what you don't need to pass.

FieldTypeDescription
signing_orderbooleanWhether recipients sign sequentially.
email_subjectstring | nullDefault subject. Override per send with email_subject.
email_messagestring | nullDefault message, as safe HTML. Override per send with email_message.
expiry_datestring | nullISO 8601. Inherited by the envelope; not settable from the API.
timezonestringIANA zone used for dates in the document and emails.
signed_date_formatstringHow signed dates are rendered in the PDF.
envelope_date_time_formatstringHow date-times are rendered.
brand_idstring | nullThe brand applied to the emails and signing page.

Errors

Statuserror.codeWhen it happens
404template_not_foundNo template with that id exists in your company.

Next step

On this page