---
title: "Read who the key acts as"
method: GET
path: "/session"
tags: ["Workflow"]
---

# Read who the key acts as

`GET /session`

## Request

- Base URL: `https://gtmswag.com/api/v1`
- URL: `https://gtmswag.com/api/v1/session`
- Auth: one of:
  - none
  - HTTP bearer

Returns the member a workspace key belongs to (`teamId`, `teamRole`, `workspaceMode`), or `null` without credentials. Owner and admin keys can do the few owner-or-admin actions open to keys, such as editing workspace settings. Not rate limited.

## Response `200`

Success: `{"data": Session | null}`.

- SessionResponse: The success body: `{"data": Session | null}`.
  - `data` Session, required: The member a workspace key acts as.
    - `id` string, required: Member user ID (usr_).
    - `teamId` string, required: Workspace ID (team_).
    - `teamRole` 'owner' | 'admin' | 'member', required
    - `name` string, required
    - `email` string, required
    - `company` string, required
    - `emailVerified` boolean, required
    - `isAdmin` boolean, required: Always false for a key.
    - `isDemo` boolean, required
    - `liveEnabled` boolean, required
    - `workspaceMode` 'test' | 'live', required

## Other responses

- `401`: Not authenticated: `AUTH_REQUIRED`. Each example says when.
- `default`: Any other refusal or failure, such as 403 CSRF (a cross-origin `Origin` header), 403 HTTPS_REQUIRED or 500 INTERNAL_ERROR, with what to do next.

---

[API](https://skmtc.dev/gtmswag/apis/gtm-swag-api.md) · [All operations](https://skmtc.dev/gtmswag/apis/gtm-swag-api/llms.txt) · [OpenAPI document](https://skmtc.dev/gtmswag/apis/gtm-swag-api/revisions/9ff86fa99afe?raw)
