使用待处理邀请注册

发布 /auth/signup

仅在 local/dev 中创建密码用户,在应用代码匹配的待处理邀请之前需要邀请代码。

application/json

body 必需

注册请求

  • 电子邮件 字符串 必需
  • invitation_code 字符串 必需
  • 名称 字符串
  • PWD 字符串 必需

响应

  • 201 application/json

    已创建

    隐藏响应属性 显示响应属性 对象
    • created_at 字符串
    • 电子邮件 字符串

      用户电子邮件,已解析为仅显示。

    • 名称 字符串

      用户提供的显示名称;如果没有记录,则为空。

    • org_id array[string]
    • organizations 大量[对象]

      具有显示名称的组织成员资格;并行的 OrgID。

      隐藏组织属性 显示组织属性 对象
      • 名称 字符串
      • org_id 字符串
    • role_signments 大量[对象]

      仅限角色分配

      隐藏 role_signments 属性 显示 role_signments 属性 对象
      • org_id 字符串
      • PROJECT_ID 字符串
      • 角色 字符串
    • updated_at 字符串
    • user_id 字符串

      Stable _id (hex) — 规范用户标识符。

  • 400 application/json

    Bad Request

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 403 application/json

    Forbidden

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 409 application/json

    冲突

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
  • 500 application/json

    内部服务器错误

    隐藏响应属性 显示响应属性 对象
    • 代码 字符串
    • 错误 字符串
    • Success 布尔
POST /auth/signup
curl \
 --request POST 'https://agentengine.mongodb.com/auth/signup' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "email": "string",
  "invitation_code": "string",
  "name": "string",
  "pwd": "string"
}'
请求示例
{
  "email": "string",
  "invitation_code": "string",
  "name": "string",
  "pwd": "string"
}
响应示例 (201)
{
  "created_at": "string",
  "email": "string",
  "name": "string",
  "org_ids": [
    "string"
  ],
  "organizations": [
    {
      "name": "string",
      "org_id": "string"
    }
  ],
  "role_assignments": [
    {
      "org_id": "string",
      "project_id": "string",
      "role": "string"
    }
  ],
  "updated_at": "string",
  "user_id": "string"
}
响应示例 (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (403)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (409)
{
  "code": "string",
  "error": "string",
  "success": true
}
响应示例 (500)
{
  "code": "string",
  "error": "string",
  "success": true
}