Create user

Manually creates a new user in the organization.

POST
/api/users
AuthorizationBearer <token>

Bearer token authentication. Use your MPilot virtual-key JWT or admin JWT. Virtual keys (prefixed with sk-bf-) can also be passed here.

In: header

namestring

User's display name

emailstring

User's email address (must be unique)

Match^[^\s@]+@[^\s@]+\.[^\s@]+$
Formatemail
role_id?integer

Optional RBAC role ID to assign

Response Body

curl -X POST "https://loading/{AI_GATEWAY_URL}/api/users" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "email": "user@example.com"  }'
{
  "user": {
    "id": "string",
    "name": "string",
    "email": "user@example.com",
    "role_id": 0,
    "role": {
      "id": 0,
      "name": "string",
      "description": "string",
      "is_system_role": true
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "teams": [
      {
        "id": "string",
        "name": "string",
        "business_unit_id": "string",
        "business_unit_name": "string"
      }
    ],
    "access_profile": {
      "id": 0,
      "user_id": "string",
      "parent_profile_id": 0,
      "name": "string",
      "is_active": true,
      "expires_at": "2019-08-24T14:15:22Z",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
{
  "event_id": "string",
  "type": "string",
  "is_bifrost_error": true,
  "status_code": 0,
  "error": {
    "type": "string",
    "code": "string",
    "message": "string",
    "param": "string",
    "event_id": "string"
  },
  "extra_fields": {
    "provider": "openai",
    "model_requested": "string",
    "request_type": "string"
  }
}
On this page

On this page

No Headings