Skip to main content

Workspaces API

The Workspaces API allows you to list all workspaces that you have access to.

Authentication Required

All API requests require authentication. See API Reference for details.

List Workspaces

Get all workspaces for the authenticated user.

GET /api/workspaces

Response

Returns an array of workspace objects.

[
{
"_id": "507f1f77bcf86cd799439013",
"name": "Marketing Team",
"role": "admin",
"created_at": "2024-01-10T08:00:00Z"
},
{
"_id": "507f1f77bcf86cd799439014",
"name": "Sales Team",
"role": "member",
"created_at": "2024-01-12T10:30:00Z"
}
]

Response Fields

FieldTypeDescription
_idstringUnique workspace identifier
namestringWorkspace name
rolestringYour role in the workspace: admin, member, viewer
created_atstringISO 8601 timestamp of when the workspace was created

Rate Limiting

  • 30 requests per minute per API key

Example Request

curl -H "X-API-Key: your_api_key_here" \
https://production.viacurrent.com/api/workspaces

Use Cases

Use this endpoint to:

  • Get workspace IDs for use with other API endpoints
  • Display a list of available workspaces to users
  • Check your access level in different workspaces

Error Responses

401 Unauthorized

{
"detail": "Invalid or missing API key"
}

429 Too Many Requests

{
"detail": "Rate limit exceeded"
}

Next Steps

Once you have a workspace ID, you can: