MCP Gateway
ApiUsers

Create a user

Create a new user programmatically without OAuth/SSO. Optionally provision an API key in the same request. Role hierarchy is enforced. Requires ADMIN or OWNER role.

POST
/api/v1/users

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

access_token?|

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/users" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "email": "string",
  "name": "string",
  "role": "owner",
  "is_active": true,
  "email_verified": true,
  "created_at": "2019-08-24T14:15:22Z",
  "api_key": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "key": "string",
    "name": "string",
    "expires_at": "2019-08-24T14:15:22Z"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}