> This page is for Trading.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.immix.xyz/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.immix.xyz/_mcp/server.

# List workspaces

GET https://api.immix.xyz/v1/workspaces

Your own workspaces (`scope=mine`, the default), of either visibility, or your organisation's shared ones (`scope=org`), `owned` telling yours apart; the newest change first unless `sort` says otherwise. `slug=` looks one of yours up by its page URL. Page with `limit` and `cursor`; `include=total` adds the exact count. Each row carries its `version`, so you can write from a page.

Reference: https://docs.immix.xyz/trading/api-reference/rest-api/workspaces/list

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `scope` (enum, optional) — `mine`: your own workspaces, of either visibility (the default). `org`: your organisation's `ORG` workspaces, yours among them, served once organisation admission exists; until then 503 `NOT_PRIMED`.
  - Allowed values: `mine`, `org`
- `slug` (string, optional) — Only the workspace with this slug: at most one of yours on `scope=mine`, one per owner on `scope=org`. A slug nobody holds, or one off the slug grammar, is an empty page.
- `visibility` (ListWorkspacesRequestVisibilityItem, optional) — Only these visibilities; repeat the parameter or comma-separate. Any value outside `Visibility` is 400.
- `tag` (string, optional) — Only workspaces carrying every one of these tags, matched lower-cased; one off the tag grammar is 400.
- `tag.notIn` (string, optional) — None of the workspaces carrying any of these tags; one off the tag grammar is 400.
- `sort` (string, optional) — Comma-separated `updatedAtNs`, `createdAtNs`, `title` or `slug`; prefix `-` for descending. Default `-updatedAtNs`. The id breaks every tie.
- `limit` (integer, optional) — Page size, 1-100; larger values are clamped. Default 50.
- `cursor` (string, optional) — `nextCursor` or `prevCursor` from a previous page, sent with the same scope, filters and sort. A cursor is bound to you: sent by anyone else it is 400.
- `include` (enum, optional) — `total` adds the exact count.
  - Allowed values: `total`

### Headers

- `X-Request-Id` (string, optional) — Your own id for the request: 8 to 128 of `[A-Za-z0-9._-]`. It becomes the request's id and is echoed on the response. A value off that grammar is replaced with a fresh id, never refused.

## Response

### 200

A page of workspaces.

- `items` (list of Workspace, required)
- `nextCursor` (string, required, nullable) — Pass as `cursor` for the next page. Null on the last page.
- `prevCursor` (string, required, nullable) — Pass as `cursor` for the previous page. Null on the first page.
- `total` (integer, required, nullable) — Exact count matching the filter. Null unless `include=total`.
- `asOfSeqTsNs` (string, required, nullable) — Always null: workspaces are read-your-writes and carry no sequencer position, so no `X-Immix-As-Of-Seq-Ts` is sent either.

## Errors

### 400 List Workspaces Request Bad Request Error

The request is malformed, or its cursor is not valid for it.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 401 List Workspaces Request Unauthorized Error

The bearer token is missing or not valid.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 403 List Workspaces Request Forbidden Error

On `scope=org`, once organisation admission exists: `AWAITING_ADMISSION`, `ORG_NOT_ACTIVE` or `FORBIDDEN_PRINCIPAL`, as the register admits you. Never on `scope=mine`.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 501 List Workspaces Request Not Implemented Error

`NOT_IMPLEMENTED`: this deployment runs no user-state store, so it serves no workspaces.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

### 503 List Workspaces Request Service Unavailable Error

`NOT_PRIMED` on `scope=org`: your organisation's shared workspaces are served once organisation admission exists, and while it is not primed; `scope=mine` is unaffected. `USER_STATE_UNAVAILABLE`: your workspaces cannot be read or written now; retry. `USER_STATE_SCHEMA_BEHIND`: the store is behind this release; a retry does not help until the deployment catches up.

- `error` (ErrorBody, required)
- `currentVersion` (string, optional) — On a 412 `VERSION_CONFLICT` from a conditional write that met a row: the row's current version (the `ETag` carries the same token); re-read, reapply, retry. Absent from every other response, a 412 for a row that no longer exists included.

## Types

### ListWorkspacesRequestVisibilityItem

