Invite a team member

Invites a member of your organization or completely new team member to your team.

If the user is already a member, it returns the existing member's details with a 200 OK status.

Inviting a user with the admin role is not permitted via the API.

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

Query parameters

team_name
string

Headers

Authorization
required string
Content-Type
required string

Body parameters

email
required string
role
string
201

Response body

{
  "message": "Invitation sent",
  "data": {
    "id": "202",
    "type": "team_member_invitation",
    "attributes": {
      "email": "new.user@example.com",
      "invited_at": "2023-10-29T14:00:00.000Z",
      "role": "member"
    }
  }
}
200

Response body

{
  "message": "User is already a member of the team",
  "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"
    }
  }
}
422

Response body

{
  "errors": "Invalid role. Allowed roles: responder, member, team_lead, billing_admin"
}
422

Response body

{
  "errors": "Email is not a valid email address"
}
422

Response body

{
  "errors": "Email is required"
}
422

Response body

{
  "errors": "Cannot invite organization members due to quota limits."
}
429

Response body

{
  "errors": "Too many invitations sent. Please try again later."
}
403

Response body

{
  "errors": "Inviting admins is not allowed via API. Allowed roles: responder, member, team_lead, billing_admin"
}

Example cURL

Invite team member Invite as team lead
curl --request POST \
  --url "https://betterstack.com/api/v2/team-members" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "email": "new.user@example.com"
  }'
curl --request POST \
  --url "https://betterstack.com/api/v2/team-members" \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "email": "new.user@example.com",
    "role": "team_lead"
  }'