Appearance
Get the key's workspace
GET /api/v1/workspace
Its name, plan and saved templates, and what the key may do. Needs the read permission.
| Permission | read |
| MCP tool | get_workspace |
Request
No parameters or body.
Responses
| Status | Meaning |
|---|---|
200 | The workspace. |
401 | No key, or a key that is unknown, expired or revoked, or whose creator is no longer an owner or admin. |
403 | The key lacks the permission, or it is an API key and the workspace isn't on Teams & Platform. |
429 | More than 120 calls a minute through this key, more than 2000 from one network address (for IPv6, its /56 block) across all keys, or a limit on sending reached: the key's daily sends, the plan's or a recipient's daily requests, or the workspace's waiting approvals. |
Errors share one shape, { "message": "…" }: see Errors and rate limits.
200 body
| Field | Type | Description |
|---|---|---|
id | string (uuid) | — |
name | string | "Personal" for a personal workspace, else the team's name. |
personal | boolean | — |
plan | free or packs or business or teams | — |
plan_name | string | — |
key | object | The key making the call. |
key.id | string (uuid) | — |
key.name | string | — |
key.kind | api or agent | — |
key.kind_label | API key or Agent key | — |
key.connected_app | boolean | Made by connecting an app (OAuth) rather than by hand. |
key.scopes | array of read or documents or send | What it may do; for a connected app, what the person allowed. |
key.sends_need_approval | boolean | Whether its sends and intake links wait for an owner or admin to approve them. |
key.sends_label | Sends wait for approval or Sends go out at once | — |
key.recipient_domains | array of string or null | The domains it may send to; null for any. |
key.daily_send_limit | integer | — |
key.expires_at | string (date-time) | — |
templates | object | — |
templates.saved | integer | — |
templates.limit | integer or null | The most the plan keeps; null for no limit. |
Example
json
{
"id": "f1a3c5e7-9b2d-4c4f-a6e8-1b3d5f7a9c2e",
"name": "Northwind",
"personal": false,
"plan": "teams",
"plan_name": "Teams & Platform",
"key": {
"id": "d2f4b6a8-3c5e-4f7a-b9d1-2e4c6a8b1d3f",
"name": "Sales agent",
"kind": "agent",
"kind_label": "Agent key",
"connected_app": false,
"scopes": [
"read",
"documents",
"send"
],
"sends_need_approval": true,
"sends_label": "Sends wait for approval",
"recipient_domains": [
"example.com"
],
"daily_send_limit": 20,
"expires_at": "2027-02-01T16:20:00.000Z"
},
"templates": {
"saved": 4,
"limit": null
}
}Examples
bash
curl https://tryjustdocs.com/api/v1/workspace \
-H "Authorization: Bearer $JUSTDOCS_API_KEY"js
const response = await fetch("https://tryjustdocs.com/api/v1/workspace", {
headers: {
Authorization: `Bearer ${process.env.JUSTDOCS_API_KEY}`,
},
});
if (!response.ok) throw new Error((await response.json()).message);
const result = await response.json();python
import os
import requests
response = requests.get(
"https://tryjustdocs.com/api/v1/workspace",
headers={"Authorization": f"Bearer {os.environ['JUSTDOCS_API_KEY']}"},
timeout=30,
)
response.raise_for_status()
result = response.json()