Skip to main content

teams

Creates, updates, deletes, gets or lists a teams resource.

Overview

Nameteams
TypeResource
Iddigitalocean.account.teams

Fields

The following fields are returned by SELECT queries:

The response will be a JSON object with a teams key. This will be set to an array of team objects belonging to the organization.

NameDatatypeDescription
idinteger (uint64)A unique identifier for the team.
namestringThe human-readable name for the team. (example: production)
companystringThe company name associated with the team, if set. (example: DigitalOcean)
emailstring (email)The email address associated with the team. (example: sammy@example.com)
joined_organization_atstring (date-time)A time value given in ISO8601 combined date and time format that represents when the team joined the organization. (example: 2024-06-12T15:04:05Z)
member_countinteger (uint64)The number of members on the team.
statusstringThe team's membership status within the organization. (joined, pending) (example: joined)
uuidstring (uuid)A unique universal identifier for the team. (example: 4e1bfbc3-dc3e-41f2-a18f-1b4d7ba71679)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
organizations_list_teamsselectTo list all teams in an organization, send a GET request to
/v2/organizations/teams.

This endpoint must be called in an organization context.
organizations_create_teaminsertnameTo 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

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription

SELECT examples

To list all teams in an organization, send a GET request to
/v2/organizations/teams.

This endpoint must be called in an organization context.

SELECT
id,
name,
company,
email,
joined_organization_at,
member_count,
status,
uuid
FROM digitalocean.account.teams
;

INSERT examples

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.

INSERT INTO digitalocean.account.teams (
name,
invitations
)
SELECT
'{{ name }}' /* required */,
'{{ invitations }}'
RETURNING
invitations,
team
;