# Create an embedded Document Template preparation session

**POST** `/templates/preparation_session/`

Create a short-lived, single-use URL that hosts the Blueink Document
Template authoring experience inside an iframe in your application.
The end user can upload a PDF, define roles, place fields, and save
the template — all without leaving your app.

Pass `template_id` to open an existing Document Template for
editing. Omit it to start a new-template authoring flow; `team` and
`library` are only applied in that case (they are ignored when
`template_id` is provided).

The returned `url` is valid until `expires`; load it in an iframe to
start the session.

Requires the `API_PREPARE_DOC_TEMPLATE` account feature; the request
returns `403` if the feature is not enabled.

## Request

### Request Body

- `application/json` — TemplatePreparationSessionRequest (object)

### Responses

- `201`: The template preparation session was created.
  - Content types: `application/json`
- `400`: Bad Request
  - Content types: `application/json`
- `403`: The `API_PREPARE_DOC_TEMPLATE` feature is not enabled for this account.
  - Content types: `application/json`
