Gamma API
OrganizationsOrganizations

Get an organization

GET
/api/organizations/{slug}

With its members and invitations: all of them for owners and admins; for members and guests, themselves and the people they share a project with.

Who may call it: Any member of the organization. API keys: yes.

Authorization

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.

Response Body

OK.

application/json
  1. response

One organization with its members and invitations.

id*string
name*string
slug*string

Unique; the organization's address in URLs.

logo*|

The logo's URL, to render as is; null for none.

metadata*|

Free-form JSON, as a string, as stored.

createdAt*string
Formatdate-time
requireTwoFactor*|

Members must have two-factor authentication on to reach it. Null reads as false.

members*array<>

Owners and admins see every member; others, themselves and the people they share a project with. Oldest first.

invitations*array<>

Any status. Only those visible to the caller.

Example Request
curl -X GET 'http://localhost:3000/api/organizations/string'
Example Response
{  "id": "string",  "name": "string",  "slug": "string",  "logo": "string",  "metadata": "string",  "createdAt": "2019-08-24T14:15:22Z",  "requireTwoFactor": true,  "members": [    {      "id": "string",      "organizationId": "string",      "userId": "string",      "role": "string",      "createdAt": "2019-08-24T14:15:22Z",      "user": {        "id": "string",        "name": "string",        "email": "string",        "image": "string"      }    }  ],  "invitations": [    {      "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"    }  ]}