---
title: "Generate and return a new token for the given gateway account ID."
method: POST
path: "/v1/frontend/auth"
tags: ["Auth"]
---

# Generate and return a new token for the given gateway account ID.

`POST /v1/frontend/auth`

## Request body

- CreateTokenRequest
  - `account_id` string, required — Gateway account to associate the new token to
  - `created_by` string, required
  - `description` string, required — Description of the new token
  - `service_external_id` string, required
  - `service_mode` 'LIVE' | 'TEST', required
  - `token_account_type` 'LIVE' | 'TEST'
  - `token_type` 'CARD' | 'DIRECT_DEBIT'
  - `type` 'API' | 'PRODUCTS'

## Response `200`

OK

- string

## Other responses

- `422` — Invalid or missing required parameters

## Changes

- **2025-06-30** `c661c91f1df4` — 2 breaking
  - the request property `service_external_id` became required
  - the request property `service_mode` became required
- **2025-05-16** `820244ea75db` — 2 info
  - added the new optional request property `service_external_id`
  - added the new optional request property `service_mode`

[Change history](https://skmtc.dev/government-digital-service/apis/publicauth-api/changes/v1/frontend/auth/post.md)

---

[API](https://skmtc.dev/government-digital-service/apis/publicauth-api.md) · [All operations](https://skmtc.dev/government-digital-service/apis/publicauth-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/government-digital-service/publicauth-api/revisions/c661c91f1df4/schema)
