1. Docs
  2. Reference
  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

    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
    organizationstringpathorganization 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/{organization}/tokens
    

    Parameters

    ParameterTypeInDescription
    organization.stringpathOrganization to list the access tokens for.
    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
    teamNamestringpathteam 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}
    

    Team Management

    Update Team Membership

    Add or remove a member of the organization to or from a team

    PATCH /api/orgs/{organization}/teams/{team}
    

    Parameters

    ParameterTypeInDescription
    organizationstringpathorganization name
    teamstringpathteam name
    memberstringbodyuser name
    memberActionstringbodyadd or remove user (available values are add or remove)

    Example

    
    // To add an organization member to a team:
    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request PATCH \
      -d '{ "memberAction": "add", "member": "{username}" }' \
      https://api.pulumi.com/api/orgs/{org}/teams/{teamName}
    
    // To remove an organization member from a team:
    curl \
      -H "Accept: application/vnd.pulumi+8" \
      -H "Content-Type: application/json" \
      -H "Authorization: token $PULUMI_ACCESS_TOKEN" \
      --request PATCH \
      -d '{ "memberAction": "remove", "member": "{username}" }' \
      https://api.pulumi.com/api/orgs/{org}/teams/{teamName}
    

    Webhooks

    For comprehensive information about webhooks including setup, configuration, event filtering, and complete API reference, see the Webhooks documentation and Webhooks REST API reference.

      Meet Neo: Your AI Platform Teammate