pydo.organizations.create_team()

Generated on 3 Aug 2026 from pydo version v0.40.0

Usage

client.organizations.create_team(
    body={
        "name": "production",
        "invitations": [...],
    },
)
Returns JSONRaises HttpResponseError

Description

To create a new team within an organization, send a POST request to /v2/organizations/team.

This endpoint must be called in an organization context. Optionally include invitations to invite users to the new team. The owner role cannot be assigned via invitation.

Parameters

name string required

Example: production

The human-readable name for the team to create.

invitations array of objects optional

Example: [{'email': '[email protected]', 'role': 'member'}, {'email': '[email protected]', 'role': 'biller'}]

Optional invitations to send when creating the team. Each invitation includes an email address and a role. The owner role cannot be assigned via invitation.

Show child properties
email string required

Example: [email protected]

The email address of the user to invite.

role string required

The role to assign to the invited user. The owner role cannot be assigned via invitation.

One of: member, biller, billing viewer, resource viewer, modifier

Request Sample

Show Request Sample
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

req = {
  "name": "production"
}

resp = client.organizations.create_team(body=req)

Response Example

Show Response Example
{
  "team": {
    "uuid": "4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679",
    "name": "production"
  },
  "invitations": {
    "[email protected]": {
      "status": "ok"
    },
    "[email protected]": {
      "status": "ok"
    }
  }
}

More Information

See /v2/organizations/team in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.