# Create user identities

Source: https://agenta.ai/docs/reference/api/create-user-identity-admin-simple-accounts-users-identities-post

`POST /admin/simple/accounts/users/identities/`

Base URL: `https://us.cloud.agenta.ai/api` (US cloud), `https://eu.cloud.agenta.ai/api` (EU cloud) or `$AGENTA_HOST/api` (self-hosted). Authentication: `Authorization: ApiKey YOUR_API_KEY`.

Create user identities

## Request body schema

Content type: `application/json` (required)

- `options` (object, nullable)
  - `dry_run` (boolean, nullable) Default: `false`.
  - `idempotency_key` (string, nullable)
  - `create_identities` (boolean, nullable)
  - `create_api_keys` (boolean, nullable)
  - `return_api_keys` (boolean, nullable)
  - `seed_defaults` (boolean, nullable) Default: `true`.
  - `reason` (string, nullable)
- `user_ref` (object, required): Polymorphic reference that can point to a request-local key, an existing persisted ID, a stable slug, or an email address. Exactly one field must be set.
  - `ref` (string, nullable)
  - `id` (string, nullable)
  - `slug` (string, nullable)
  - `email` (string, nullable)
- `user_identity` (object, required)
  - `user_ref` (object, nullable)
    - `ref` (string, nullable)
    - `id` (string, nullable)
    - `slug` (string, nullable)
    - `email` (string, nullable)
  - `method` (string, required)
  - `subject` (string, required)
  - `domain` (string, nullable)
  - `email` (string, nullable)
  - `password` (string, nullable)
  - `verified` (boolean, nullable)
  - `provider_user_id` (string, nullable)
  - `claims` (object, nullable)

## Response schemas

### 200: Successful Response

- `accounts` (array of object) Default: `[]`.
  - `users` (Users) Default: `{}`.
  - `user_identities` (User Identities) Default: `{}`.
  - `organizations` (Organizations) Default: `{}`.
  - `workspaces` (Workspaces) Default: `{}`.
  - `projects` (Projects) Default: `{}`.
  - `organization_memberships` (Organization Memberships) Default: `{}`.
  - `workspace_memberships` (Workspace Memberships) Default: `{}`.
  - `project_memberships` (Project Memberships) Default: `{}`.
  - `subscriptions` (object, nullable)
  - `api_keys` (object, nullable)
- `errors` (array of object, nullable)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (object, nullable)

### 422: Validation Error

- `detail` (array of object)
  - `loc` (array of string | integer, required)
  - `msg` (string, required)
  - `type` (string, required)
  - `input` (any)
  - `ctx` (Context)
