/v1/workspaces/{workspace_slug}/services/{service}AuthEnable (or re-enable) a service for this workspace
Path parameters
workspace_slug*stringSlug of the workspace. Platform routes name the workspace by slug, positionally in the SDK (`platform.workspaces.retrieve("acme")`); the product APIs bind `workspace_id` instead.
service*stringThe product: `auth`, `mail`, `waitlist`, `social`, `trawl`, `flags` or `notify`.
Request body
settingsobjectOptional per-service settings blob captured at enable time.
Response · 201
workspace_id*string · uuidId of the workspace.
service*stringService identifier (e.g. `mail`, `waitlist`, `social`, `auth`, `trawl`, `flags`, `notify`).
Example: "mail"
enabled*booleanWhether the service is on for the workspace.
enabled_at*string · date-timeWhen the service was last turned on, or `null` if never.
enabled_by*string · uuidAccount id of who last turned it on, or `null`.
disabled_at*string · date-timeWhen the service was last turned off, or `null`.
disabled_by*string · uuidAccount id of who last turned it off, or `null`.
settings*objectPer-service settings blob (service-specific shape).
prelaunch*booleanWhether the product is in preview (pre-launch): it is not turned on for new workspaces automatically, and the console badges it "Preview".
Example: false
Example
Request
POST https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/services/{service}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"settings": {}
}import { PlatformAuth } from "@productcraft/platform-auth";
// Reads PRODUCTCRAFT_API_KEY from the environment; administration
// calls take a person's session: { auth: { type: "bearer", token } }
const platform = new PlatformAuth();
const workspaceServiceState = await platform.workspaces.services.enable("acme", "mail", { settings: {} });platform.workspaces.services.enable(workspaceSlug, service, params?, options?): PlatformAuth.WorkspaceServiceState
Response
{
"workspace_id": "00000000-0000-0000-0000-000000000000",
"service": "mail",
"enabled": false,
"enabled_at": "2026-01-01T00:00:00.000Z",
"enabled_by": "00000000-0000-0000-0000-000000000000",
"disabled_at": "2026-01-01T00:00:00.000Z",
"disabled_by": "00000000-0000-0000-0000-000000000000",
"settings": {},
"prelaunch": false
}