---
title: "Create Template Editing Session"
method: POST
path: "/public/v1/templates/{id}/editing-sessions"
tags: ["Templates"]
---

# Create Template Editing Session

`POST /public/v1/templates/{id}/editing-sessions`

Creates a new editing session for the Embedded Editor. The response includes an E-Token, which is required to open the template.

#### Limitations

- **Single Active Session per User-Template Pair** 
  Only one editing session can be active at a time for a specific user and template. Creating a new session for the same user-template pair will automatically invalidate the previous one.

- **Weekly Session Cap** 
  A maximum of **250** editing sessions can be created for a single template per week. Any attempt to exceed this limit will result in a `403 Forbidden` error.

## Path parameters

- `id` string, required

## Request body

- EditingSessionRequest
  - `email` string, email, required — Email of the user to create the editing session for
  - `lifetime` integer — Lifetime of the E-Token in seconds.

## Response `201`

Template Editing Session created

- object
  - `id` string — Internal id of the editing session. Don't use it, it's not a token.
  - `email` string, email — Email associated with the editing session.
  - `expires_at` string, date-time — Date and time when the editing session expires.
  - `key` string — Same value as `token`, token for the embedded editor, aka E-Token. Deprecated — use `token` instead.
  - `token` string — Token for the embedded editor, aka E-Token. Use it for your Embedding.
  - `template_id` string — ID of the template

## Other responses

- `400` — Bad request
- `401` — Authentication error
- `403` — Permission error
- `404` — Not found
- `429` — Too Many Requests

---

[API](https://skmtc.net/pandadoc/apis/pandadoc-public-api.md) · [All operations](https://skmtc.net/pandadoc/apis/pandadoc-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pandadoc/pandadoc-public-api/versions/0c2b70be3fb0/schema)
