OpenAgentPack Kit
POST
/api/admin/members

Request Body

application/json
  1. body
username*string
Match^[a-zA-Z0-9][a-zA-Z0-9_.-]*$
Length3 <= length <= 32
display_name*string
Length1 <= length <= 32
email?string
Formatemail
Lengthlength <= 254
auth_type*"local"
Value in"local"
password_mode*"auto"
Value in"auto"
password?string

自动生成模式不得传入该字段

Response Body

已创建;仅自动生成模式返回一次初始密码

application/json
  1. response
data*
curl -X POST 'https://example.com/api/admin/members' \  -H 'Content-Type: application/json' \  -d '{  "username": "string",  "display_name": "string",  "auth_type": "local",  "password_mode": "auto"}'
{  "data": {    "member": {      "usage_summary": {        "session_count": 0,        "deleted_session_count": 0,        "metrics": {          "input_tokens": {            "value": 0,            "covered_sessions": 0          },          "output_tokens": {            "value": 0,            "covered_sessions": 0          },          "cache_read_input_tokens": {            "value": 0,            "covered_sessions": 0          },          "cache_creation_input_tokens": {            "value": 0,            "covered_sessions": 0          },          "active_seconds": {            "value": 0,            "covered_sessions": 0          },          "duration_seconds": {            "value": 0,            "covered_sessions": 0          }        },        "agents": [          "string"        ],        "refreshed_at": "string",        "refresh_status": "idle",        "completed_sessions": 0      },      "member_id": "string",      "username": "string",      "display_name": "string",      "email": "string",      "auth_type": "local",      "status": "active",      "created_at": "string",      "updated_at": "string"    },    "initial_password": "string"  }}