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
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
{
"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
}
]
}| Field | Description |
|---|---|
id | Workspace id. Send this as Rymi-Workspace. |
name | Display name, stored as the tenant business_name. |
role | Your role in that workspace: owner, admin or client. |
parent_id | Agency workspace, or null for a standalone workspace. |
operating_country | ISO-3166 alpha-2, or null. |
current | true for the workspace this request is acting in. |
Example
curl https://api.rymi.live/v1/workspaces \
-H "Authorization: Bearer $RYMI_API_KEY"const { workspaces } = await rymi.workspaces.list();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
Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 1 to 80 characters after trimming spaces. |
operating_country | string or null | No | ISO-3166 alpha-2, for example "IN". Stored in uppercase. |
parent | string | No | Rejected. Client workspaces are not available yet. |
Example
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" }'const { workspace } = await rymi.workspaces.create({
name: "Sarang",
operating_country: "IN",
});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
{
"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
You must be owner or admin of that workspace. A missing workspace and a workspace you cannot update both return 403 workspace_forbidden.
Body
| Field | Type | Description |
|---|---|---|
name | string | 1 to 80 characters after trimming spaces. |
operating_country | string or null | ISO-3166 alpha-2, or null to clear it. |
Example
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" }'await rymi.workspaces.update("7c9e6679-7425-40de-944b-e07fc1f90ae7", {
name: "Two",
});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
{ "ok": true }Act in a workspace
GET /v1/agents
Rymi-Workspace: 7c9e6679-7425-40de-944b-e07fc1f90ae7const 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
| Status | Code | When |
|---|---|---|
| 400 | parent_not_supported | POST included parent. Client workspaces are not available yet. |
| 400 | name is empty or longer than 80 characters. | |
| 400 | operating_country is not a two-letter ISO-3166 code. | |
| 403 | A publishable key tried to list, create or update. | |
| 403 | workspace_forbidden | The header or the update names a workspace you cannot reach, including one that does not exist. |
| 409 | workspace_limit | You already own 20 workspaces. |

