Update team member

This endpoint requires a global API token, because a member's phone numbers apply to every team in your organization.

Member in more than one organization or managed through SCIM?

A member who is in more than one organization can only change their phone numbers themselves, in their account settings. A phone number that your identity provider manages through SCIM can't be removed with this endpoint.

PATCH https://betterstack.com/api/v2/team-members/{id}

URL parameters

id
required string

Query parameters

team_name
string

Headers

Authorization
required string
Content-Type
required string

Body parameters

phone_numbers
array of strings
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"
      ],
      "phone_numbers": [
        "+14155550123",
        "+14155550199"
      ]
    }
  }
}
403

Response body

{
  "errors": "Changing phone numbers requires a global API token."
}
404

Response body

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

Response body

{
  "errors": "\"12345\" isn't a valid phone number. Use the international format, such as +1 628 900 3830."
}

Example cURL

Replace phone numbers
curl --request PATCH \
  --url "https://betterstack.com/api/v2/team-members/101" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "phone_numbers": ["+14155550123", "+14155550199"]
  }'