---
title: "Mint a contact's secret for a token"
method: POST
path: "/contact/{contactId}/secret/{secretId}/mint"
tags: ["Contact Secret"]
---

# Mint a contact's secret for a token

`POST /contact/{contactId}/secret/{secretId}/mint`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/contact/{contactId}/secret/{secretId}/mint`
- Auth: HTTP bearer

Returns a usable token minted from a personal (per-contact) secret. The
credential leaves the server, for use when a proxy cannot serve the
request. Owner-only. Platform-managed and `basic`/`plain` secrets are
not mintable.

## Path parameters

- `contactId` string, required: The ID of the contact the secret belongs to
- `secretId` string, required: The ID of the secret to mint

## Response `200`

The minted token

- object
  - `token` string, required: The usable token to send to the provider
  - `expiresAt` number: Token expiry as a unix timestamp in ms, or null

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
