Gamma API

Assign a member to a company

PUT
/api/organizations/{slug}/members/{userId}/company

By user id. A member is in at most one company; this replaces it.

Who may call it: An owner, security admin or admin of the organization. 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

userId*string

The member's user id.

slug*string

The organization's slug, as in its URL.

Request Body

application/json
  1. body
companyId*|

The company's id; null takes them out of theirs.

Response Body

OK.

application/json
  1. response
member*
Example Request
curl -X PUT 'http://localhost:3000/api/organizations/string/members/string/company' \  -H 'Content-Type: application/json' \  -d '{  "companyId": "string"}'
Example Response
{  "member": {    "userId": "string",    "companyId": "string"  }}