- List Workspaces Request Visibility Item Zero: enum
  - Allowed values: `PRIVATE`, `ORG`
- string

### Workspace

A workspace: a layout whose shape is yours, with the metadata the API lists and sorts by. Yours (`owned`), or a colleague's shared one once organisation admission serves those.

- `workspaceId` (string, required) — The workspace's id, a UUID. Ids are opaque strings.
- `slug` (string, required) — The slug, 1 to 100 characters of `[a-z0-9-]`, unique among the owner's workspaces: minted from the title on create unless you supplied one, and never changed after, so a page URL outlives a rename.
- `title` (string, required) — The title, 1 to 100 characters, not blank, with no NUL and no unpaired surrogate.
- `layout` (map from string to any, required) — The layout: a JSON object whose shape belongs to the code that renders it (keep your own `schemaVersion` inside it). The API checks that it is an object of at most 256 KiB serialised and never reads inside it; it is served as you last wrote it: the same tree, members in their order, numbers exact.
- `tags` (list of string, required) — Tags to list by: at most 50, each 1 to 64 characters of `[a-z0-9:._-]`, lower-cased on write and unique.
- `visibility` (string, required) — Who may read the row: `PRIVATE`, its owner alone; `ORG`, the owner's organisation too, read-only, once organisation admission serves colleagues' rows. `ORG` needs a token that names an organisation: without one it is 400. Append-only: tolerate values you don't know; a write of one this release does not know is 400.
- `owned` (boolean, required) — Whether you own the row. `false` for a colleague's `ORG` workspace, which you can read but not write. The owner's identity is not on the row.
- `version` (string, required) — The row's version, the `ETag`'s value: send it as `If-Match` on a write. A decimal string from one sequence shared by every row.
- `createdAtNs` (string, required) — When the workspace was created, in epoch nanoseconds; microsecond-exact, so it ends in `000`.
- `updatedAtNs` (string, required) — When the workspace was last written, in epoch nanoseconds; microsecond-exact, so it ends in `000`.

### ErrorBody

- `code` (string, required) — Machine-readable, UPPER_SNAKE and append-only; tolerate codes you don't know. Branch on this, never on the message.
- `message` (string, required) — For display only; its wording may change at any time.
- `retryable` (boolean, required) — Whether sending the identical request again, after `Retry-After` or a short pause, can succeed with nothing else changed. `false` where something must change first: the request, the caller's standing, or the platform's own records or deployment.
- `requestId` (string, required) — The request's id, also sent as X-Request-Id; quote it to support.

## Examples

**Response**

```json
{
  "items": [
    {
      "workspaceId": "0192f3a0-7c2e-7d1a-9b3f-4d5e6f708192",
      "slug": "trading",
      "title": "Trading",
      "layout": {
        "panels": [
          {
            "type": "chart",
            "w": 8
          },
          {
            "type": "order-book",
            "w": 4
          }
        ],
        "schemaVersion": 1
      },
      "tags": [
        "desk:rates",
        "page:trade"
      ],
      "visibility": "PRIVATE",
      "owned": true,
      "version": "7",
      "createdAtNs": "1761264000000000000",
      "updatedAtNs": "1761264000000000000"
    },
    {
      "workspaceId": "0192f3a0-7c2e-7d1a-9b3f-4d5e6f708191",
      "slug": "portfolio",
      "title": "Portfolio",
      "layout": {
        "panels": [
          {
            "type": "positions",
            "w": 12
          }
        ],
        "schemaVersion": 1
      },
      "tags": [
        "desk:rates",
        "page:portfolio"
      ],
      "visibility": "PRIVATE",
      "owned": true,
      "version": "6",
      "createdAtNs": "1761263999999999000",
      "updatedAtNs": "1761263999999999000"
    }
  ],
  "total": 2
}
```

**SDK Code**

```python
import requests

url = "https://api.immix.xyz/v1/workspaces"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.immix.xyz/v1/workspaces';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.immix.xyz/v1/workspaces"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.immix.xyz/v1/workspaces")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.immix.xyz/v1/workspaces")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.immix.xyz/v1/workspaces', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.immix.xyz/v1/workspaces");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.immix.xyz/v1/workspaces")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```