---
title: "Create Identity"
method: POST
path: "/v1/identities"
tags: ["identities"]
---

# Create Identity

`POST /v1/identities`

## Request

- Base URL: `https://api.cybret.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cybret.ai/v1/identities`
- Auth: HTTP bearer

## Request body

- CreateIdentityRequest: ``method`` picks the sign-in recipe; it defaults to ``password``.
  - `method` 'password' | 'session' | 'agent_generated' | 'google' | 'microsoft'
  - `label` string, required
  - `target_id` string, required
  - `login_url` string
  - `username` string
  - `secret` string, password, nullable
  - `storage_state` StorageStatePayload: Playwright ``{cookies, origins}``. Values are SecretStr and omitted from logs.
    - `cookies` StorageStateCookie[], required
      - `name` string, required
      - `value` string, password, required
      - `domain` string
      - `path` string
    - `origins` StorageStateOrigin[]
      - `origin` string, required
      - `localStorage` StorageStateLocalStorageItem[]
        - `name` string
        - `value` string, password, required
  - `totp_secret` string, password, nullable: Authenticator seed. Base32, or an otpauth://totp URI (SHA1, 6 digits, 30 seconds). Stored as base32. Write-only.
  - `user_creation_instructions` string, password, nullable
  - `authentication_instructions` string, password, nullable: Login script, max 2000 characters. Required for a Google or Microsoft click-chase test user, together with secret and totp_secret. Tokens: @url @email @password @totpUri @totp. Write-only.
  - `managed_auth_vendor` 'browserbase' | 'kernel', nullable
  - `managed_auth_connection_id` string, password, nullable
  - `role` 'owner' | 'peer'
  - `tenant_slot` 'A' | 'B'
  - `pool_source` 'managed' | 'customer' | 'hand': Where the bindable jar came from. ``customer`` is the product invite/signup path (PE). ``managed`` is a scan-scoped harness pool. ``hand`` is an operator-supplied jar.
  - `peer_of` string, nullable

## Response `201`

Successful Response

- IdentityView: Customer identity row. Secret values are never included.
  - `identity_id` string, required
  - `label` string, required
  - `method` 'password' | 'session' | 'agent_generated' | 'google' | 'microsoft', required
  - `login_url` string, required
  - `username` string, required
  - `has_secret` boolean, required
  - `bindable` boolean
  - `target_id` string, required
  - `created_at` string, date-time, required
  - `role` 'owner' | 'peer'
  - `tenant_slot` 'A' | 'B'
  - `pool_source` 'managed' | 'customer' | 'hand': Where the bindable jar came from. ``customer`` is the product invite/signup path (PE). ``managed`` is a scan-scoped harness pool. ``hand`` is an operator-supplied jar.
  - `peer_of` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cybret/apis/api-scanner-control-plane.md) · [All operations](https://skmtc.dev/cybret/apis/api-scanner-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/cybret/apis/api-scanner-control-plane/revisions/4c9b522246af?raw)
