Create an identity

Create a new identity.

POST https://api.jsonpad.io/identities

Example

cURL
123456789curl https://api.jsonpad.io/identities \
  -H "Content-Type: application/json" \
  -H "x-api-token: <YOUR TOKEN>" \
  -d '{
        "group": "sample-group",
        "name": "Sample Identity",
        "password": "secret",
        "activated": true
      }'

Parameters

No parameters

Request headers

  • required
    x-api-tokenstringYour API token.

Request body

{
group: "sample-group"
name: "Sample Identity"
password: "secret"
activated: true
}
  • optional
    groupstringThe identity's group. This can be used to associate identities with a particular app or project, and helps to avoid name conflicts.
  • required
    namestringThe name of the identity. Also used as the identity's login name.
  • required
    passwordstring

    The identity's password. This is used to when logging in.

    The password will be encrypted before being stored in the database.

    Also, passwords are always redacted from events and other logs.

  • optional
    activatedbooleanWhether the identity is activated. Inactive identities cannot login and are not accessible via the API.

Response body

201 Created
{
id: "74efe24b-596f-4ed0-b5db-ccc8b7c26f29"
createdAt: "2026-09-05T11:30:27.755Z"
updatedAt: "2026-09-05T11:30:27.755Z"
user: {
id: "58195d4a-42c8-465a-89b2-0cc2d5466762"
createdAt: "2026-09-05T11:30:27.755Z"
updatedAt: "2026-09-05T11:30:27.755Z"
lastActiveAt: "2026-09-05T11:30:27.755Z"
activated: true
displayName: "Sample User"
description: "Sample user description"
}
group: "sample-group"
name: "Sample Identity"
activated: true
}

Response headers

  • locationhttps://api.jsonpad.io/identities/0513781f-2dcf-4329-bbec-e64d5243c145The URL of the newly created identity.
  • last-modified2026-09-05T11:30:27.755ZThe date this identity was last modified.
2024-12-12