Gamma API

Accept an invitation

POST
/api/account/invitations/{id}/accept

Joins the organization (as a guest on the project, for a project invitation) and makes it the session's active one. A refusal from the auth plugin is { code, message } rather than { error }.

Who may call it: Any signed-in user, for their own account. 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

id*string

Response Body

OK.

application/json
  1. response
invitation*

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

member*

The caller's new membership.

Example Request
curl -X POST 'http://localhost:3000/api/account/invitations/string/accept'
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"  },  "member": {    "id": "string",    "organizationId": "string",    "userId": "string",    "role": "string",    "createdAt": "2019-08-24T14:15:22Z"  }}