---
title: "Create API key"
method: POST
path: "/account/api"
tags: ["api-keys"]
---

# Create API key

`POST /account/api`

Creates a new API key for the connected account with basic level (not master).

This endpoint requires an API key with the `master` privilege (or a Bearer token from the Dashboard).

If the account has reached the maximum number of allowed active API keys, the request will be refused.

If you want to create an API key with master access, you need to create it via the Dashboard.

## Request body

- ApiKeyForm
  - `name` string — A human-friendly name to identify the API key.

## Response `200`

API key created

- ApiKeyResult
  - `success` boolean
  - `key` ApiKeyObject
    - `created` integer — Creation date of the key, as a Unix timestamp in milliseconds.
    - `name` string — The name given to the key.
    - `removed` integer — Date at which the key was disabled, as a Unix timestamp in milliseconds. Null if the key is active.
    - `token` string — The secret API key. Use this value to authenticate requests.
    - `public` string — The public identifier of the key, used for converting templates.
    - `last_used` integer — Date at which the key was last used, as a Unix timestamp in milliseconds. Null if never used.
    - `usage` integer — Number of conversions performed with this key over the last 7 days.
    - `is_master` boolean — Whether this key has master privileges.

## Other responses

- `400` — Bad request. The maximum number of allowed API keys has been reached, or the data passed was invalid.
- `401` — Unauthorized. Invalid auth key, missing, or disabled.
- `429` — Too Many Requests. You have been rate limited.
- `500` — Internal Server Error.

---

[API](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation.md) · [All operations](https://skmtc.dev/pdfshift/apis/pdfshift-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pdfshift/pdfshift-api-documentation/revisions/0b8cbae61b89/schema)
