---
title: "Generate a new token"
method: PUT
path: "/api/v4/commands/{command_id}/regen_token"
tags: ["commands"]
---

# Generate a new token

`PUT /api/v4/commands/{command_id}/regen_token`

Generate a new token for the command based on command id string.
##### Permissions
Must have `manage_slash_commands` permission for the team the command is in.

## Path parameters

- `command_id` string, required

## Response `200`

Token generation successful

- object
  - `token` string — The new token

## Other responses

- `400` — Invalid or missing parameters in URL or request body
- `401` — No access token provided
- `403` — Do not have appropriate permissions

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
