---
title: "Create or rotate a bearer token"
method: POST
path: "/token"
tags: ["Utils"]
---

# Create or rotate a bearer token

`POST /token`

Create or rotate a bearer token for the authenticated HTTP user.
Requires HTTP Basic authentication with a Manticore user name and password. The endpoint returns the raw token.
Example:

  ```
  curl -u admin:password -X POST http://127.0.0.1:9308/token -d "{}"
  ```

## Request body

- TokenRequest — Empty request body. Used to create or rotate a bearer token for the authenticated HTTP user.

## Response `200`

Bearer token created or rotated successfully

- string — Raw bearer token string.

## Other responses

- `401` — Missing or invalid credentials
- `default` — error

## Changes

> 13 revisions in range; 2 could not be searched.

- **2024-11-14** `88a0ac494d8e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/manticoresoftware/apis/manticore-search-client/changes/token/post.md)

---

[API](https://skmtc.dev/manticoresoftware/apis/manticore-search-client.md) · [All operations](https://skmtc.dev/manticoresoftware/apis/manticore-search-client/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/manticoresoftware/manticore-search-client/revisions/eb39c8083035/schema)
