User and Team Endpoints
  • 07 Feb 2023
  • 1 Minute to read
  • Dark
    Light
  • PDF

User and Team Endpoints

  • Dark
    Light
  • PDF

Article summary

These endpoints allow you to update teams and users and invite new users to a team.

Invite Team User - Invites a new user to an existing team.


Invite Team User

The v1/teamUsers/inviteTeamUser endpoint will invite someone to an existing team. 

Endpoint
v1/teamUsers/inviteTeamUser
Request Method
POST
ParameterDescription
team_idYour team ID.
emailThe email address of the person to be invited to the team
roleThe role of the user. A role can be either "member" or "admin"

Request Example:

curl -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer TOKEN" \
-d '{
  "team_id": "abcd1234-ab12-ab12-ab12-abcde123456",
  "email": "email@email.com",
  "role": "member"
}' \
"https://api.ionchannel.io/v1/teamUsers/inviteTeamUser"

Response Example:

{
  "data": {
    "id": "bcde1234-ab12-ab12-ab12-abcde234567",
    "team_id": "abcd1234-ab12-ab12-ab12-abcde123456",
    "user_id": "cdef1234-ab12-ab12-ab12-abc345678",
    "role": "admin",
    "status": "pending",
    "username": "email@email.com",
    "email": "email@email.com",
    "last_active_at": "0001-01-01T00:00:00Z",
    "created_at": "0001-01-01T00:00:00Z",
    "updated_at": "0001-01-01T00:00:00Z",
    "invited_at": "0001-01-01T00:00:00Z"
  },
  "meta": {
    "total_count": 0,
    "offset": 0
  }
}



Was this article helpful?