---
title: "Create a new API token"
method: POST
path: "/tokens"
tags: ["API Tokens"]
---

# Create a new API token

`POST /tokens`

Create a new API token to access the Grid APIs.

## Request body

- ApiTokenCreateRequest
  - `name` string, required — Name of the token to help identify it
  - `permissions` Permission[], required — A list of permissions to grant to the token

## Response `201`

API token created successfully

- ApiToken
  - `id` string, required — System-generated unique identifier
  - `name` string, required — Name of the token
  - `permissions` Permission[], required — A list of permissions granted to the token
  - `clientId` string, required — An opaque identifier that should be used as a client_id (or username) in the HTTP Basic Authentication scheme when issuing http requests to Grid.
  - `clientSecret` string — The secret that should be used to authenticate against Grid API. This secret is not stored and will never be available again after creation. Platform must keep this secret secure as it grants access to the account.
  - `createdAt` string, date-time, required — Creation timestamp
  - `updatedAt` string, date-time, required — Last update timestamp

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `500` — Internal service error

---

[API](https://skmtc.net/stainless-api/apis/grid-api.md) · [All operations](https://skmtc.net/stainless-api/apis/grid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stainless-api/grid-api/revisions/526036c12609/schema)
