Skip to content

Workspaces ​

List the workspaces a credential can act in, create another, or rename one. To act in a workspace other than the credential's own, send Rymi-Workspace: <id> on the request. See the workspaces guide for who may switch.

A workspace you create here is standalone. It has its own agents, numbers, keys and balance, and it does not receive the free monthly credit. You can own at most 20 workspaces. Client workspaces (a parent field) are not available yet.

Publishable keys cannot list, create or update workspaces.

List workspaces ​

GET/v1/workspaces

A signed-in user receives every workspace they belong to, oldest membership first. A secret key receives the workspace that key belongs to.

Response 200 ​

json
{
  "workspaces": [
    {
      "id": "3f1c0a2e-6b4d-4e1a-9c77-2a6e0b9d4f11",
      "name": "Rymi",
      "role": "owner",
      "parent_id": null,
      "operating_country": "IN",
      "current": true
    },
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "name": "Sarang",
      "role": "owner",
      "parent_id": null,
      "operating_country": null,
      "current": false
    }
  ]
}
FieldDescription
idWorkspace id. Send this as Rymi-Workspace.
nameDisplay name, stored as the tenant business_name.
roleYour role in that workspace: owner, admin or client.
parent_idAgency workspace, or null for a standalone workspace.
operating_countryISO-3166 alpha-2, or null.
currenttrue for the workspace this request is acting in.

Example ​

bash
curl https://api.rymi.live/v1/workspaces \
  -H "Authorization: Bearer $RYMI_API_KEY"
ts
const { workspaces } = await rymi.workspaces.list();
python
import os
import requests

res = requests.get(
    "https://api.rymi.live/v1/workspaces",
    headers={"Authorization": f"Bearer {os.environ['RYMI_API_KEY']}"},
)
res.raise_for_status()
workspaces = res.json()["workspaces"]

The Python package does not have a workspaces resource yet. Call the route over HTTP, as above. @rymi/node sends Rymi-Workspace when you pass workspace or set RYMI_WORKSPACE.

Create a workspace ​

POST/v1/workspaces

Body ​

FieldTypeRequiredDescription
namestringYes1 to 80 characters after trimming spaces.
operating_countrystring or nullNoISO-3166 alpha-2, for example "IN". Stored in uppercase.
parentstringNoRejected. Client workspaces are not available yet.

Example ​

bash
curl -X POST https://api.rymi.live/v1/workspaces \
  -H "Authorization: Bearer $RYMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Sarang", "operating_country": "in" }'
ts
const { workspace } = await rymi.workspaces.create({
  name: "Sarang",
  operating_country: "IN",
});
python
import os
import requests

res = requests.post(
    "https://api.rymi.live/v1/workspaces",
    headers={"Authorization": f"Bearer {os.environ['RYMI_API_KEY']}"},
    json={"name": "Sarang", "operating_country": "IN"},
)
res.raise_for_status()
workspace = res.json()["workspace"]

Response 201 ​

json
{
  "workspace": {
    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "name": "Sarang",
    "role": "owner",
    "parent_id": null,
    "operating_country": "IN"
  }
}

The new workspace starts with no free monthly credit (free_credit_eligible is false and the remaining monthly credit is 0).

Update a workspace ​

PATCH/v1/workspaces/:id

You must be owner or admin of that workspace. A missing workspace and a workspace you cannot update both return 403 workspace_forbidden.

Body ​

FieldTypeDescription
namestring1 to 80 characters after trimming spaces.
operating_countrystring or nullISO-3166 alpha-2, or null to clear it.

Example ​

bash
curl -X PATCH https://api.rymi.live/v1/workspaces/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -H "Authorization: Bearer $RYMI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Two" }'
ts
await rymi.workspaces.update("7c9e6679-7425-40de-944b-e07fc1f90ae7", {
  name: "Two",
});
python
import os
import requests

res = requests.patch(
    "https://api.rymi.live/v1/workspaces/7c9e6679-7425-40de-944b-e07fc1f90ae7",
    headers={"Authorization": f"Bearer {os.environ['RYMI_API_KEY']}"},
    json={"name": "Two"},
)
res.raise_for_status()

Response 200 ​

json
{ "ok": true }

Act in a workspace ​

http
GET /v1/agents
Rymi-Workspace: 7c9e6679-7425-40de-944b-e07fc1f90ae7
ts
const rymi = new Rymi({
  apiKey: process.env.RYMI_API_KEY,
  workspace: "7c9e6679-7425-40de-944b-e07fc1f90ae7",
});

RYMI_WORKSPACE is the same option for the SDK and for the local MCP server, when you do not pass workspace in code.

Errors ​

StatusCodeWhen
400parent_not_supportedPOST included parent. Client workspaces are not available yet.
400name is empty or longer than 80 characters.
400operating_country is not a two-letter ISO-3166 code.
403A publishable key tried to list, create or update.
403workspace_forbiddenThe header or the update names a workspace you cannot reach, including one that does not exist.
409workspace_limitYou already own 20 workspaces.