Skip to main contentSkip to Content
Workspaces

Workspaces

Workspaces are the top-level multi-tenant boundary in CampaignOS. All contacts, campaigns, segments, and other resources belong to a workspace.

List Workspaces

GET /api/workspaces

Returns all workspaces the authenticated user is a member of.

Auth: Session required

Response:

[ { "id": "ws_abc123", "name": "My Company", "slug": "my-company", "settings": {}, "createdAt": "2026-01-15T10:00:00.000Z", "role": "OWNER" } ]

Create Workspace

POST /api/workspaces

Creates a new workspace. The authenticated user becomes the OWNER.

Auth: Session required

Request Body:

{ "name": "My Company", "slug": "my-company" }
FieldTypeRequiredDescription
namestringYesDisplay name of the workspace
slugstringYesURL-friendly identifier (unique)

Response (201):

{ "id": "ws_abc123", "name": "My Company", "slug": "my-company", "settings": {}, "createdAt": "2026-01-15T10:00:00.000Z", "members": [ { "userId": "usr_123", "role": "OWNER" } ] }

Errors:

  • 409 — Slug already taken

Get Workspace

GET /api/workspaces/{workspaceId}

Auth: Session + membership required

Response: Full workspace object.

Update Workspace

PATCH /api/workspaces/{workspaceId}

Auth: Session + membership required

Request Body: Partial workspace fields (name, settings, etc.)

Response: Updated workspace object.

Delete Workspace

DELETE /api/workspaces/{workspaceId}

Auth: Session + OWNER role required

Response:

{ "success": true }

Only the workspace owner can delete a workspace. This permanently removes all associated data.

Switching workspaces

The top left of the sidebar shows the current workspace. Clicking it lists every workspace you belong to with your role, and switching takes you straight to that workspace’s dashboard. The same menu has New workspace, which creates one and opens it, and a shortcut to workspace settings.

Default language

Settings → General has a Default language. It is used when a contact has no language of their own, and as the last fallback when a template has no translation for the contact’s language.

Background jobs

CampaignOS runs its own scheduler: a cron job calls /api/cron/tick every minute (configured in vercel.json, authenticated with CRON_SECRET). Each run resumes waits and decision timeouts, starts scheduled campaigns and triggers, and works through the job queue. Settings → Background jobs shows when it last ran, how much work is queued and any failed jobs. If the last run is more than a few minutes old, waits and scheduled sends are on hold.

Last updated on