Skip to main content

Add members to selected team

POST 

/teams/:teamName/members

The operation allows you to add users to a specific team. Every added user gets the permission member on the team; permissions optionally lists further permissions (admin, service-account-manager) granted on top of it, the same to every user of the request; any other value, the removed edit-permissions included, rejects the whole request with 400. The caller must be a team admin or an account owner or admin; otherwise the whole request is rejected with 403.
Version 1 (application/vnd.codenow.v1+json) adds one user (username). It answers with status OK only when the user was added and the permissions were granted. A user that was not added successfully is answered with the reason in detail: 503 when the platform could not store the membership and a later retry may succeed, otherwise 400, e.g. the user already is a member or the user does not belong to the account.
Version 2 (application/vnd.codenow.v2+json) adds one or several users (usernames). The users are added independently of each other, not all-or-nothing: the answer is 200 with one result per user, and a user that was not added successfully has success false, the reason as a free text in error and as a code in errorCode, and retryable true when a later retry may succeed. Always check the result of every user.
In both versions a team that does not exist is answered with 404, and a user whose permissions could not be granted is not added. Rarely, when a later step fails, a user reported as not added is a member nevertheless; GET /teams/{teamName}/members/permissions shows the actual members.

Request​

Responses​

Version 1: the team member was added. Version 2: the result of the add per user.