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

# Create API token

`POST /users/me/tokens`

Creates a new API token for the authenticated user. The token can be scoped to a specific organization.

## Request body

- GithubComActiveloopaiDeeplakeApiInternalAuthCreateTokenRequest
  - `duration` integer, required — Duration in seconds
  - `name` string, required
  - `organization_id` string
  - `temporary` boolean

## Response `201`

Token created successfully

- GithubComActiveloopaiDeeplakeApiInternalAuthCreateTokenResponse
  - `token` GithubComActiveloopaiDeeplakeApiInternalAuthAPITokenResponse
    - `duration` integer — Duration in seconds
    - `expiration` string — Unix timestamp for compatibility
    - `id` string
    - `name` string
    - `organization_id` string
    - `token` string — The actual JWT token (only returned on creation)

## Other responses

- `400` — Invalid request
- `401` — Unauthorized
- `500` — Internal server error

---

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