Renta Docs

Documents API

Manage document templates, signing sessions, and e-signatures.

The Documents API manages digital document templates (waivers, contracts, rental agreements) and signing sessions. Create templates, generate signing sessions for bookings, send signature requests, and void sessions.

Templates

List Templates

GET /v1/documents/templates

Returns all document templates for your tenant, ordered by creation date (newest first).

const templates = await renta.documents.templates.list();
for (const t of templates.data) {
  console.log(`${t.name} (${t.type})`);
}
curl https://api.getrenta.io/v1/documents/templates \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": [
    {
      "id": "dt_abc123",
      "name": "Rental Waiver",
      "type": "waiver",
      "content": {},
      "pdf_storage_path": null,
      "fields": ["full_name", "signature", "date"],
      "signee_roles": ["renter"],
      "merge_fields_used": ["customer_name", "booking_dates"],
      "reminder_hours": 24,
      "is_template": true,
      "assigned_fleet_items": ["fi_abc123"],
      "assigned_tours": [],
      "assigned_cabins": [],
      "created_at": "2026-03-01T10:00:00Z",
      "updated_at": "2026-03-01T10:00:00Z"
    }
  ]
}

Create Template

POST /v1/documents/templates

Body Parameters:

ParameterTypeRequiredDescription
namestringTemplate name
typestringTemplate type (e.g., waiver, contract, agreement)
contentobjectTemplate content/body
pdf_storage_pathstringPath to uploaded PDF template
fieldsarrayForm fields in the document
signee_rolesarrayRoles required to sign (e.g., ["renter", "guardian"])
merge_fields_usedarrayMerge fields for auto-fill
reminder_hoursintegerHours before sending a reminder
is_templatebooleanWhether this is a reusable template
assigned_fleet_itemsarrayFleet item IDs this template applies to
assigned_toursarrayTour IDs this template applies to
assigned_cabinsarrayCabin IDs this template applies to
const template = await renta.documents.templates.create({
  name: 'Rental Waiver',
  type: 'waiver',
  fields: ['full_name', 'signature', 'date'],
  signee_roles: ['renter'],
  assigned_fleet_items: ['fi_abc123'],
});
curl -X POST https://api.getrenta.io/v1/documents/templates \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Rental Waiver",
    "type": "waiver",
    "fields": ["full_name", "signature", "date"],
    "signee_roles": ["renter"]
  }'

Signing Sessions

Signing sessions are instances of a template tied to a specific booking. Each session tracks signees and their signing status.

Session Statuses

StatusDescription
draftCreated but not yet sent
sentSignature request emails sent
completedAll signees have signed
voidedSession cancelled, signatures invalidated

List Sessions

GET /v1/documents/sessions

Query Parameters:

ParameterTypeDescription
booking_idstringFilter sessions for a specific booking
const sessions = await renta.documents.sessions.list({
  booking_id: 'bk_def456',
});
curl "https://api.getrenta.io/v1/documents/sessions?booking_id=bk_def456" \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": [
    {
      "id": "ds_abc123",
      "template_id": "dt_abc123",
      "booking_id": "bk_def456",
      "name": "Rental Waiver",
      "status": "sent",
      "rendered_content": {},
      "document_hash": "sha256:abc123...",
      "completed_pdf_path": null,
      "sent_at": "2026-03-31T12:00:00Z",
      "completed_at": null,
      "voided_at": null,
      "created_at": "2026-03-31T11:00:00Z",
      "signees": [
        {
          "id": "sig_001",
          "session_id": "ds_abc123",
          "customer_id": "cust_abc",
          "role": "renter",
          "name": "John Doe",
          "email": "john@example.com",
          "status": "pending",
          "signed_at": null
        }
      ]
    }
  ]
}

Create Session

POST /v1/documents/sessions

Body Parameters:

ParameterTypeRequiredDescription
template_idstringDocument template ID
booking_idstringBooking to attach the session to
namestringSession display name
signeesarrayArray of signee objects
signees[].customer_idstringCustomer ID
signees[].rolestringSignee role (must match template roles)
signees[].namestringSignee full name
signees[].emailstringEmail for signing link
const session = await renta.documents.sessions.create({
  template_id: 'dt_abc123',
  booking_id: 'bk_def456',
  name: 'Rental Waiver — John Doe',
  signees: [
    {
      customer_id: 'cust_abc',
      role: 'renter',
      name: 'John Doe',
      email: 'john@example.com',
    },
  ],
});
curl -X POST https://api.getrenta.io/v1/documents/sessions \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "dt_abc123",
    "booking_id": "bk_def456",
    "name": "Rental Waiver — John Doe",
    "signees": [
      {
        "customer_id": "cust_abc",
        "role": "renter",
        "name": "John Doe",
        "email": "john@example.com"
      }
    ]
  }'

