---
title: "Generate Token"
method: POST
path: "/token_auths"
tags: ["Token Auth"]
---

# Generate Token

`POST /token_auths`

Create a token, either for a bank or a card account, that can be used with the **PromisePay.js** package to securely send Assembly credit card details.

## Request body

- TokenAuthRequestBody
  - `token_type` 'bank' | 'card', required — Token type ID. use `bank` or `card`
  - `user_id` string, required — Buyer or Seller ID (already created)

## Response `200`

OK

- object
  - `token_auth` object
    - `token_type` string
    - `token` string
    - `user_id` string

---

[API](https://skmtc.net/hellozai/apis/assembly-api.md) · [All operations](https://skmtc.net/hellozai/apis/assembly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hellozai/assembly-api/revisions/60b528b2e015/schema)
