Create an Identity
POST {{baseUrl}}/admin/identities
Create an identity. This endpoint can also be used to import credentials for instance passwords, social sign in configurations or multifactor methods.
Request Body
{"schema_id"=>"<string>", "credentials"=>{"oidc"=>{"config"=>{"config"=>{"hashed_password"=>"<string>", "password"=>"<string>"}, "providers"=>[{"subject"=>"<string>", "provider"=>"<string>"}, {"subject"=>"<string>", "provider"=>"<string>"}]}}, "password"=>{"config"=>{"hashed_password"=>"<string>", "password"=>"<string>"}}}, "metadata_admin"=>{"description"=>"Store metadata about the user which is only accessible through admin APIs such as `GET /admin/identities/<id>`."}, "metadata_public"=>{"description"=>"Store metadata about the identity which the identity itself can see when calling for example the\nsession endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field."}, "recovery_addresses"=>[{"id"=>"<uuid>", "value"=>"<string>", "via"=>"<string>", "created_at"=>"<dateTime>", "updated_at"=>"<dateTime>"}, {"id"=>"<uuid>", "value"=>"<string>", "via"=>"<string>", "created_at"=>"<dateTime>", "updated_at"=>"<dateTime>"}], "state"=>"active", "verifiable_addresses"=>[{"value"=>"<string>", "verified"=>"<boolean>", "via"=>"email", "status"=>"<string>", "created_at"=>"<dateTime>", "id"=>"<uuid>", "updated_at"=>"<dateTime>", "verified_at"=>"<dateTime>"}, {"value"=>"<string>", "verified"=>"<boolean>", "via"=>"email", "status"=>"<string>", "created_at"=>"<dateTime>", "id"=>"<uuid>", "updated_at"=>"<dateTime>", "verified_at"=>"<dateTime>"}]}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"id":"\u003cuuid\u003e","schema_id":"\u003cstring\u003e","schema_url":"\u003cstring\u003e","traits":{"description":"Traits represent an identity's traits. The identity is able to create, modify, and delete traits\nin a self-service manner. The input will always be validated against the JSON Schema defined\nin `schema_url`."},"created_at":"\u003cdateTime\u003e","credentials":{"in_c23":{"config":{},"created_at":"\u003cdateTime\u003e","identifiers":["\u003cstring\u003e","\u003cstring\u003e"],"type":"password","updated_at":"\u003cdateTime\u003e","version":"\u003clong\u003e"},"enim_9":{"config":{},"created_at":"\u003cdateTime\u003e","identifiers":["\u003cstring\u003e","\u003cstring\u003e"],"type":"passkey","updated_at":"\u003cdateTime\u003e","version":"\u003clong\u003e"}},"metadata_admin":{"description":"NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-","nullable":true},"metadata_public":{"description":"NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-","nullable":true},"organization_id":"\u003cstring\u003e","recovery_addresses":[{"id":"\u003cuuid\u003e","value":"\u003cstring\u003e","via":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","updated_at":"\u003cdateTime\u003e"},{"id":"\u003cuuid\u003e","value":"\u003cstring\u003e","via":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","updated_at":"\u003cdateTime\u003e"}],"state":"inactive","state_changed_at":"\u003cdateTime\u003e","updated_at":"\u003cdateTime\u003e","verifiable_addresses":[{"value":"\u003cstring\u003e","verified":"\u003cboolean\u003e","via":"sms","status":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","id":"\u003cuuid\u003e","updated_at":"\u003cdateTime\u003e","verified_at":"\u003cdateTime\u003e"},{"value":"\u003cstring\u003e","verified":"\u003cboolean\u003e","via":"email","status":"\u003cstring\u003e","created_at":"\u003cdateTime\u003e","id":"\u003cuuid\u003e","updated_at":"\u003cdateTime\u003e","verified_at":"\u003cdateTime\u003e"}]}