Skip to main content

Workspaces

A workspace is the tenant an inbox belongs to. See the Workspace model for the shape of the returned object.

CommandHTTPDescription
workspaces listGET /workspacesList the workspaces of your organization. Cursor-paginated.
workspaces getGET /workspaces/{id}Fetch one workspace by internal id or external_id.
workspaces createPOST /workspacesCreate a workspace. Requires a src=system token.
workspaces upsertPUT /workspacesCreate or update, matched by id then external_id.
workspaces updatePATCH /workspaces/{id}Update in place.
workspaces deleteDELETE /workspaces/{id}Soft-delete.

Examples​

# List, filtered and field-masked
kobana inbox workspaces list \
--params '{"source": "kobana_app", "limit": 25}' \
--fields "id,label,slug,source"

# Get one
kobana inbox workspaces get \
--params '{"id": "WORKSPACE_ID"}' \
--fields "id,label,monthly_cost_limit,monthly_emails_limit"

# Create
kobana inbox workspaces create \
--json '{"label": "Acme Inc.", "source": "kobana_app", "slug": "acme"}'

# Create or update, matched by external_id
kobana inbox workspaces upsert \
--json '{"external_id": "acme-42", "label": "Acme Inc.", "monthly_cost_limit": 100}'

# Update a limit
kobana inbox workspaces update \
--params '{"id": "WORKSPACE_ID"}' \
--json '{"monthly_emails_limit": 5000}'

# Soft-delete
kobana inbox workspaces delete --params '{"id": "WORKSPACE_ID"}' --dry-run

Next steps​