Teams

The teams endpoint allows you to retrieve all teams and your role level associated with each of those teams.

See the Getting Started section for details on retrieving a short lived token you can use to submit requests to this endpoint.

Listing teams

GET /teams

The Authorization header is required, with the value set to Bearer {access_token}.

Request example

curl --request GET "https://api.crunchybridge.com/teams"\
    --header "Accept: application/json"\
    --header "Authorization: Bearer 22rpvk7jjdqfci6rjbrl24x5m"

Response example

Status code: 200 OK

{
  "teams": [
    {
      "id": "yu75urhhxbhztiimoqpmrvmyzi",
      "billing_email": null,
      "created_at": "2020-09-02T17:38:00.779588Z",
      "is_default": true,
      "is_personal": true,
      "name": "",
      "roles": [],
      "updated_at": "2021-09-13T22:20:34.241542Z",
      "support_tier": "standard"
    },
    {
      "id": "frlfu3x2pndnllsvjadviwga54",
      "billing_email": null,
      "created_at": "2021-02-05T15:31:32.936127Z",
      "is_default": false,
      "is_personal": false,
      "name": "Dave",
      "roles": [
        0,
        1,
        2
      ],
      "updated_at": "2021-05-26T01:57:25.244722Z",
      "support_tier": "standard"
    }
  ]
}
Response item Type Description
id string Unique identifier for the team Required
billing_email string The team’s billing email address. Invoices are sent to this address in addition to any admins on the team.
is_default boolean Whether this is the authenticated account’s default team.
name string Name of team (empty when is_personal is true)
is_personal boolean Whether the team is the personal team for your account
roles array of integers Your account’s role levels for the team
0: Member
1: Manager
2: Administrator
support_tier string The support tier for the team. Required
created_at string Date/time of when the team was created, in RFC3339 format
updated_at string Date/time of when the team was last updated, in RFC3339 format

Listing team members

GET /teams/{team_id}/members

The Authorization header is required, with the value set to Bearer {access_token}.

Request example

curl --request GET "https://api.crunchybridge.com/teams/frlfu3x2pndnllsvjadviwga54/members"\
    --header "Accept: application/json"\
    --header "Authorization: Bearer 22rpvk7jjdqfci6rjbrl24x5m"

Response example

Status code: 200 OK

{
  "team_members": [
    {
      "account_id": "yu75urhhxbhztiimoqpmrvmyzi",
      "email": "[email protected]",
      "roles": [
        0,
        1,
        2
      ],
      "team_id": "frlfu3x2pndnllsvjadviwga54",
      "is_personal": false,
      "username": "[email protected]"
    }
  ]
}
Response item Type Description
account_id string Unique identifier for the member Required
email string The members email address.
is_default boolean Whether this is the authenticated account’s default team.
is_personal boolean Whether the team is the personal team for your account
roles array of integers Your account’s role levels for the team
0: Member
1: Manager
2: Administrator
username string User name
team_id string team id user belongs to