Team

Create and manage user teams.

Part of the API reference collection

This page is part of the Crunchy Bridge API reference, and primarily meant to act as an exhaustive guide for technical integrations which are already in progress. To understand the basics of using the API, see API concepts and getting started.

The Team API resource

A team is a small organization which multiple users may be a part of at varying levels of privilege.

All database cluster resources are owned by teams rather than specific user accounts.

Content type: application/json

NameNullableTypeDescription
idstring in EID format

Unique ID for the team.

automatic_sso_joinobject of type TeamAutomaticSSOJoinobject

If the team allows members with the right SSO (single sign-on) domain and provider, information about it.

billing_addressobject of type TeamBillingAddressobject

The team's billing address details.

billing_emailstring

The team's billing email address. Invoices are sent to this address in addition to any admins on the team.

billing_email_verifiedboolean

Whether the team's billing email address has been verified by one of its owners receiving a verification email and clicking through to confirm their ownership of it. Invoices aren't sent to billing email addresses until they've been verified successfully.

created_atstring of date/time formatted as RFC 3339

Time at which the team was created.

default_role_flavorenum string

The default type for newly created roles in a team. If omitted, new roles within the team will default to a read-only role. Valid options are read and write.

Enum read, or write.

enforce_ssoboolean

The team's SSO enforcement setting.

invoice_notestring

The team specific note to include on all newly generated invoices.

is_defaultboolean

Whether this is the authenticated account's default team.

namestring

Name of the team.

payment_methodstring

The payment method for the team.

roleenum string

Contains the role that the authenticated acccount is assigned for the team.

If this is a personal team, role is null. The user automatically has all privileges.

Enum admin, manager, or member.

support_tierenum string

The support tier for the team.

Enum business, premium, or standard.

updated_atstring of date/time formatted as RFC 3339

Time at which the team was last updated.

Example

{
    "automatic_sso_join": null,
    "billing_address": {
        "city": "Glendale",
        "country": "US",
        "line_1": "123 Elm St.",
        "line_2": "Unit #456",
        "name": "John Doe",
        "postal_code": "12345",
        "state": "AZ"
    },
    "billing_email": null,
    "billing_email_verified": null,
    "created_at": "2021-07-11T01:02:03Z",
    "default_role_flavor": "read",
    "enforce_sso": false,
    "id": "eaevtjiudzeq7bsqbbpiscund4",
    "invoice_note": "invoice note",
    "is_default": true,
    "is_personal": false,
    "name": "Crunchy Team",
    "payment_method": "credit_card",
    "role": "member",
    "support_tier": "premium",
    "updated_at": "2021-07-11T01:02:03Z"
}

The TeamAutomaticSSOJoin object

If the team allows members with the right SSO (single sign-on) domain and provider, information about it.

NameNullableTypeDescription
default_access_groupstring in EID format

The default access group that a new member will be assigned to when they join automatically by SSO.

default_roleenum string

The default role that will be assigned to a member that joins automatically by SSO.

Deprecated: Use the more specific default_access_group_id instead.

Enum admin, manager, or member.

sso_domainstring

SSO domain allowed to join automatically.

sso_identity_providerstring

SSO identity provider allowed to join automatically.

sso_identity_provider_user_facing_namestring

SSOIdentityProviderUserFacingName contains a human-friendly name for the provider allowed to join automatically.

For big providers like Azure and Google, the name will be populated like Google instead of google. For a custom OpenID Connect provider, includes a client ID.

The TeamBillingAddress object

Billing address details for a team.

NameNullableTypeDescription
citystring

The city, district, suburb, town, or village.

countrystring

The two-letter country code.

line_1string

The first address line (e.g., street, PO Box, or company name).

line_2string

The second address line (e.g., apartment, suite, unit, or building).

namestring

The billing contact or organization name.

postal_codestring

The ZIP or postal code.

statestring

The state, county, province, or region.

List teams

List teams for which the authenticated account has access.

This endpoint's pagination may be ordered through the order_field parameter by id and name. Defaults to name.

GET /teams

Request

Query parameters

NameRequiredTypeDescription
automatic_sso_join_enabledboolean

List teams that can be joined automatically with the domain and identity provider that user is currently signed into with SSO (single sign-on). SSO is required to use this parameter.

cursorstring

Return only items starting after this cursor ID. When paginating, pass the value of next_cursor from the last page into this field to get the next one.

limitinteger

The maximum number of items to return on the page. Defaults to 100 with a minimum of 1 and a maximum of 200.

orderstring

The order of pagination. asc for ascending or desc for descending. Defaults to asc.

Enum asc, or desc.

order_fieldstring

The name of the field on which to paginate like id or name. Supported fields are specific to each endpoint, and it's not possible to specify any arbitrary name. See the documentation for each specific list endpoint to see which fields it supports. Defaults to id for most resources.

cURL example

curl -X GET https://api.crunchybridge.com/teams
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Response containing the teams which a user is a member of.

Content type: application/json

NameNullableTypeDescription
teamsarray of array

Teams is the list of teams that a user is a member of.

Example

