---
title: "Mint a profile token with scope and expiry; the token is shown once"
method: POST
path: "/api/owner-token/mint"
tags: ["Owner Token"]
---

# Mint a profile token with scope and expiry; the token is shown once

`POST /api/owner-token/mint`

## Request

- Base URL: `https://brewpage.app`
- URL: `https://brewpage.app/api/owner-token/mint`
- Auth: API key in header `X-Owner-Token`

## Headers

- `X-Owner-Token` unknown, required

## Request body

- MintRequest
  - `label` string, nullable
  - `scope` 'publish' | 'admin', nullable
  - `expiresIn` '30d' | '90d' | '1y' | 'never', nullable: Default: admin 90d, publish never

## Response `201`

Minted

- MintResponse
  - `token` string, required: Shown once
  - `id` string, uuid, required
  - `scope` string, required
  - `expiresAt` string, date-time

## Other responses

- `400`: Invalid label, scope or expiresIn
- `403`: Header token not admin, not in a profile, revoked or expired
- `409`: Active token limit
- `429`: Rate limited: wait Retry-After (= retryAfterSeconds); no account: accountUrl, free sign-up with higher limits

## Changes

- **2026-11-21** `19a6c5561e70`: 4 info
  - added the optional property `level` to the response with the `400` status
  - added the optional property `level` to the response with the `403` status
  - added the optional property `level` to the response with the `409` status
  - added the optional property `level` to the response with the `429` status
- **2026-11-11** `957711dab4b5`: 8 info
  - added the optional property `challengeUrl` to the response with the `400` status
  - added the optional property `challengeUrl` to the response with the `403` status
  - added the optional property `challengeUrl` to the response with the `409` status
  - added the optional property `challengeUrl` to the response with the `429` status
  - …4 more
- **2026-11-10** `e34e8877bb89`: 8 info
  - added the optional property `reason` to the response with the `400` status
  - added the optional property `reason` to the response with the `403` status
  - added the optional property `reason` to the response with the `409` status
  - added the optional property `reason` to the response with the `429` status
  - …4 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/brewpage/apis/brewpage-api/changes/api/owner-token/mint/post.md)

---

[API](https://skmtc.dev/brewpage/apis/brewpage-api.md) - [All operations](https://skmtc.dev/brewpage/apis/brewpage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brewpage/apis/brewpage-api/revisions/78d2720a18a9?raw)
