---
title: "Create a dpk_ key whose secret is returned exactly once"
method: POST
path: "/projects/{projectId}/api-keys"
---

# Create a dpk_ key whose secret is returned exactly once

`POST /projects/{projectId}/api-keys`

## Request

- Base URL: `https://platform.digitalpublic.com/api/commercial`
- URL: `https://platform.digitalpublic.com/api/commercial/projects/{projectId}/api-keys`
- Auth: API key in cookie `authjs.session-token`

Trial and eligible paid plans can issue supervised write keys. Existing read-only keys keep their original scopes. Store the returned secret directly in the client credential store; never paste it into a chat.

## Path parameters

- `projectId` string, required

## Request body

- object
  - `name` string, required
  - `scopes` string[]

## Response `201`

One-time dpk_ secret and MCP configuration

## Other responses

- `403`: OWNER/ADMIN or active plan required

---

[API](https://skmtc.dev/digitalpublic/apis/digitalpublic-commercial-api.md) · [All operations](https://skmtc.dev/digitalpublic/apis/digitalpublic-commercial-api/llms.txt) · [OpenAPI document](https://skmtc.dev/digitalpublic/apis/digitalpublic-commercial-api/revisions/45f28be9a8e2?raw)
