Generate Access Code
POST
/web/v1/workspaces/{workspaceId}/institutions/{institutionBizId}/portals/portal-types/{portalType}/access-code/generateWEBGenerates a new access code for the specified portal type. If an access code already exists, it will be replaced.
Authentication
Requires a valid JWT token. Gateway validation: enableJwtToken=true, enableTurnstile=false.
Request Parameters
Path Parameters
| Name | Type | Required | In | Description |
|---|---|---|---|---|
workspaceId | string | Yes | path | Workspace business ID |
institutionBizId | string | Yes | path | Institution business ID |
portalType | integer | Yes | path | Portal type code (e.g., 10010101=system, 10010102=tenant) |
Success Response
Success200
{
"code": "2000",
"message": "SUCCESS",
"data": {
"accessCode": "pac_xxxx1234abcd",
"institutionBizId": "inst_abc123",
"portalType": 10010102,
"expiresAt": "2026-06-21T00:00:00Z",
"rotatingCode": null,
"rotatingCodeExpiresAt": null
}
}Error Responses
| Code | Description |
|---|---|
4010 | Unauthorized (invalid or missing JWT token) |
4040 | Portal not found |
Notes
- The newly generated access code is returned unmasked in the response.
- Previous access codes are invalidated upon generation.