Workspaces

Create team workspaces, manage members, assign roles, and run collaborative debates.

7 min read
Share

Workspaces let teams collaborate on AI debates under a shared identity. Each workspace has an owner, optional admins, members, and viewers — each with distinct permissions over workspace settings, debates, and membership.

BYOK Pro Required

Workspaces are available on the BYOK Pro plan. Creating or joining a workspace requires an active subscription.


Roles & Permissions

Every workspace member is assigned one of four roles. The owner role is set automatically when the workspace is created and cannot be assigned via the API.

RoleCreate workspace debatesInvite membersUpdate workspaceDelete workspace
ownerYesYesYesYes
adminYesYesYesNo
memberYesYes (if allowed by settings)NoNo
viewerNoNoNoNo

Owner Cannot Be Changed

The owner role can only be held by the creator of the workspace. It cannot be assigned to another member via the API. To transfer ownership, contact support.


Endpoints

List Workspaces

GET/api/workspaces

List all workspaces the authenticated user belongs to.

Returns every workspace where the user is an owner, admin, member, or viewer.

No request body or query parameters required.


Create Workspace

POST/api/workspaces

Create a new workspace. The authenticated user becomes the owner.

NameTypeRequiredDescription
namestringRequiredDisplay name for the workspace. 1–100 characters.
slugstringRequiredURL-safe identifier. 2–48 characters, lowercase alphanumeric with hyphens only. Must be globally unique. Example: 'acme-engineering'.
descriptionstringOptionalShort description of the workspace. Max 500 characters.
bash
curl -X POST https://api.askverdict.ai/api/workspaces \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Engineering",
    "slug": "acme-engineering",
    "description": "Debate space for the Acme platform team"
  }'

Error Responses

CodeErrorDescription
400VALIDATION_ERRORMissing required field or invalid slug format
409CONFLICTA workspace with this slug already exists
401UNAUTHORIZEDInvalid or missing API key

Get Workspace

GET/api/workspaces/:id

Retrieve full details for a single workspace. Requires any role in the workspace.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID

Update Workspace

PATCH/api/workspaces/:id

Update workspace name, description, or settings. Requires admin or owner role.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID

All body fields are optional. Only supplied fields are updated.

NameTypeRequiredDescription
namestringOptionalNew display name. 1–100 characters.
descriptionstring | nullOptionalUpdated description. Max 500 characters. Pass null to clear.
settingsobjectOptionalWorkspace settings object. All sub-fields are optional.
settings.allowMemberInvitesbooleanOptionalAllow members (not just admins/owners) to invite others.
settings.defaultDebateModestringOptionalDefault debate mode for new workspace debates. One of: 'fast', 'balanced', 'thorough'.
settings.requireApprovalForPublicDebatesbooleanOptionalRequire admin approval before a workspace debate is made public.
bash
curl -X PATCH https://api.askverdict.ai/api/workspaces/550e8400-e29b-41d4-a716-446655440000 \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "settings": {
      "allowMemberInvites": false,
      "defaultDebateMode": "thorough"
    }
  }'

Delete Workspace

DELETE/api/workspaces/:id

Permanently delete a workspace and all its data. Requires owner role.

Irreversible Action

Deleting a workspace permanently removes all associated members, debates, and settings. This action cannot be undone.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID

Member Management

List Members

GET/api/workspaces/:id/members

List all members of the workspace. Requires any role in the workspace.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID

Invite Member

POST/api/workspaces/:id/members

Invite a user by email and assign them a role. Requires member, admin, or owner role (subject to workspace settings).

Invite Permissions

By default, any workspace member can invite others. If the workspace setting allowMemberInvites is set to false, only admins and owners can send invitations.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID
NameTypeRequiredDescription
emailstringRequiredEmail address of the user to invite. The user must have an existing AskVerdict account.
rolestringRequiredRole to assign. One of: 'admin', 'member', 'viewer'. The 'owner' role cannot be assigned via invite.
bash
curl -X POST https://api.askverdict.ai/api/workspaces/550e8400-e29b-41d4-a716-446655440000/members \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "alice@acme.com",
    "role": "member"
  }'

Error Responses

CodeErrorDescription
400VALIDATION_ERRORInvalid email or invalid role value
403FORBIDDENCaller does not have permission to invite members
404NOT_FOUNDNo AskVerdict account found for this email
409CONFLICTUser is already a member of this workspace

Remove Member

DELETE/api/workspaces/:id/members/:userId

Remove a member from the workspace. Requires admin or owner role.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID
userIdstringThe user ID of the member to remove

Change Member Role

PATCH/api/workspaces/:id/members/:userId

Update the role of a workspace member. Requires admin or owner role.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID
userIdstringThe user ID of the member to update
NameTypeRequiredDescription
rolestringRequiredNew role for the member. One of: 'admin', 'member', 'viewer'. Cannot assign 'owner'.
bash
curl -X PATCH https://api.askverdict.ai/api/workspaces/550e8400-e29b-41d4-a716-446655440000/members/usr_def456 \
  -H "Authorization: Bearer vrd_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "role": "viewer" }'

Workspace Debates

List Workspace Debates

GET/api/workspaces/:id/debates

List debates belonging to this workspace, paginated. Requires any role in the workspace.

Path Parameters

ParameterTypeDescription
idstring (UUID)The workspace ID

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20Number of debates per page
bash
curl "https://api.askverdict.ai/api/workspaces/550e8400-e29b-41d4-a716-446655440000/debates?page=1&limit=20" \
  -H "Authorization: Bearer vrd_your_api_key"

Was this page helpful?