/v1/workspaces/{workspace_slug}/securityAuthChange the workspace security policy
Owner only (`workspace.security.update`), a person's session only, and needs step-up. Turning the requirement on needs the caller to have two-step sign-in. Each member then has until max(now, joined) + `grace_period_days` to turn it on; past that, the workspace refuses them until they do. Workspace API keys are not affected. Saving again while it is on keeps the original start date. `PUT` replaces the policy, so it takes no `Idempotency-Key`.
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.
Request body
mfa_required*booleanRequire two-step sign-in of every member.
grace_period_daysnumberDays members get to turn it on (0-30).
Response · 200
mfa_required*booleanWhether members must use two-step sign-in.
mfa_required_since*string · date-timeWhen the requirement was turned on.
grace_period_days*numberDays a member has to turn it on.
membersarrayPer-member status; only for callers holding `workspace.member.read`.
Example
Request
PUT https://api.platform-auth.productcraft.co/v1/workspaces/{workspace_slug}/security
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"mfa_required": false,
"grace_period_days": 0
}Response
{
"mfa_required": false,
"mfa_required_since": "2026-01-01T00:00:00.000Z",
"grace_period_days": 0,
"members": [
{
"account_id": "00000000-0000-0000-0000-000000000000",
"username": "string",
"display_name": "string",
"email": "user@example.com",
"mfa_enabled": false,
"deadline": "2026-01-01T00:00:00.000Z",
"blocked": false
}
]
}