Skip to content

Update Turnstile

POST/web/v1/workspaces/{workspaceId}/institutions/{institutionBizId}/turnstile/updateWEB

Updates the Cloudflare Turnstile configuration for the specified institution.

Authentication

Requires a valid JWT token. Gateway validation: enableJwtToken=true, enableTurnstile=false.

Request Parameters

Path Parameters

NameTypeRequiredInDescription
workspaceIdstringYespathWorkspace business ID
institutionBizIdstringYespathInstitution business ID

Request Body

InstitutionTurnstileUpdateRequest:

NameTypeRequiredInDescription
turnstileSiteKeystringYesbodyCloudflare Turnstile site key (max 255 characters)
turnstileSecretKeystringYesbodyCloudflare Turnstile secret key (max 255 characters)
remarkstringNobodyConfiguration remark (max 255 characters)

Success Response

Success200
{
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "id": 1,
    "institutionBizId": "inst_abc123",
    "turnstileSiteKey": "0x4AAAAAAAB...",
    "turnstileSecretKey": "****efgh",
    "remark": "Production turnstile config",
    "createdAt": "2026-03-21T00:00:00Z",
    "updatedAt": "2026-03-21T01:00:00Z"
  }
}

Error Responses

CodeDescription
4000Validation error (missing required keys)
4010Unauthorized (invalid or missing JWT token)
4040Institution not found

Notes

  • Both turnstileSiteKey and turnstileSecretKey are required fields.
  • The secret key is masked in the response. Only the last 4 characters are visible.
  • If no Turnstile configuration exists yet, this endpoint creates one.

Internal Documentation