Create and deletes multiple identities
PATCH/iam/identities
Creates or delete multiple identities. This endpoint can also be used to import credentials for instance passwords, social sign in configurations or multifactor methods.
Request
- application/json
Body
identities object[]
Responses
- 200
- 400
- 409
- default
batchPatchIdentitiesResponse
- application/json
- Schema
- Example (auto)
Schema
identities object[]
{
"identities": [
{
"action": "create",
"identity": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"patch_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
]
}
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.Patch, "https://connhex.com/iam/identities");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\n \"identities\": [\n {\n \"create\": {\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 \"recovery_addresses\": [\n {\n \"created_at\": \"2024-07-29T15:51:28.071Z\",\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"updated_at\": \"2024-07-29T15:51:28.071Z\",\n \"value\": \"string\",\n \"via\": \"string\"\n }\n ],\n \"schema_id\": \"string\",\n \"state\": \"active\",\n \"traits\": {},\n \"verifiable_addresses\": [\n {\n \"created_at\": \"2014-01-01T23:28:56.782Z\",\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"status\": \"string\",\n \"updated_at\": \"2014-01-01T23:28:56.782Z\",\n \"value\": \"string\",\n \"verified\": true,\n \"verified_at\": \"2024-07-29T15:51:28.071Z\",\n \"via\": \"email\"\n }\n ]\n },\n \"patch_id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n }\n ]\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());