Gamma API

Add project members

POST
/api/projects/{projectId}/members

Idempotent: members already on the project are skipped. Answers with the ones this call added, and only those. 404 when an id is not a member of the organization; 422 when the profile is archived or not the organization's.

Who may call it: Whoever manages the project: an owner, security admin or admin of its organization, or an admin of the project. API keys: no.

Authorization

session
cookiegamma.session_token<token>

The session cookie a sign-in sets. Over HTTPS its name carries the __Secure- prefix. Browsers send it on their own; other clients keep it from the sign-in response.

Path Parameters

projectId*string

The project's id.

Request Body

application/json
  1. body
memberIds*array<>

Organization member ids (not user ids).

Items1 <= items <= 200
role?string

For everyone this call adds; those already on it keep theirs.

Default"member"
Value in"admin""member"
profileId?string

A live profile of the organization. Absent: Manager for admins, Viewer for members.

Length1 <= length

Response Body

Created.

application/json
  1. response
members*array<>
Example Request
curl -X POST 'http://localhost:3000/api/projects/string/members' \  -H 'Content-Type: application/json' \  -d '{  "memberIds": [    "string"  ]}'
Example Response
{  "members": [    {      "id": "string",      "memberId": "string",      "userId": "string",      "name": "string",      "email": "string",      "image": "string",      "role": "admin",      "profileId": "string",      "profile": {        "id": "string",        "name": "string",        "archived": true      },      "isGuest": true,      "company": {        "id": "string",        "name": "string"      },      "createdAt": "2019-08-24T14:15:22Z"    }  ]}