Update an Identity
PUT/iam/identities/:id
This endpoint updates an identityhe identity's credentials as well.
Request
Path Parameters
ID must be set to the ID of identity you want to update
- application/json
Body
credentials object
Store metadata about the user which is only accessible through admin APIs such as GET /iam/identities/<id>.
Store metadata about the identity which the identity itself can see when calling for example the session endpoint. Do not store sensitive information (e.g. credit score) about the identity in this field.
SchemaID is the ID of the JSON Schema to be used for validating the identity's traits. If set will update the Identity's SchemaID.
The state can either be active or inactive.
Possible values: [active, inactive]
Traits represent an identity's traits. The identity is able to create, modify, and delete traits
in a self-service manner. The input will always be validated against the JSON Schema defined
in schema_id.
Responses
- 200
- 400
- 404
- 409
- default
identity
- application/json
- Schema
- Example (auto)
Schema
CreatedAt is a helper struct field for gobuffalo.pop.
credentials object
ID is the identity's unique identifier.
The Identity ID can not be changed and can not be chosen. This ensures future compatibility and optimization for distributed stores such as CockroachDB.
NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-
recovery_addresses object[]
SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.
SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from.
format: url
The state can either be active or inactive.
Possible values: [active, inactive]
Traits represent an identity's traits. The identity is able to create, modify, and delete traits
in a self-service manner. The input will always be validated against the JSON Schema defined
in schema_url.
UpdatedAt is a helper struct field for gobuffalo.pop.
verifiable_addresses object[]
{
"created_at": "2024-07-29T15:51:28.071Z",
"credentials": {},
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"organization_id": "string",
"recovery_addresses": [
{
"created_at": "2024-07-29T15:51:28.071Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"updated_at": "2024-07-29T15:51:28.071Z",
"value": "string",
"via": "string"
}
],
"schema_id": "string",
"schema_url": "string",
"state": "active",
"state_changed_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"verifiable_addresses": [
{
"created_at": "2014-01-01T23:28:56.782Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"status": "string",
"updated_at": "2014-01-01T23:28:56.782Z",
"value": "string",
"verified": true,
"verified_at": "2024-07-29T15:51:28.071Z",
"via": "email"
}
]
}
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
errorGeneric
- application/json
- Schema
- Example (auto)
Schema
error objectrequired
{
"error": {
"code": 404,
"debug": "SQL field \"foo\" is not a bool.",
"details": {},
"id": "string",
"message": "The resource could not be found",
"reason": "User with ID 1234 does not exist.",
"request": "d7ef54b1-ec15-46e6-bccb-524b82c035e6",
"status": "Not Found"
}
}
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "https://connhex.com/iam/identities/:id");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"credentials\": {\n \"oidc\": {\n \"config\": {\n \"config\": {\n \"hashed_password\": \"string\",\n \"password\": \"string\"\n },\n \"providers\": [\n {\n \"provider\": \"string\",\n \"subject\": \"string\"\n }\n ]\n }\n },\n \"password\": {\n \"config\": {\n \"hashed_password\": \"string\",\n \"password\": \"string\"\n }\n }\n },\n \"schema_id\": \"string\",\n \"state\": \"active\",\n \"traits\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());