Skip to main content
POST
/
api
/
projects
/
{projectId}
/
environments
/
{environmentId}
/
regenerate-token
Token regenerate
curl --request POST \
  --url https://api.example.com/api/projects/{projectId}/environments/{environmentId}/regenerate-token \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "accessToken": "<string>",
  "type": "brms",
  "projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "addToWorkflow": true,
  "requiredReviewers": true,
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "key": "<string>",
  "releaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "deploymentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "workflowOrder": 123,
  "approvalMode": "require_one_per_team",
  "deletedAt": "<string>"
}

Authorizations

Authorization
string
header
required

Personal access token is obtained through your profile

Path Parameters

environmentId
string<uuid>
required

ID of the environment to regenerate the token for

projectId
string<uuid>
required

ID of the project containing the environment

Response

200 - application/json

The environment with the new access token

The environment with the new access token

id
string<uuid>
required

Unique identifier of the environment

name
string
required

Name of the environment

accessToken
string
required

Newly generated access token

type
enum<string>
required

Type of environment

Available options:
brms,
deployment
projectId
string<uuid>
required

ID of the project

addToWorkflow
boolean
required

Whether the environment is part of the deployment workflow

requiredReviewers
boolean
required

Whether reviewers are required

createdAt
string
required

Timestamp when the environment was created

updatedAt
string
required

Timestamp when the environment was last updated

key
string | null

Unique key for BRMS type environments

releaseId
string<uuid> | null

ID of the currently deployed release

deploymentId
string<uuid> | null

ID of the associated deployment

workflowOrder
number | null

Order position in the deployment workflow

approvalMode
enum<string> | null

Approval mode for deployments

Available options:
require_one_per_team,
none_create_request,
require_any,
none,
deletedAt
string | null

Timestamp when the environment was deleted