Skip to content

Teams API reference

Terminal window
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/teams?account_id=ACCOUNT_ID
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/teams/ID

Returns a list of teams

{
"id": 1,
"name": "The Avengers",
"created_at": "2013-01-11T15:40:35Z",
"owner": {
"id": 1,
"email": "thor@example.org",
"name": "Thor"
},
"members": [...],
"projects": [...],
"invitations": [...]
}

If the account_id parameter is not supplied when requesting the list of teams, all teams will be returned across all accounts to which the provided AUTH_TOKEN has access.

Terminal window
curl -u AUTH_TOKEN: -X POST -H 'Content-type: application/json' -d '{"team":{"name":"My team"}}' https://app.honeybadger.io/v2/teams?account_id=ACCOUNT_ID

You can specify these fields:

Field nameTypeDescription
namestring

If the account_id query parameter is not provided, the team will be associated with the first account accessible by the user associated with the AUTH_TOKEN.

Terminal window
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"team":{"name":"Updated team name"}}' https://app.honeybadger.io/v2/teams/ID
Terminal window
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/teams/ID

Get a list of team members or team member details

Section titled “Get a list of team members or team member details”
Terminal window
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/teams/ID/team_members

Returns all the members or a single team member for the given team:

{
"id": 1,
"created_at": "2012-12-13T15:00:47Z",
"admin": true,
"name": "",
"email": "westley@honeybadger.io"
}
Terminal window
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' -d '{"team_member":{"admin":true}}' https://app.honeybadger.io/v2/teams/ID/team_members/ID

The list of valid fields is as follows:

Field nameTypeDescription
adminboolean
Terminal window
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/teams/ID/team_members/ID
Terminal window
curl -u AUTH_TOKEN: -X POST -H 'Content-type: application/json' \
-d '{"team_invitation":{"email":"inigo@honeybadger.io"}}' \
https://app.honeybadger.io/v2/teams/ID/team_invitations

You can specify these fields:

Field nameTypeDescription
emailstringThe invited user’s email address.
adminboolean(Optional) Set this to true to make the invited user a team admin.
messagestring(Optional) The message to be included in the invitation email.

Returns the created team invitation:

{
"id": 9,
"token": "e62394d2",
"email": "inigo@honeybadger.io",
"created_by": {
"email": "westley@honeybadger.io",
"name": "Westley"
},
"accepted_by": null,
"admin": false,
"accepted_at": null,
"created_at": "2013-01-08T15:42:16Z",
"message": null
}
Terminal window
curl -u AUTH_TOKEN: -X PUT -H 'Content-type: application/json' \
-d '{"team_invitation":{"admin": true}}' \
https://app.honeybadger.io/v2/teams/ID/team_invitations/ID

You can specify either of these fields:

Field nameTypeDescription
adminbooleanSet this to true to make the invited user a team admin.
messagestringThe message to be included in the invitation email.

Get a team invitation list or team invitation details

Section titled “Get a team invitation list or team invitation details”
Terminal window
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/teams/ID/team_invitations
curl -u AUTH_TOKEN: https://app.honeybadger.io/v2/teams/ID/team_invitations/ID

Returns a list of team invitations or a single team invitation for the given team:

{
"id": 9,
"token": "e62394d2",
"email": "",
"created_by": {
"email": "westley@honeybadger.io",
"name": "Westley"
},
"accepted_by": {
"email": "inigo@honeybadger.io",
"name": "Inigo Montoya"
},
"admin": true,
"accepted_at": "2013-01-08T15:42:41Z",
"created_at": "2013-01-08T15:42:16Z",
"message": null
}
Terminal window
curl -u AUTH_TOKEN: -X DELETE https://app.honeybadger.io/v2/teams/ID/team_invitations/ID