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
Name | Nullable | Type | Description |
---|---|---|---|
id | string in EID format | Unique ID for the team. | |
automatic_sso_join | object of type TeamAutomaticSSOJoin object | If the team allows members with the right SSO (single sign-on) domain and provider, information about it. | |
billing_address | object of type TeamBillingAddress object | The team's billing address details. | |
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 | ✔ | 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 Enum |
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. | |
name | string | Name of the 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 |
support_tier | ✔ | enum string | The support tier for the team. Enum |
updated_at | string 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.
Name | Nullable | Type | Description |
---|---|---|---|
default_access_group | string in EID format | The default access group that a new member will be assigned to when they join automatically by SSO. | |
default_role | ✔ | enum string | The default role that will be assigned to a member that joins automatically by SSO. Deprecated: Use the more specific Enum |
sso_domain | string | SSO domain allowed to join automatically. | |
sso_identity_provider | string | SSO identity provider allowed to join automatically. | |
sso_identity_provider_user_facing_name | string | 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 |
The TeamBillingAddress
object
Billing address details for a team.
Name | Nullable | Type | Description |
---|---|---|---|
city | string | The city, district, suburb, town, or village. | |
country | string | The two-letter country code. | |
line_1 | string | The first address line (e.g., street, PO Box, or company name). | |
line_2 | ✔ | string | The second address line (e.g., apartment, suite, unit, or building). |
name | ✔ | string | The billing contact or organization name. |
postal_code | ✔ | string | The ZIP or postal code. |
state | ✔ | string | 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
Name | Required | Type | Description |
---|---|---|---|
automatic_sso_join_enabled | boolean | 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. | |
cursor | string | Return only items starting after this cursor ID. When paginating, pass the value of | |
limit | integer | The maximum number of items to return on the page. Defaults to | |
order | string | The order of pagination. Enum | |
order_field | string | The name of the field on which to paginate like |
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 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
Name | Required | Type | Description |
---|---|---|---|
name | ✔ | string | Name of the team. |
automatic_sso_join_default_role | enum string | When automatic team joining SSO (single sign-on) is enabled, the default role that new users will be assigned. Defaults to 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 Enum | |
automatic_sso_join_enabled | boolean | 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 | |
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 Enum |
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 |
---|---|---|---|
allow_automatic_sso_join_default_access_group_id | string 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_role | enum string | When automatic team joining SSO (single sign-on) is enabled, the default role that new users will be assigned. Defaults to Deprecated: Prefer the more specific Enum | |
automatic_sso_join_enabled | boolean | 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 | |
billing_address | object of type TeamBillingAddress object | Sets the team's billing address. | |
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 Enum | |
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 |
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.