Regenerate token

  • POST
  • /workspaces
  • /:workspace
  • /tunnels
  • /token

Regenerates the tunnel token for the specified workspace or project. The previous token will be invalidated.

Warning
After regenerating the token, all agents using the old token will need to be reconfigured with the new token.

Request

REQUIRED SCOPES
TUNNEL_MANAGE
URL PARAMETERS
workspacerequiredstring
The workspace name.
GET PARAMETERS
project_namestring
The name of the project to regenerate the token for. If not provided, the workspace token is regenerated.

Last modified on Feb 3, 2026

Request example

CURL
curl -X POST "https://api.buddy.works/workspaces/:workspace/tunnels/token" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \

Response

EXAMPLE RESPONSE
{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3b3Jrc3BhY2VfaWQiOjEyMywidmVyc2lvbiI6MX0.abc123" }