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 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. However, all accounts are automatically assigned a “personal” team, which is for their exclusive use, and which may own resources.

Content type: application/json

Name Nullable Type Description
id string in EID format

Unique ID for the team.

billing_email âś” string

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

billing_­email_­verified ✔ boolean

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_at string of date/time formatted as RFC 3339

Time at which the team was created.

default_­role_­flavor 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.

enforce_sso boolean

The team’s SSO enforcement setting.

invoice_note âś” string

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

is_default boolean

Whether this is the authenticated account’s default team.

is_personal boolean

Whether the team is a personal team. Every account automatically gets a personal team for which they’re the only possible member and to which all the resources it owns are assigned.

name string

Name of the team. Empty string for a personal team.

payment_method âś” string

The payment method for the team.

role enum 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_tier âś” enum string

The support tier for the team.

Enum business, premium, or standard.

updated_at string of date/time formatted as RFC 3339

Time at which the team was last updated.

Example

{
    "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"
}

List teams

List existing teams.

GET /teams

Request

Query parameters

Name Required Type Description
is_personal boolean

If provided, the list is filtered on the is_personal property of teams being listed. In the case of an SSO-only account without a personal team, this will result in an empty list.

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

Name Nullable Type Description
teams array of object of type Team

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

Example

{
    "teams": [
        {
            "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

Request body schema

Content type: application/json

Name Required Type Description
name âś” string

Name is the desired name of the team.

default_­role_­flavor enum 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

Name Required Type Description
billing_email string

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

default_­role_­flavor enum 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_sso boolean

Sets the team’s SSO enforcement setting.

invoice_note string

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.

name string

Set’s the team’s name.

support_tier enum string

Sets the team’s support tier.

Enum business, premium, or standard.

Example request body

{
    "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 '{"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.