---
title: "Mint a per-env phone-home JWT (GTM-440)"
method: POST
path: "/v1/projects/{id}/phone-home-tokens"
tags: ["Projects"]
---

# Mint a per-env phone-home JWT (GTM-440)

`POST /v1/projects/{id}/phone-home-tokens`

## Request

- Base URL: `https://api.vendure.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.vendure.io/v1/projects/{id}/phone-home-tokens`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vendure/apis/vendure-io-api-public/docs/v1/projects/:id/phone-home-tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` string, required

## Request body

- PhoneHomeTokenMintDto
  - `env` 'production' | 'staging' | 'uat' | 'dev', required

## Response `201`

- PhoneHomeTokenDto
  - `token` string, required: Signed project phone-home JWT.
  - `expiresAt` string, date-time, required
  - `jti` string, required: JWT id for audit correlation.
  - `issuedAt` string, date-time, required
  - `env` 'production' | 'staging' | 'uat' | 'dev', required: Deployment environment stamped into the JWT `env` claim. Tokens minted before GTM-441 surface as `production`.

## Other responses

- `400`: Validation failed
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not found
- `409`: Conflict
- `500`: Internal server error

---

[API](https://skmtc.dev/vendure/apis/vendure-io-api-public.md) - [All operations](https://skmtc.dev/vendure/apis/vendure-io-api-public/llms.txt) - [OpenAPI document](https://skmtc.dev/vendure/apis/vendure-io-api-public/revisions/0747ce439f89?raw)
