Skip to content

Enable Turnstile

POST/web/v1/system/workspaces/{workspaceId}/institutions/{institutionBizId}/portals/turnstile/enable WEB

Enables Cloudflare Turnstile verification for the specified institution. After enabling, all portal login flows will require Turnstile challenge completion.

Required Headers

HeaderExample ValueDescription
Content-Typeapplication/jsonRequest content type
Acceptapplication/jsonExpected response type
X-Client-HashClient device fingerprint
Accept-Languageen, zh, zh-Hant, ja, viResponse language (default: en)
AuthorizationBearerJWT access token

Request Parameters

Path Parameters

NameTypeRequiredInDescription
workspaceIdstringRequiredpathWorkspace business ID
institutionBizIdstringRequiredpathInstitution business ID

No request body required.

Success Response

Success 200
{
  "success": true,
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "id": 1,
    "institutionBizId": "INST_ACME_001",
    "turnstileSiteKey": "0x4AAAAAAABkMYinukE8nMDQ",
    "turnstileSecretKey": "****nMDQ",
    "enabled": true,
    "remark": "Production turnstile",
    "createdAt": "2026-03-21T00:00:00Z",
    "updatedAt": "2026-03-23T10:00:00Z"
  }
}

Response Fields

FieldTypeDescription
idnumberInternal record ID
institutionBizIdstringInstitution business ID
turnstileSiteKeystringCloudflare Turnstile site key
turnstileSecretKeystringMasked secret key (only last 4 characters visible)
enabledbooleanAlways true after this operation
remarkstring|nullConfiguration remark
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Error Responses

CodeDescription
4010Unauthorized (invalid or missing JWT token)
4040Institution or turnstile configuration not found

Notes

  • A Turnstile configuration must already exist (created via Update Turnstile) before it can be enabled.
  • If Turnstile is already enabled, this operation is idempotent and returns the current state.
  • The turnstileSecretKey is masked in the response (format: ****xxxx).

SlaunchX Internal Documentation