# API keys

> Create, use and revoke an API key. Production or test environment, full access or PDF only.

An API key (`mzp_…`) authenticates your server with Mizanpage. It acts for a single workspace. With full access, it has every right on that workspace except account management (keys, members, subscription).

## Create a key

1. Open **API keys** in the left column (**Developers** group), then click **New key**.

   ![The button to create a key](https://mizanpage.com/docs/medias/tutos/api-cles-1.en.webp)

2. Give it a name that says where it is used (website, ERP, Zapier…), choose its **Environment** and its **Permission**, then click **Create the key**.

   ![The name, environment and permission of the key](https://mizanpage.com/docs/medias/tutos/api-cles-2.en.webp)

3. Copy the key: it is shown only once. The window only closes after **I have it**.

   ![The key shown once](https://mizanpage.com/docs/medias/tutos/api-cles-3.en.webp)

4. The key joins the list with its name, the **Test** and **PDF only** labels when they apply, its beginning, its creation date and its last call.

   ![The key in the list of keys](https://mizanpage.com/docs/medias/tutos/api-cles-4.en.webp)

Only developers and administrators see and manage keys.

## Use the key

In the `Authorization` header, and nowhere else:

```http
Authorization: Bearer mzp_…
```

> **The key is a server secret**
>
> It never goes into a browser, a mobile app, a URL or a log. To open the editor for your users, your server requests a time-limited session: see [Editor sessions](https://mizanpage.com/en/docs/integration/sessions.md).

## Environment: production or test

**Production**, the default, is for your software in service: every PDF counts towards your plan.

Choose the **Test** environment to build your integration. A test key (`mzp_test_…`):

- produces the real documents, from the published version and your data;
- is never counted;
- prints the Mizanpage logo as a watermark on every page, attachments included;
- adds the `X-Mizanpage-Test: 1` header to the response;
- is limited to 200 PDFs per hour per workspace.

It acts on the same workspace as a production key. A catalog or template changed with it is changed for real. The environment cannot be changed after creation.

## Permission: full access or PDF only

**Full access**, the default, opens everything the API allows: templates, fields, webhooks and PDFs.

**PDF only** suits Zapier, Make, n8n or any software that only makes PDFs. The key reads templates and their fields, generates PDFs (PDF tools included), manages webhooks and connects to the [MCP server](https://mizanpage.com/en/docs/api/assistants-ia.md). Any other route answers `403 key_scope` before doing anything, so a stolen key can neither change nor delete anything. The permission cannot be changed after creation.

## Revoke a key

**Revoke** immediately cuts off any software using the key. This is final. Revoke a key as soon as you suspect a leak, then create a new one.

## Free trial and Solo plan

During the free trial, the API is open whatever plan you looked at on the website. Mizanpage Solo does not include the API: a key created during the trial or under Team stays in place after a switch to Solo and answers `402 api_not_included` until you return to Team.

---

Documentation Mizanpage · Developers › API
https://mizanpage.com/en/docs/api/cles/