{
    "teams": [
        {
            "automatic_sso_join": null,
            "billing_address": {
                "city": "Glendale",
                "country": "US",
                "line_1": "123 Elm St.",
                "line_2": "Unit #456",
                "name": "John Doe",
                "postal_code": "12345",
                "state": "AZ"
            },
            "billing_email": null,
            "billing_email_verified": null,
            "created_at": "2021-07-11T01:02:03Z",
            "default_role_flavor": "read",
            "enforce_sso": false,
            "id": "eaevtjiudzeq7bsqbbpiscund4",
            "invoice_note": "invoice note",
            "is_default": true,
            "is_personal": false,
            "name": "Crunchy Team",
            "payment_method": "credit_card",
            "role": "member",
            "support_tier": "premium",
            "updated_at": "2021-07-11T01:02:03Z"
        }
    ]
}

Create team

Create a new team.

POST /teams

Request body schema

Content type: application/json

NameRequiredTypeDescription
namestring

Name of the team.

automatic_sso_join_default_roleenum string

When automatic team joining SSO (single sign-on) is enabled, the default role that new users will be assigned. Defaults to manager.

Deprecated: Roles have been superseded by access groups and may be removed longer term. It's more advisable to create a team first, then update it to include a default_access_group_id with the identifier of an arbitrary access group, but which may also include a built-in system access group equivalent to a role.

Enum admin, manager, or member.

automatic_sso_join_enabledboolean

When set, allows accounts who are authenticated via SSO (single sign-on) on the same provider and domain as the admin is currently logged in with to join this team automatically, without needing to be invited by an existing team member.

Set to false to disable automatic SSO joining.

default_role_flavorenum string

The default type for newly created roles in a team. If omitted, new roles within the team will default to a read-only role. Valid options are read and write.

Enum read, or write.

Example request body

{
    "name": "Crunchy Team"
}

cURL example

curl -X POST https://api.crunchybridge.com/teams
    -H "Authorization: Bearer $CRUNCHY_API_KEY"
    -H "Content-Type: application/json"
    -d '{"name":"Crunchy Team"}'

Response

Status: 200

Responds with the standard Team API resource.

Get team

Get an existing team.

GET /teams/{team_id}

Request

Path parameters

  • team_id: The ID of the team to be retrieved.

cURL example

curl -X GET https://api.crunchybridge.com/teams/{team_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Responds with the standard Team API resource.

Update team

Update an existing team.

PATCH /teams/{team_id}

Request

Path parameters

  • team_id: The ID of the team to be updated.

Request body schema

Content type: application/json

NameRequiredTypeDescription
allow_automatic_sso_join_default_access_group_idstring in EID format

When automatic team joining SSO (single sign-on) is enabled, the default access group ID that new users will be assigned. May be excluded, defaulting to the system "Manage" group.

allow_automatic_sso_join_default_roleenum string

When automatic team joining SSO (single sign-on) is enabled, the default role that new users will be assigned. Defaults to manager.

Deprecated: Prefer the more specific allow_automatic_sso_join_default_access_group_id instead.

Enum admin, manager, or member.

automatic_sso_join_enabledboolean

When set, allows accounts who are authenticated via SSO (single sign-on) on the same provider and domain as the admin is currently logged in with to join this team automatically, without needing to be invited by an existing team member.

Set to false to disable automatic SSO joining.

billing_addressobject of type TeamBillingAddressobject

Sets the team's billing address.

billing_emailstring

Sets the team's billing email address. Invoices are sent to this address in addition to any admins on the team.

default_role_flavorenum string

The default type for newly created roles in a team. If omitted, new roles within the team will default to a read-only role. Valid options are read and write.

Enum read, or write.

enforce_ssoboolean

Sets the team's SSO enforcement setting.

invoice_notestring

Sets note to be included on team invoices. A note is an arbitrary text field that a team would like to be rendered on their future invoices. e.g. Company name, address or any additional context that might be helpful to the association of the invoice to the team.

namestring

Set's the team's name.

support_tierenum string

Sets the team's support tier.

Enum business, premium, or standard.

Example request body

{
    "billing_address": {
        "city": "Glendale",
        "country": "US",
        "line_1": "123 Elm St.",
        "line_2": "Unit #456",
        "name": null,
        "postal_code": "12345",
        "state": "AZ"
    },
    "invoice_note": "ACME Inc. - Production Services.",
    "name": "Crunchy Team"
}

cURL example

curl -X PATCH https://api.crunchybridge.com/teams/{team_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"
    -H "Content-Type: application/json"
    -d '{"billing_address":{"city":"Glendale","country":"US","line_1":"123 Elm St.","line_2":"Unit #456","name":null,"postal_code":"12345","state":"AZ"},"invoice_note":"ACME Inc. - Production Services.","name":"Crunchy Team"}'

Response

Status: 200

Responds with the standard Team API resource.

Destroy team

Delete an existing team.

DELETE /teams/{team_id}

Request

Path parameters

  • team_id: The ID of the team to be destroyed.

cURL example

curl -X DELETE https://api.crunchybridge.com/teams/{team_id}
    -H "Authorization: Bearer $CRUNCHY_API_KEY"

Response

Status: 200

Responds with the standard Team API resource.