List all team members

List all team members and pending invitations.

You can also retrieve a specific member or invitation by providing an email query parameter.

The role attribute returned for each team member is the user's role in the team your API token is scoped to. A user with different roles in different teams returns different values depending on which team's token you use. Possible values: admin, billing_admin, team_lead, responder, member, or custom. custom is returned when the user has a non-system custom role.

GET https://betterstack.com/api/v2/team-members

Query parameters

team_name
string
email
string
page
integer
per_page
integer

Headers

Authorization
required string
200

Response body

{
  "data": [
    {
      "id": "101",
      "type": "team_member",
      "attributes": {
        "email": "alice@example.com",
        "first_name": "Alice",
        "last_name": "Smith",
        "created_at": "2023-10-26T10:00:00.000Z",
        "role": "admin",
        "role_id": 101,
        "mobile_app_platforms": [
          "ios",
          "android"
        ]
      }
    },
    {
      "id": "102",
      "type": "team_member",
      "attributes": {
        "email": "bob@example.com",
        "first_name": "Bob",
        "last_name": "Johnson",
        "created_at": "2023-10-27T11:00:00.000Z",
        "role": "responder",
        "role_id": 104,
        "mobile_app_platforms": []
      }
    },
    {
      "id": "103",
      "type": "team_member",
      "attributes": {
        "email": "dana@example.com",
        "first_name": "Dana",
        "last_name": "Lee",
        "created_at": "2023-10-28T09:30:00.000Z",
        "role": "custom",
        "role_id": 206,
        "mobile_app_platforms": []
      }
    },
    {
      "id": "201",
      "type": "team_member_invitation",
      "attributes": {
        "email": "charlie@example.com",
        "invited_at": "2023-10-28T12:00:00.000Z",
        "role": "member",
        "role_id": 105
      }
    }
  ],
  "pagination": {
    "first": "https://betterstack.com/api/v2/team-members?page=1",
    "last": "https://betterstack.com/api/v2/team-members?page=1",
    "prev": null,
    "next": null
  }
}
200

Response body

{
  "data": {
    "id": "101",
    "type": "team_member",
    "attributes": {
      "email": "alice@example.com",
      "first_name": "Alice",
      "last_name": "Smith",
      "created_at": "2023-10-26T10:00:00.000Z",
      "role": "admin",
      "role_id": 101,
      "mobile_app_platforms": [
        "ios"
      ]
    }
  }
}
404

Response body

{
  "errors": "Team member with email \"nonexistent@example.com\" not found"
}
422

Response body

{
  "errors": "This token has access to multiple teams. Please use the 'team_name' parameter to specify the team."
}
401

Response body

{
  "errors": "We could not authenticate your request. Please provide a valid Global API token or Uptime API token."
}

Response attributes

id
string
type
string
attributes.email
string
attributes.first_name
string or null
attributes.last_name
string or null
attributes.created_at
string
attributes.invited_at
string
attributes.role
string or null
attributes.role_id
integer
attributes.mobile_app_platforms
array
pagination.first
string
pagination.last
string
pagination.prev
string or null
pagination.next
string or null

Example cURL

List all members Find by email
curl --request GET \
  --url "https://betterstack.com/api/v2/team-members" \
  --header "Authorization: Bearer $TOKEN"
curl --request GET \
  --url "https://betterstack.com/api/v2/team-members?email=alice@example.com" \
  --header "Authorization: Bearer $TOKEN"