Update team member role

Changes a team member's role. Reference the target role by its ID, which you can get from the List roles API.

Authenticate with a global API token (pass team_name to choose the team) or an Uptime API token (already scoped to its team).

Organization-wide roles (admin and billing_admin) apply across every team in the organization, so assigning billing_admin updates the member in all of their teams. See Manage roles for what each role can access.

Assigning a role the member already has is a no-op that still returns 200 with the member, so this endpoint is safe to call repeatedly — for example from an automation that syncs roles on every on-call rotation change.

POST https://betterstack.com/api/v2/team-members/{id}/change-role/{role_id}

URL parameters

id
required string
role_id
required string

Query parameters

team_name
string

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": "team_lead",
      "role_id": 103,
      "mobile_app_platforms": []
    }
  }
}
401

Response body

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

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
403

Response body

{
  "errors": "Assigning the admin role is not allowed via API."
}
403

Response body

{
  "errors": "Changing an admin's role is not allowed via API."
}
404

Response body

{
  "errors": "Resource type role with id = 999 was not found"
}
404

Response body

{
  "errors": "Resource type user with id = 999 was not found"
}
409

Response body

{
  "errors": "Another role change for this user is in progress. Please try again."
}

Example cURL

Change role
curl --request POST \
  --url "https://betterstack.com/api/v2/team-members/101/change-role/103" \
  --header "Authorization: Bearer $TOKEN"