Gamma API

Change a pending invitation's role

PATCH
/api/organizations/{slug}/invitations/{invitationId}

The invitation keeps its link and expiry; the role is the one it gives on accepting. Only pending invitations to the organization itself, not a project's guest invitations.

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

slug*string

The organization's slug, as in its URL.

invitationId*string

Request Body

application/json
  1. body
role*string

Within the caller's ceiling, for the role it gives now and the new one: an admin up to admin, a security admin up to securityAdmin, an owner any.

Value in"owner""securityAdmin""admin""projectCreator""member"

Response Body

OK.

application/json
  1. response
invitation*

An invitation to join an organization, or one project of it.

Example Request
curl -X PATCH 'http://localhost:3000/api/organizations/string/invitations/string' \  -H 'Content-Type: application/json' \  -d '{  "role": "owner"}'
Example Response
{  "invitation": {    "id": "string",    "organizationId": "string",    "email": "string",    "role": "string",    "status": "string",    "expiresAt": "2019-08-24T14:15:22Z",    "createdAt": "2019-08-24T14:15:22Z",    "inviterId": "string",    "projectId": "string"  }}