调用条件、权限、请求字段、响应字段与错误处理。
请求与权限
POSThttps://openapi.qwenwork.ai/v1/biz/members
鉴权:Authorization: Bearer <access_token>;使用用户 OAuth 授权获得的访问令牌。
所需业务 Scope:biz.member.write
契约声明的授权方式:组织授权(organization)
Scope 需由平台为应用开通;用户须有相应业务权限,目标资源须在其可访问范围内。个人/组织方式是否为该应用开放,以控制台实际配置为准。
功能与限制
使用企业已验证域名下的邮箱创建一名普通成员,适用于通过应用向企业添加人员。应用需要 biz.member.write 授权,操作者需要成员管理权限,目标团队须在其管理范围内。 email 须使用小写。同一企业内已经使用过的邮箱会产生冲突,已移除成员也参与判重。team_id 省略或为 null 时使用默认启用团队。 成功返回 HTTP 201 和成员资料,新成员状态为 frozen(未分配席位)。需要激活成员时,再调用“分配成员席位”。请求超时或返回服务错误后,请先核实成员是否已创建,再决定是否重试。请求体
请求体必填。application/json
子字段的“必填”在所属对象存在时生效;联合类型的各分支分别列出,不代表同时要求所有分支字段。| 字段 | 类型 | 必填 | 说明及约束 |
|---|---|---|---|
email | string | 是 | Lowercase email; Unicode and Punycode domains are accepted and normalized by the service. |
first_name | string | 是 | 最短长度:1 最长长度:128 |
last_name | string | 否 | 最长长度:128 |
team_id | string | null | 否 | — |
Copy
{
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"team_id": null
}
成功响应
保持各业务接口原始响应结构,不统一添加code/msg/data 包装。
HTTP 201
创建企业成员成功 响应类型:application/json
Copy
{
"biz_org_id": "00000000-0000-4000-8000-000000000002",
"biz_team_id": "00000000-0000-4000-8000-000000000003",
"blocked": false,
"dingtalk_uid": null,
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"phone_number": null,
"status": "frozen",
"user_id": "00000000-0000-4000-8000-000000000001",
"username": "example-member"
}
| 字段 | 类型 | 必含 | 说明及约束 |
|---|---|---|---|
biz_org_id | string | 是 | — |
biz_team_id | string | 是 | — |
blocked | boolean | 是 | — |
dingtalk_uid | string | null | 是 | — |
email | string | null | 是 | — |
first_name | string | 是 | — |
last_name | string | 是 | — |
phone_number | string | null | 是 | — |
status | string | 是 | — |
user_id | string | 是 | — |
username | string | 是 | — |
错误响应
| HTTP | 说明及处理 |
|---|---|
400 | 请求或操作者身份资料不满足业务要求;primary_contact_phone_required / primary_contact_email_required 表示手机号与邮箱均缺失,补齐资料后重试。 |
401 | 令牌缺失或无效;检查企业授权访问令牌。 |
403 | Scope、操作者权限、企业/团队准入或邮箱域名检查失败;核对企业授权、目标团队及已验证邮箱域名。 |
404 | 成员或企业不存在;核对目标标识。 |
405 | Method Not Allowed |
409 | org_managed_auth_email_exists 表示邮箱已存在;enterprise_seat_lock_busy 表示成员创建所需的企业容量锁繁忙。先核对成员创建结果再重试。 |
413 | Request Entity Too Large |
415 | Unsupported Media Type |
422 | 参数类型、UUID、必填性或长度不合法;按 detail 中的位置修正请求。 |
429 | Too Many Requests |
500 | 业务处理失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。 |
502 | Biz 服务调用失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。 |
503 | Biz 服务暂不可用;写请求先核对实际结果再重试。 seat_projection_refresh_busy 表示过期容量刷新锁忙,本次不新增分配,可重试。 |
504 | Biz 服务调用超时;写请求结果可能不确定,先核对实际结果再重试。 |
完整字段契约
下方 JSON 包含本接口完整请求、响应、错误 Schema、嵌套约束和公开扩展定义,可复制用于核对。未声明的成功示例不作推测。展开完整接口 OpenAPI JSON
展开完整接口 OpenAPI JSON
Copy
{
"components": {
"schemas": {
"BizDomainErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "string"
},
"detail": {
"type": "string"
},
"error": {
"type": "string"
},
"org_status_reason": {
"description": "企业状态原因的原始 JSON 值,可为 null"
},
"request_id": {
"type": "string"
},
"seat_count": {
"description": "领域错误提供时返回的企业配置席位数",
"format": "int64",
"type": "integer"
},
"seat_used": {
"description": "领域错误提供时返回的企业已用席位数",
"format": "int64",
"type": "integer"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"BizGatewayErrorResponse": {
"additionalProperties": false,
"properties": {
"code": {
"type": "integer"
},
"data": {
"type": "null"
},
"error_code": {
"type": "string"
},
"msg": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": "string"
}
},
"required": [
"code",
"msg",
"data",
"error_code"
],
"type": "object"
},
"CreateRequest": {
"additionalProperties": false,
"properties": {
"email": {
"description": "Lowercase email; Unicode and Punycode domains are accepted and normalized by the service.",
"type": "string"
},
"first_name": {
"maxLength": 128,
"minLength": 1,
"type": "string"
},
"last_name": {
"maxLength": 128,
"type": "string"
},
"team_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"email",
"first_name"
],
"type": "object"
},
"MemberLookupRead": {
"additionalProperties": false,
"properties": {
"biz_org_id": {
"type": "string"
},
"biz_team_id": {
"type": "string"
},
"blocked": {
"type": "boolean"
},
"dingtalk_uid": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"phone_number": {
"type": [
"string",
"null"
]
},
"status": {
"type": "string"
},
"user_id": {
"type": "string"
},
"username": {
"type": "string"
}
},
"required": [
"user_id",
"username",
"first_name",
"last_name",
"email",
"phone_number",
"dingtalk_uid",
"biz_org_id",
"biz_team_id",
"status",
"blocked"
],
"type": "object"
},
"ValidationErrorResponse": {
"additionalProperties": false,
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationIssue"
},
"type": [
"array",
"null"
]
},
"error": {
"type": "string"
},
"request_id": {
"type": "string"
},
"trace_id": {
"type": [
"string",
"null"
]
}
},
"required": [
"error",
"detail",
"request_id",
"trace_id"
],
"type": "object"
},
"ValidationIssue": {
"additionalProperties": false,
"properties": {
"ctx": {
"additionalProperties": {},
"type": "object"
},
"input": {},
"loc": {
"items": {},
"type": [
"array",
"null"
]
},
"msg": {
"type": "string"
},
"type": {
"type": "string"
}
},
"required": [
"type",
"loc",
"msg",
"input"
],
"type": "object"
}
},
"securitySchemes": {
"OpenPlatformBearer": {
"description": "企业授权应用访问令牌;Scope 不代替操作者权限与资源隔离",
"scheme": "bearer",
"type": "http"
}
}
},
"openapi": "3.1.0",
"paths": {
"/v1/biz/members": {
"post": {
"description": "使用企业已验证域名下的邮箱创建一名普通成员,适用于通过应用向企业添加人员。应用需要 biz.member.write 授权,操作者需要成员管理权限,目标团队须在其管理范围内。\n\nemail 须使用小写。同一企业内已经使用过的邮箱会产生冲突,已移除成员也参与判重。team_id 省略或为 null 时使用默认启用团队。\n\n成功返回 HTTP 201 和成员资料,新成员状态为 frozen(未分配席位)。需要激活成员时,再调用“分配成员席位”。请求超时或返回服务错误后,请先核实成员是否已创建,再决定是否重试。",
"operationId": "biz-create-member",
"requestBody": {
"content": {
"application/json": {
"example": {
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"team_id": null
},
"schema": {
"$ref": "#/components/schemas/CreateRequest"
}
}
},
"required": true
},
"responses": {
"201": {
"content": {
"application/json": {
"example": {
"biz_org_id": "00000000-0000-4000-8000-000000000002",
"biz_team_id": "00000000-0000-4000-8000-000000000003",
"blocked": false,
"dingtalk_uid": null,
"email": "member@example.com",
"first_name": "示例成员",
"last_name": "",
"phone_number": null,
"status": "frozen",
"user_id": "00000000-0000-4000-8000-000000000001",
"username": "example-member"
},
"schema": {
"$ref": "#/components/schemas/MemberLookupRead"
}
}
},
"description": "创建企业成员成功",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"400": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "请求或操作者身份资料不满足业务要求;primary_contact_phone_required / primary_contact_email_required 表示手机号与邮箱均缺失,补齐资料后重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"401": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "令牌缺失或无效;检查企业授权访问令牌。",
"headers": {
"WWW-Authenticate": {
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"403": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Scope、操作者权限、企业/团队准入或邮箱域名检查失败;核对企业授权、目标团队及已验证邮箱域名。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"404": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "成员或企业不存在;核对目标标识。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"405": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Method Not Allowed",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"409": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "org_managed_auth_email_exists 表示邮箱已存在;enterprise_seat_lock_busy 表示成员创建所需的企业容量锁繁忙。先核对成员创建结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"413": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Request Entity Too Large",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"415": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Unsupported Media Type",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"422": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ValidationErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "参数类型、UUID、必填性或长度不合法;按 detail 中的位置修正请求。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
}
},
"description": "Too Many Requests",
"headers": {
"Retry-After": {
"description": "Seconds to wait before retrying.",
"schema": {
"type": "string"
}
},
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"500": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "业务处理失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"502": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务调用失败;保留 request_id/trace_id 联系维护方,写请求先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"503": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务暂不可用;写请求先核对实际结果再重试。 seat_projection_refresh_busy 表示过期容量刷新锁忙,本次不新增分配,可重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
},
"504": {
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/BizDomainErrorResponse"
},
{
"$ref": "#/components/schemas/BizGatewayErrorResponse"
}
]
}
}
},
"description": "Biz 服务调用超时;写请求结果可能不确定,先核对实际结果再重试。",
"headers": {
"X-Request-ID": {
"description": "开放平台为每次 HTTP 请求生成的请求 ID,用于日志关联与故障排查;重试生成新的 ID,不是幂等键或分布式 Trace ID。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
},
"X-Trace-ID": {
"description": "开放平台当前请求的 OpenTelemetry TraceID,通过请求日志与 X-Request-ID 关联;采样未保留时可能没有完整链路记录。",
"schema": {
"pattern": "^[0-9a-f]{32}$",
"type": "string"
}
}
}
}
},
"security": [
{
"OpenPlatformBearer": []
}
],
"summary": "创建企业成员",
"tags": [
"成员"
]
}
}
},
"info": {
"title": "创建企业成员",
"version": "2026-11-24"
},
"servers": [
{
"url": "https://openapi.qwenwork.ai"
}
]
}