# Workspace API

> The workspace endpoints, each in TypeScript, Python, the CLI and curl.

The workspace endpoints, each in TypeScript, Python, the CLI and curl.

## Set up

* TypeScript

  ```bash
  npm install @reminix/sdk
  export REMINIX_API_KEY="<your API key>"
  ```

* Python

  ```bash
  pip install reminix
  export REMINIX_API_KEY="<your API key>"
  ```

* CLI

  ```bash
  npm install -g @reminix/cli
  reminix login
  ```

* curl

  ```bash
  export REMINIX_API_KEY="<your API key>"
  ```

To pass the key yourself, use `createClient({ apiKey: key })` in TypeScript or `Reminix(api_key=key)` in Python.

## Get the current workspace

`GET /v1/workspace`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/workspace/GET/workspace)

Scope: `workspace:read`.

Returns the workspace the credential acts in.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const workspace = await reminix.workspace.get();
  console.log(workspace);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  workspace = reminix.workspace.get()
  print(workspace)
  ```

* CLI

  ```bash
  reminix workspace get
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "id": "ws_9418b705-3720-48ca-b2bf-f726d1456684",
  "name": "Acme Inc.",
  "slug": "acme",
  "createdAt": "2026-08-19T12:00:00.000Z"
}
```

More about this endpoint

For an API key, that is the key’s own workspace. For a personal access token, it is the one named in `X-Workspace`. Use it as a smoke test for an integration (“who am I?”).

## List workspace members

`GET /v1/workspace/members`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/workspace/GET/workspace/members)

Scope: `workspace.members:read`.

Lists the workspace’s members and their roles, newest first.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const members = await reminix.workspace.members.list();
  console.log(members);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  members = reminix.workspace.members.list()
  print(members)
  ```

* CLI

  ```bash
  reminix workspace members list
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace/members" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "items": [
    {
      "id": "mem_5070e1f6-5adf-4170-92bd-20cac815d34c",
      "userId": "usr_4f8a2c1e-7b3d-4e9f-a6c5-2d1b0e9f8a7c",
      "name": "Ana Lopez",
      "email": "ana@example.com",
      "role": "member",
      "joinedAt": "2026-08-19T12:00:00.000Z"
    }
  ],
  "nextCursor": null
}
```

| Field                  | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `limit` number, query  | Items per page, 1–100 (default 25).             |
| `cursor` string, query | Opaque token from a previous page's nextCursor. |

More about this endpoint

Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Invite members, remove them and give them roles in the app.

## List pending invitations

`GET /v1/workspace/invitations`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/workspace/GET/workspace/invitations)

Scope: `workspace.members:read`.

Lists the invitations that are not yet accepted, declined or expired, newest first.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const invitations = await reminix.workspace.invitations.list();
  console.log(invitations);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  invitations = reminix.workspace.invitations.list()
  print(invitations)
  ```

* CLI

  ```bash
  reminix workspace invitations list
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace/invitations" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "items": [
    {
      "id": "inv_c1d9e0a4-2b7f-4e3a-9f6d-8a5b4c3e2f10",
      "email": "sam@example.com",
      "role": "member",
      "teamIds": [
        "team_5cfbfbdc-bd74-4b1b-aacf-cc18a0ab960e"
      ],
      "expiresAt": "2026-08-21T12:00:00.000Z",
      "createdAt": "2026-08-19T12:00:00.000Z"
    }
  ],
  "nextCursor": null
}
```

| Field                  | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `limit` number, query  | Items per page, 1–100 (default 25).             |
| `cursor` string, query | Opaque token from a previous page's nextCursor. |

More about this endpoint

With a personal credential, only owners and admins can call this, as in the app. A workspace API key always can. Paginate with the opaque `nextCursor`.

## Get your plan’s usage this period

`GET /v1/workspace/plan-usage`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/workspace/GET/workspace/plan-usage)

Scope: `workspace:read`.

Returns what the workspace used this period, with one entry for each thing its plan counts.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const planUsage = await reminix.workspace.planUsage.get();
  console.log(planUsage);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  plan_usage = reminix.workspace.plan_usage.get()
  print(plan_usage)
  ```

* CLI

  ```bash
  reminix workspace plan-usage get
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace/plan-usage" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "periodStart": "2026-10-17T14:30:00.000Z",
  "periodEnd": "2026-11-17T14:30:00.000Z",
  "state": "grace",
  "counts": [
    {
      "id": "webhook_deliveries",
      "label": "Webhook deliveries",
      "unit": "per month",
      "description": "Webhook deliveries this period",
      "used": 10400,
      "limit": 10000,
      "stopsAt": 11000,
      "state": "grace",
      "overage": {
        "label": "Extra checks",
        "rate": "$40 per million checks",
        "extraUnits": 700000,
        "costCents": 2800,
        "capCents": 3900,
        "defaultCapCents": 3900,
        "capIsDefault": true
      }
    }
  ],
  "notices": []
}
```

More about this endpoint

Each entry has the plan’s limit, or null when there is no limit. Each entry also says where it stands and where we start refusing new use. A period is one month from the workspace’s billing date. That date comes from its subscription or, without one, from the day you created the workspace. On an annual plan, the counts still reset every month from the subscription’s start.

## List teams

`GET /v1/workspace/teams`[ Try it in the API playground (opens in a new tab)](https://api.reminix.com/v1/docs#tag/workspace/GET/workspace/teams)

Scope: `workspace.teams:read`.

Lists the workspace’s teams and their members’ user ids, newest first.

* TypeScript

  ```ts
  import { createClient } from "@reminix/sdk";

  // Uses the REMINIX_API_KEY environment variable.
  const reminix = createClient();
  const teams = await reminix.workspace.teams.list();
  console.log(teams);
  ```

* Python

  ```python
  from reminix import Reminix

  # Uses the REMINIX_API_KEY environment variable.
  reminix = Reminix()
  teams = reminix.workspace.teams.list()
  print(teams)
  ```

* CLI

  ```bash
  reminix workspace teams list
  ```

* curl

  ```bash
  curl -X GET "https://api.reminix.com/v1/workspace/teams" \
    -H "Authorization: Bearer $REMINIX_API_KEY"
  ```

**Returns:**

```json
{
  "items": [
    {
      "id": "team_5cfbfbdc-bd74-4b1b-aacf-cc18a0ab960e",
      "name": "Engineering",
      "isDefault": false,
      "memberIds": [
        "usr_4f8a2c1e-7b3d-4e9f-a6c5-2d1b0e9f8a7c"
      ],
      "createdAt": "2026-08-19T12:00:00.000Z"
    }
  ],
  "nextCursor": null
}
```

| Field                  | Description                                     |
| ---------------------- | ----------------------------------------------- |
| `limit` number, query  | Items per page, 1–100 (default 25).             |
| `cursor` string, query | Opaque token from a previous page's nextCursor. |

More about this endpoint

Paginate with the opaque `nextCursor`. `limit` takes 1 to 100 and defaults to 25. Create teams and add members to them in the app.
