Update the current identity

Update the current identity when authenticated as an identity.

PUT https://api.jsonpad.io/identities/self

Example

cURL
12345678910curl https://api.jsonpad.io/identities/self \ -X PUT \ -H "Content-Type: application/json" \ -H "x-api-token: <YOUR TOKEN>" \ -H "x-identity-token: <IDENTITY TOKEN>" \ -H "x-identity-group: <IDENTITY GROUP>" \ -d '{ "password": "new-correct-horse", "currentPassword": "correct-horse" }'

Parameters

No parameters

Request headers

  • required
    x-api-tokenstringYour API token.
  • required
    x-identity-tokenstringAn identity token.
  • required
    x-identity-groupstringAn identity group.

Request body

{
name: "Sample Identity"
displayName: "Sample Display Name"
email: "identity@example.com"
password: "new-correct-horse"
currentPassword: "correct-horse"
}
  • optional
    namestringThe name of the identity.
  • optional
    displayNamestring | nullA public name for the identity. Set this to null (or an empty string) to remove the display name.
  • optional
    emailstring | null

    The identity's email address. Set this to null to remove it (unless the group requires one). A new email address is marked as not verified.

    Changing the email address (other than its capitalisation) needs currentPassword.

  • optional
    passwordstring

    The identity's new password.

    New passwords must be at least 8 characters, and at most 72 bytes, long.

    Needs currentPassword. The identity stays logged in on this session, and every other session ends.

  • optional
    currentPasswordstring

    The identity's current password. Required to change password or email, unless the identity doesn't have a password yet.

    A wrong password counts as a failed login attempt, so repeated failures are slowed down in the same way.

Response body

200 OK
{
id: "263d71ca-0c39-4838-a2bf-b7142d40a100"
createdAt: "2026-09-23T21:08:50.477Z"
updatedAt: "2026-09-23T21:08:50.477Z"
user: {
id: "80451d57-9397-4198-855e-6b3972b92251"
createdAt: "2026-09-23T21:08:50.477Z"
updatedAt: "2026-09-23T21:08:50.477Z"
lastActiveAt: "2026-09-23T21:08:50.477Z"
activated: true
displayName: "Sample User"
description: "Sample user description"
}
name: "Sample Identity"
displayName: "Sample Display Name"
email: "identity@example.com"
emailVerified: false
hasPassword: true
tags: [
0: "my-app"
]
group: "sample-group"
activated: true
}

Response headers

  • last-modified2026-09-23T21:08:50.477ZThe date this identity was last modified.
2026-09-17