1. Docs
  2. Pulumi Cloud
  3. Pulumi Cloud REST API
  4. Organizations

Organizations

    The Organizations API allows you to manage Pulumi Cloud organizations, including members, teams, access tokens, and webhooks. Organizations are the primary management boundary in Pulumi Cloud.

    Organization Operations

    The API provides endpoints for the following categories of operations:

    • Managing organization members (adding, updating, removing)
    • Managing organization access tokens
    • Creating and managing teams
    • Managing team access tokens
    • Creating and managing webhooks

    User Management

    List Users

    List all members of an organization.

    GET /api/orgs/{organization}/members
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    continuationTokenstringqueryOptional. the continuation token to use for retrieving the next set of results if results were truncated

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/orgs/{organization}/members
    

    Default response

    Status: 200 OK
    
    {
      "members": [
        {
          "role": "member",
          "user": {
            "name": "First Last",
            "githubLogin": "user2",
            "avatarUrl": "https://en.gravatar.com/userimage/17756222/cabc55626abae89ebe2d8ae946521e15.png?size=300",
            "email": "user@example.com"
          },
          "knownToPulumi": true,
          "virtualAdmin": false
        },
        {
          "role": "admin",
          "user": {
            "name": "First Last",
            "githubLogin": "user1",
            "avatarUrl": "https://en.gravatar.com/userimage/17756222/cabc55626abae89ebe2d8ae946521e15.png?size=300",
            "email": "admin@example.com"
          },
          "knownToPulumi": true,
          "virtualAdmin": false
        }
      ]
    }
    

    Add User to Organization

    Add a user to an organization. The user must have already signed up for a Pulumi account and meet the organization membership requirements to be added.

    POST /api/orgs/{organization}/members/{username}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    usernamestringpathuser name
    rolestringbodyThe role to assign - possible values are admin or member

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request POST \
      --data '{"role":"{role}"}' \
      https://api.pulumi.com/api/orgs/{organization}/members/{username}
    

    Update User’s Role

    Update a user’s role in an organization.

    PATCH /api/orgs/{organization}/members/{username}
    

    Parameters

    ParameterTypeInDescription
    organizationstringqueryorganization name to filter stacks by
    usernamestringpathuser name
    rolestringbodyThe role to assign - possible values are admin or member

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request PATCH \
      --data '{"role":"{role}"}' \
      https://api.pulumi.com/api/orgs/{organization}/members/{username}
    

    Remove User from Organization

    Remove a user from an organization.

    DELETE /api/orgs/{organization}/members/{username}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    usernamestringpathuser name

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request DELETE \
      https://api.pulumi.com/api/orgs/{organization}/members/{username}
    

    Organization Access Tokens

    List Organization Access Tokens

    List all access tokens for an organization.

    GET /api/orgs/{org}/tokens
    

    Parameters

    ParameterTypeInDescription
    show_expiredstringqueryOptional. whether to return previously expired tokens with results. Defaults to false.

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/orgs/{org}/tokens?show_expired=true
    

    Create Organization Access Token

    Create a new access token for an organization.

    POST /api/orgs/{org}/tokens
    

    Parameters

    ParameterTypeInDescription
    descriptionstringbodyDescription of the access token.
    namestringbodyUnique name of the access token, up to 40 characters. Must be unique across the org, including deleted tokens.
    expiresintbodyOptional. unix epoch timestamp at which the token should expire, up to two years from present. 0 for no expiry. Defaults to 0.

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request POST \
      --data '{"description": "{description}", "name": "{unique_name}", "expires": 0}' \
      https://api.pulumi.com/api/orgs/{org}/tokens
    

    Delete Organization Access Token

    Delete an organization access token.

    DELETE /api/orgs/{org}/tokens/{tokenId}
    

    Parameters

    ParameterTypeInDescription
    tokenIdstringpaththe token identifier

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request DELETE \
      https://api.pulumi.com/api/orgs/{org}/tokens/{tokenId}
    

    Teams

    List Teams

    List all teams in an organization.

    GET /api/orgs/{organization}/teams
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      https://api.pulumi.com/api/orgs/{organization}/teams
    

    Create Team

    Create a new team in an organization.

    POST /api/orgs/{org}/teams/{teamType}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    teamTypestringpaththe type of team to create - valid options are pulumi or github
    namestringbodyteam name
    displayNamestringbodyOptional. team display name
    descriptionstringbodyOptional. team description

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request POST \
      --data '{"name":"example-team","displayName":"example display name","description":"example description"}' \
      https://api.pulumi.com/api/orgs/{org}/teams/pulumi
    

    Get Team

    Get details about a specific team.

    Get /api/orgs/{org}/teams/{teamName}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    teamNamestringbodyteam name

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request GET \
      https://api.pulumi.com/api/orgs/{org}/teams/{teamName}
    

    Delete Team

    Delete a team from an organization.

    DELETE /api/orgs/{org}/teams/{teamName}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    teamNamestringpathteam name

    Example

    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request DELETE \
      https://api.pulumi.com/api/orgs/{org}/teams/{teamName}
    

    Webhooks

    Create Webhook

    Create a new webhook for an organization or stack.

    // To create an organization webhook
    POST /api/orgs/{organization}/hooks
    
    // To create a stack webhook
    POST /api/stacks/{organization}/{project}/{stack}/hooks
    

    Parameters

    ParameterTypeInDescription
    activebooleanbodyenable webhook
    displayNamestringbodyname of webhook
    organizationNamestringbodyorganization name
    payloadUrlstringbodyURL to send request to
    projectNamestringbodyOptional. project name (required for stack webhooks)
    stackNamestringbodyOptional. stack name (required for stack webhooks)
    formatstringbodyOptional. format of the payload. Possible values are raw, slack, ms_teams or pulumi_deployments. Default is raw.
    filtersarray[string]bodyOptional. list of filters for events the webhook should receive. See webhook docs for more information on what filters are available
    secretstringbodyOptional. secret used as the HMAC key. See webhook docs for more information

    List Webhooks

    List all webhooks for an organization or stack.

    // List organization webhooks
    GET /api/orgs/{organization}/hooks
    
    // List stack webhooks
    GET /api/stacks/{organization}/{project}/{stack}/hooks
    

    Get Webhook

    Get details about a specific webhook.

    // Get organization webhook
    GET /api/orgs/{organization}/hooks/{webhookname}
    
    // Get stack webhook
    GET /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}
    

    Ping Webhook

    Send a test ping to a webhook to validate it’s working.

    // Ping organization webhook
    POST /api/orgs/{organization}/hooks/{webhookname}/ping
    
    // Ping stack webhook
    POST /api/stacks/{organization}/{project}/{stack}/hooks/{webhookname}/ping