Overview
The Workspaces API provides local SQLite persistence for organizing people, agents, and resources on the Allternit platform. A workspace is owned by a user and can include both human members and agent members. Owners can invite additional users via email, and workspace administrators can help manage membership and invitations. All workspace routes are mounted under/api and require a valid bearer token via the platform auth middleware.
Base URL
Authentication
All requests must include a valid bearer token in theAuthorization header. The authenticated user is resolved through the platform auth middleware and exposed to the routes as the caller’s user_id. See Authentication for details.
Workspace object
Member object
Invitation object
Endpoints
List workspaces
Example request
Example response
Create a workspace
slug is omitted, it is generated from name by lowercasing and replacing spaces with hyphens.
Request body
Example request
Example response
Get a workspace
Example request
Example response
Update a workspace
owner or admin role in the workspace. Omitted fields keep their current values.
Request body
Example request
Example response
Delete a workspace
Example request
Example response
List members
Example request
Example response
Add a member
user_id or agent_id should be provided. If role is omitted, it defaults to member.
Request body
Example request
Example response
Remove a member
Example request
Example response
List invitations
Example request
Example response
Create an invitation
owner or admin role in the workspace. If role is omitted, it defaults to member.
Request body
Example request
Example response
Delete an invitation
owner or admin role in the workspace.