---
title: "Api Post Token"
method: POST
path: "/api/v1/token/"
tags: ["api"]
---

# Api Post Token

`POST /api/v1/token/`

## Request

- The document declares no server URL.
- Auth: none declared

## Request body

- BodyApiPostTokenApiV1TokenPost
  - `expiration` string, date-time, nullable
  - `primary_namespace` string, nullable
  - `role_bindings` object, nullable

## Response `200`

Successful Response

- APIPostToken
  - `data` APIPostTokenData, required
    - `token` string, required
  - `message` string, nullable
  - `status` 'ok' | 'error', required

## Other responses

- `422`: Validation Error

## Changes

- **2024-11-26** `da5794d6a672`: 2 breaking, 3 info
  - response property `message` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - the `status` response's property type changed from no type to `string` for status `200`
  - request property `expiration` list-of-types was widened by adding types `null` to media type `application/json`
  - request property `primary_namespace` list-of-types was widened by adding types `null` to media type `application/json`
  - …1 more
- **2024-03-15** `6642d3ed3fab`: 4 breaking, 1 info
  - request property `expiration` list-of-types was narrowed by removing types `null` from media type `application/json`
  - request property `primary_namespace` list-of-types was narrowed by removing types `null` from media type `application/json`
  - request property `role_bindings` list-of-types was narrowed by removing types `null` from media type `application/json`
  - the `status` response's property type changed from `string` to no type for status `200`
  - …1 more

[Operation history](https://skmtc.dev/conda-incubator/apis/conda-store/changes/api/v1/token/post.md)

---

[API](https://skmtc.dev/conda-incubator/apis/conda-store.md) - [All operations](https://skmtc.dev/conda-incubator/apis/conda-store/llms.txt) - [OpenAPI document](https://skmtc.dev/conda-incubator/apis/conda-store/revisions/1045c7d5b017?raw)
