Organization API › Teams
Add a member to a team
Adds a member of the organization to the team, or changes their place in it.
A seat in a team is every role the team holds, so the key must hold every
permission those roles carry (FORBIDDEN, naming the first it lacks), and a
team holding the Admin role takes an administrator (ADMIN_ONLY).
Permission (API-key scope): identity:team:write.
Authorization
bearerAuth(identity:team:write)apiKeyHeader(identity:team:write)
Parameters
Path parameters
idstring requiredThe id of the member (usr_…), team (team_…), role (role_…), invitation (inv_…) or organization (org_…) the path names.
Request body required
user_idstring requiredroleTeamMemberRole
Responses
201
Added.
dataobject requiredstatusstring
successboolean required
400
Not JSON (INVALID_BODY), or user_id is missing (VALIDATION_FAILED).
errorobject requiredcodestring requiredmessagestring requiredrequest_idstringThe response'sX-Request-ID; quote it to support.detailsarray of object requiredfieldstringmessagestring
401
No API key was sent, or it is unknown, revoked or expired (UNAUTHORIZED).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
403
The key lacks the scope (FORBIDDEN); the change would grant a permission the key does not hold (FORBIDDEN, naming it); or only an administrator may do it (ADMIN_ONLY).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
404
No such team, or the person is not a member of the organization (NOT_FOUND).
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
429
Too many requests (RATE_LIMITED). Wait Retry-After seconds.
Retry-AfterintegerSeconds to wait.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
500
Something went wrong on EvoHub's side (INTERNAL_ERROR). Retry later.
errorobject requiredcodestring requiredMachine-readable code. Branch on this.messagestring requiredHuman-readable explanation.request_idstringThe response'sX-Request-ID; quote it to support.
Example request
curl -X POST 'https://evohub.io/api/v1/teams/string/members' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"role": "member",
"user_id": "usr_7a3c9e10-b2d4-4f6a-8c1e-5d7f9a0b2c3e"
}'