CentralCSP
APIWorkspaces

Set two-factor enforcement

Requires every member to have two-factor authentication, or stops requiring it. While it is on, a member without two-factor gets 403 on every workspace endpoint until they enrol. You must have two-factor set up yourself before turning it on.

Requires the admin role on the workspace.

PUT
/v1/workspaces/{workspaceId}/mfa

Authorization

AuthorizationBearer <token>

An OpenID Connect access token issued by Keycloak, acting as the signed-in user.

In: header

Path Parameters

workspaceId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

required*boolean

true to require two-factor authentication from every member, false to stop requiring it.

Response Body

application/json

curl -X PUT "https://api-next.centralcsp.com/v1/workspaces/string/mfa" \  -H "Content-Type: application/json" \  -d '{    "required": true  }'
{  "id": "string",  "name": "Acme",  "ownerId": "string",  "requiresMfa": true,  "disableAiIntegrations": true,  "plan": {    "slug": "pro",    "name": "Pro",    "features": [      "compliance",      "alerting",      "api_keys"    ]  },  "role": "admin",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}