Access Tokens
List Org Tokens
/api/orgs/{orgName}/tokensRetrieves the access tokens created for an organization. Organization tokens provide CI/CD automation access scoped to the organization rather than tied to individual user accounts. The response includes token metadata such as name, description, creation date, last used date, and expiration status. The actual token values are never returned after initial creation. Use the filter query parameter to narrow by status (active, expired, all). Use the search query parameter to match token name, description, ID, or creator login. Results are paginated; use continuationToken (returned in the response) and maxResults to page.
Request Parameters
orgNamestring path requiredThe organization namecontinuationTokenstring query optionalOpaque token for fetching the next page of results.filterstring query optionalFilter tokens by status (active, expired, or all). Defaults to active.maxResultsinteger query optionalMaximum number of tokens per page. Defaults to 100, maximum 1000.searchstring query optionalCase-insensitive substring match on token name, description, ID, or creator login
Responses
- The list of access tokens
- ↳
idstring requiredUnique identifier for this access token. - ↳
namestring requiredHuman-readable name assigned to this access token. - ↳
descriptionstring requiredUser-provided description of the token’s purpose. - ↳
createdstring requiredTimestamp when the token was created, in ISO 8601 format. - ↳
lastUsedinteger requiredUnix epoch timestamp (seconds) when the token was last used. Zero if never used. - ↳
expiresinteger requiredUnix epoch timestamp (seconds) when the token expires. Zero if it never expires. - ↳
adminboolean requiredWhether this token has Pulumi Cloud admin privileges. - ↳
createdBystring requiredUser.GitHubLogin of the user that created the access token - Role associated with the token, if applicable
- ↳
typeenum optionalThe token’s kind.Values:personal,refresh,organization,team continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If null, there are no more results available.
Create Org Token
/api/orgs/{orgName}/tokensGenerates 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.
Request Parameters
orgNamestring path requiredThe organization namereasonstring query optionalAudit log reason for creating this token
Request Body
descriptionstring requiredThe descriptionnamestring requiredThe nameadminboolean requiredWhether the entity has admin privilegesexpiresinteger requiredThe expiration timeroleIDstring optionalThe role identifier
Responses
idstring requiredThe unique identifiertokenValuestring requiredThe token value
Delete Org Token
/api/orgs/{orgName}/tokens/{tokenId}Permanently revokes and deletes an organization access token. Any CI/CD pipelines or automation using this token will immediately lose access to the organization’s resources. This action cannot be undone.
Request Parameters
orgNamestring path requiredThe organization nametokenIdstring path requiredThe access token identifier
Responses
List Personal Tokens
/api/user/tokensReturns the access tokens currently bound to the authenticated user: personal access tokens (Bearer-usable) and refresh tokens issued during agent signup (exchange-only at POST /api/oauth/token; 401 if presented as Bearer). Web-session tokens are excluded. Use the filter query parameter to narrow by status (active, expired, all). Use the search query parameter to match token name or description, or to prefix-match token ID. Results are paginated; use continuationToken (returned in the response) and maxResults to page. Revoke any entry via DELETE /api/user/tokens/{tokenId}, which is type-agnostic.
Request Parameters
continuationTokenstring query optionalOpaque token for fetching the next page of results.filterstring query optionalFilter tokens by status (active, expired, or all). Defaults to active.maxResultsinteger query optionalMaximum number of tokens per page. Defaults to 100, maximum 1000.searchstring query optionalCase-insensitive substring match on token name or description, or prefix match on token ID
Responses
- The list of access tokens
- ↳
idstring requiredUnique identifier for this access token. - ↳
namestring requiredHuman-readable name assigned to this access token. - ↳
descriptionstring requiredUser-provided description of the token’s purpose. - ↳
createdstring requiredTimestamp when the token was created, in ISO 8601 format. - ↳
lastUsedinteger requiredUnix epoch timestamp (seconds) when the token was last used. Zero if never used. - ↳
expiresinteger requiredUnix epoch timestamp (seconds) when the token expires. Zero if it never expires. - ↳
adminboolean requiredWhether this token has Pulumi Cloud admin privileges. - ↳
createdBystring requiredUser.GitHubLogin of the user that created the access token - Role associated with the token, if applicable
- ↳
typeenum optionalThe token’s kind.Values:personal,refresh,organization,team continuationTokenstring optionalContinuationToken can be used to fetch the next page of results. If null, there are no more results available.
Create Personal Token
/api/user/tokensCreates a new personal access token for the authenticated user. The request body includes a description for the token and an optional expiration time. The response includes the token ID and the tokenValue (prefixed with ‘pul-’). The token value is only returned once at creation time and cannot be retrieved later.
Request Parameters
reasonstring query optionalTracks the context that triggered token creation (e.g., redirect URL or referral source)
Request Body
descriptionstring requiredThe descriptionexpiresinteger requiredThe expiration time
Responses
idstring requiredThe unique identifiertokenValuestring requiredThe token value
Delete Personal Token
/api/user/tokens/{tokenId}Permanently deletes a personal access token by its identifier. The token is immediately invalidated and can no longer be used for authentication. Returns 204 on success or 404 if the token does not exist.
Request Parameters
tokenIdstring path requiredThe access token identifier