Organizations
AccessTokens

CreateOrgToken

Generates a new access token scoped to the organization for use in CI/CD pipelines and automated workflows. Organization tokens belong to the organization rather than individual users, ensuring that access is not disrupted when team members leave.

The name field must be unique across the organization (including deleted tokens) and cannot exceed 40 characters. The expires field accepts a unix epoch timestamp up to two years from the present, or 0 for no expiry (default).

Important: The token value in the response is only returned once at creation time and cannot be retrieved later. Audit logs for actions performed with organization tokens are attributed to the organization rather than an individual user.

This request must be authenticated as a user, for example with a personal access token. Organization and team access tokens cannot create organization tokens, even when they have the Admin role, so that a token cannot be used to mint further organization tokens. Such requests return a 403 error.

post/api/orgs/{orgName}/tokens

Request

  • Base URL: https://api.pulumi.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.pulumi.com/api/orgs/{orgName}/tokens
  • Auth: none declared

Path parameters

orgNamestring required

The organization name

Query parameters

reasonstring

Audit log reason for creating this token

Request body

descriptionstring required

The description

expiresinteger required

The expiration time

adminboolean required

Whether the entity has admin privileges

namestring required

The name

roleIDstring

The role identifier

Response

OK

idstring required

The unique identifier

tokenValuestring required

The token value

Changes

No recorded changes to this operation across all 1 revision of this API.