Send Session

POST /v1/documents/sessions/:id/send

Sends signing request emails to all pending signees and transitions the session status to sent.

await renta.documents.sessions.send('ds_abc123');
curl -X POST https://api.getrenta.io/v1/documents/sessions/ds_abc123/send \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "id": "ds_abc123",
  "template_id": "dt_abc123",
  "booking_id": "bk_def456",
  "name": "Rental Waiver — John Doe",
  "status": "sent",
  "sent_at": "2026-03-31T12:00:00Z",
  "created_at": "2026-03-31T11:00:00Z"
}

You cannot send a voided session. Attempting to do so returns 400 Bad Request.

Void Session

POST /v1/documents/sessions/:id/void

Voids a signing session, invalidating all signatures and preventing further signing.

await renta.documents.sessions.void('ds_abc123');
curl -X POST https://api.getrenta.io/v1/documents/sessions/ds_abc123/void \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "id": "ds_abc123",
  "template_id": "dt_abc123",
  "booking_id": "bk_def456",
  "name": "Rental Waiver — John Doe",
  "status": "voided",
  "voided_at": "2026-04-01T09:00:00Z",
  "created_at": "2026-03-31T11:00:00Z"
}

Resend Signing Email

POST /v1/documents/sessions/:id/resend

Resend the signing request email to a specific signee in a session.

This endpoint requires a secret key (renta_sk_). Publishable keys will receive a 403 Forbidden error.

Body Parameters:

ParameterTypeRequiredDescription
signee_idstringThe signee to resend the signing email to
const result = await renta.documents.sessions.resend(
  'ds_abc123',
  'sig_001'
);
console.log(result.status); // signee status
curl -X POST https://api.getrenta.io/v1/documents/sessions/ds_abc123/resend \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"signee_id": "sig_001"}'

Response:

{
  "id": "sig_001",
  "session_id": "ds_abc123",
  "role": "renter",
  "name": "John Doe",
  "email": "john@example.com",
  "status": "pending"
}

Single Template Operations

Single template operations require a secret key (renta_sk_). Publishable keys will receive a 403 Forbidden error.

Get Template

GET /v1/documents/templates/:id

Retrieve a single document template by ID.

const template = await renta.documents.templates.get('dt_abc123');
console.log(template.name);
curl https://api.getrenta.io/v1/documents/templates/dt_abc123 \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "data": {
    "id": "dt_abc123",
    "name": "Rental Waiver",
    "type": "waiver",
    "content": {},
    "pdf_storage_path": null,
    "fields": ["full_name", "signature", "date"],
    "signee_roles": ["renter"],
    "merge_fields_used": ["customer_name", "booking_dates"],
    "reminder_hours": 24,
    "is_template": true,
    "assigned_fleet_items": ["fi_abc123"],
    "assigned_tours": [],
    "assigned_cabins": [],
    "created_at": "2026-03-01T10:00:00Z",
    "updated_at": "2026-03-01T10:00:00Z"
  }
}

Update Template

PATCH /v1/documents/templates/:id

Update a document template. Accepts any subset of the create parameters.

const updated = await renta.documents.templates.update('dt_abc123', {
  name: 'Updated Rental Waiver',
  reminder_hours: 48,
});
curl -X PATCH https://api.getrenta.io/v1/documents/templates/dt_abc123 \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Rental Waiver", "reminder_hours": 48}'

Response:

{
  "data": {
    "id": "dt_abc123",
    "name": "Updated Rental Waiver",
    "type": "waiver",
    "reminder_hours": 48,
    "created_at": "2026-03-01T10:00:00Z",
    "updated_at": "2026-04-07T12:00:00Z"
  }
}

Delete Template

DELETE /v1/documents/templates/:id

Soft-deletes a document template by setting deleted_at. Templates with active signing sessions cannot be deleted (returns 409 Conflict).

await renta.documents.templates.delete('dt_abc123');
curl -X DELETE https://api.getrenta.io/v1/documents/templates/dt_abc123 \
  -H "Authorization: Bearer renta_sk_live_..."

Response:

{
  "deleted": true,
  "id": "dt_abc123"
}