---
title: "Update Token"
method: POST
path: "/tokens/"
tags: ["tokens"]
---

# Update Token

`POST /tokens/`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/gptstonks/apis/gptstonks-chat-ce-api/docs/tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Update the token used to access OpenBB.

Args:
    token_data (`TokenData`): Token data information to update the database.

Returns:
    `MessageResponse`: message indicating success.

## Request body

- TokenData: Model to define the list of tokens available.
  - `openbb` string, required

## Response `200`

Successful Response

- MessageResponse: Model to define a general response with any custom message.
  - `message` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/gptstonks/apis/gptstonks-chat-ce-api.md) - [All operations](https://skmtc.dev/gptstonks/apis/gptstonks-chat-ce-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gptstonks/apis/gptstonks-chat-ce-api/revisions/a0df966837f8?raw)
