Skip to main content

Update an Identity

PUT 

/iam/identities/:id

This endpoint updates an identityhe identity's credentials as well.

Request

Path Parameters

    id stringrequired

    ID must be set to the ID of identity you want to update

Body

    credentials object

    Create Identity and Import Credentials

    oidc object

    Create Identity and Import Social Sign In Credentials

    config object
    config object

    Create Identity and Import Password Credentials Configuration

    hashed_passwordstring

    The hashed password in PHC format

    passwordstring

    The password in plain text if no hash is available.

    providers object[]

    A list of OpenID Connect Providers

  • Array [
  • providerstringrequired

    The OpenID Connect provider to link the subject to. Usually something like google or github.

    subjectstringrequired

    The subject (sub) of the OpenID Connect connection. Usually the sub field of the ID Token.

  • ]
  • password object

    Create Identity and Import Password Credentials

    config object

    Create Identity and Import Password Credentials Configuration

    hashed_passwordstring

    The hashed password in PHC format

    passwordstring

    The password in plain text if no hash is available.

    metadata_admin

    Store metadata about the user which is only accessible through admin APIs such as GET /iam/identities/<id>.

    metadata_public

    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.

    schema_idstringrequired

    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.

    stateAn Identity's State (string)required

    The state can either be active or inactive.

    Possible values: [active, inactive]

    traitsobjectrequired

    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

identity

Schema
    created_atstring<date-time>

    CreatedAt is a helper struct field for gobuffalo.pop.

    credentials object

    Credentials represents all credentials that can be used for authenticating this identity.

    property name* identityCredentials

    Credentials represents a specific credential type

    configobject
    created_atstring<date-time>

    CreatedAt is a helper struct field for gobuffalo.pop.

    identifiersstring[]

    Identifiers represents a list of unique identifiers this credential type matches.

    typeCredentialsType represents several different credential types, like password credentials, passwordless credentials, (string)

    and so on.

    Possible values: [password, totp, oidc, webauthn, lookup_secret, code]

    updated_atstring<date-time>

    UpdatedAt is a helper struct field for gobuffalo.pop.

    versioninteger<int64>

    Version refers to the version of the credential. Useful when changing the config schema.

    idstring<uuid>required

    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.

    metadata_adminnullJsonRawMessagenullable

    NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-

    metadata_publicnullJsonRawMessagenullable

    NullJSONRawMessage represents a json.RawMessage that works well with JSON, SQL, and Swagger and is NULLable-

    organization_idstring<uuid4>nullable
    recovery_addresses object[]

    RecoveryAddresses contains all the addresses that can be used to recover an identity.

  • Array [
  • created_atstring<date-time>

    CreatedAt is a helper struct field for gobuffalo.pop.

    idstring<uuid>required
    updated_atstring<date-time>

    UpdatedAt is a helper struct field for gobuffalo.pop.

    valuestringrequired
    viaRecoveryAddressType must not exceed 16 characters as that is the limitation in the SQL Schema. (string)required
  • ]
  • schema_idstringrequired

    SchemaID is the ID of the JSON Schema to be used for validating the identity's traits.

    schema_urlstringrequired

    SchemaURL is the URL of the endpoint where the identity's traits schema can be fetched from.

    format: url

    stateAn Identity's State (string)

    The state can either be active or inactive.

    Possible values: [active, inactive]

    state_changed_atstring<date-time>
    traitsidentityTraitsrequired

    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.

    updated_atstring<date-time>

    UpdatedAt is a helper struct field for gobuffalo.pop.

    verifiable_addresses object[]

    VerifiableAddresses contains all the addresses that can be verified by the user.

  • Array [
  • created_atstring<date-time>

    When this entry was created

    Example: 2014-01-01T23:28:56.782Z
    idstring<uuid>

    The ID

    statusidentityVerifiableAddressStatus (string)required

    VerifiableAddressStatus must not exceed 16 characters as that is the limitation in the SQL Schema

    updated_atstring<date-time>

    When this entry was last updated

    Example: 2014-01-01T23:28:56.782Z
    valuestringrequired

    The address value

    example foo@user.com

    verifiedbooleanrequired

    Indicates if the address has already been verified

    Example: true
    verified_atstring<date-time>
    viastringrequired

    The delivery method

    Possible values: [email, sms]

    Example: email
  • ]
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());
Request Collapse all
Parameters
— pathrequired
Body
{
  "credentials": {
    "oidc": {
      "config": {
        "config": {
          "hashed_password": "string",
          "password": "string"
        },
        "providers": [
          {
            "provider": "string",
            "subject": "string"
          }
        ]
      }
    },
    "password": {
      "config": {
        "hashed_password": "string",
        "password": "string"
      }
    }
  },
  "schema_id": "string",
  "state": "active",
  "traits": {}
}