---
title: "Create user client credentials token"
method: POST
path: "/resources/users/api-tokens/v1"
tags: ["Personal tokens"]
---

# Create user client credentials token

`POST /resources/users/api-tokens/v1`

## Request

- Base URL: `http://localhost:8181`
- URL: `http://localhost:8181/resources/users/api-tokens/v1`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/docs/resources/users/api-tokens/v1/post.ts> (a function with typed inputs; its response is checked against the schema)

This route creates a user-specific API token. Send the user’s ID in the **`frontegg-user-id`** header and the tenant’s ID in the **`frontegg-tenant-id`** header. Optionally, send as POST body params values for metadata and description.

## Headers

- `frontegg-tenant-id` string, required
- `frontegg-user-id` string, required

## Request body

- CreateUserApiTokenDto
  - `metadata` object: Extra data that will be encoded as part of the JWT
  - `description` string
  - `expiresInMinutes` number: Token expiration time in minutes. In case of undefined, the token won't be expired

## Response `201`

- CreateUserApiTokenResponseDto
  - `clientId` string, required
  - `description` string, required
  - `metadata` object, required: Extra data that will be encoded as part of the JWT
  - `createdAt` string, date-time, required
  - `secret` string, required
  - `expires` string, date-time

---

[API](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp.md) - [All operations](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/llms.txt) - [OpenAPI document](https://skmtc.dev/frontegg/apis/entitlements-agent-pdp/revisions/c496ae9e1c3e?raw)
