Skip to content

创建 Portal

POST/web/v1/workspaces/{workspaceId}/institutions/{institutionBizId}/portalsWEB

为指定机构创建新的 Portal 条目。

鉴权

需要有效的 JWT token。网关验证:enableJwtToken=trueenableTurnstile=false

请求参数

路径参数

NameTypeRequiredInDescription
workspaceIdstringYespath工作空间业务 ID
institutionBizIdstringYespath机构业务 ID

请求体

InstitutionPortalCreateRequest:

NameTypeRequiredInDescription
portalTypeintegerYesbodyPortal 类型代码(例如:10010101=system、10010102=tenant、10010103=partner、10010104=consumer)
domainstringYesbodyPortal 域名 URL(最多 255 个字符)
remarkstringNobodyPortal 备注(最多 255 个字符)

成功响应

成功200
{
  "code": "2000",
  "message": "SUCCESS",
  "data": {
    "id": 1,
    "institutionBizId": "inst_abc123",
    "portalType": 10010102,
    "domain": "https://tenant.example.com",
    "portalStatus": 10080101,
    "remark": null,
    "createdAt": "2026-03-21T00:00:00Z",
    "updatedAt": "2026-03-21T00:00:00Z"
  }
}

错误响应

错误码描述
4000验证错误(缺少 portalType 或 domain)
4010未授权(无效或缺少 JWT token)
4040机构未找到

说明

  • Portal 状态在创建时默认设置为 ACTIVE。

内部文档