Login an identity

Login as an identity and get a token which can be used in subsequent requests to authenticate as this identity.

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

Example

cURL
123456789curl https://api.jsonpad.io/identities/login \
  -H "Content-Type: application/json" \
  -H "x-api-token: <YOUR TOKEN>" \
  -H "x-identity-token: <IDENTITY TOKEN>" \
  -H "x-identity-group: <IDENTITY GROUP>" \
  -d '{
        "name": "My Identity"
        "password": "secret"
      }'

Parameters

No parameters

Request headers

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

Request body

{
group: "sample-group"
name: "Sample Identity"
password: "new-secret"
}
  • optional
    groupstringThe identity group.
  • optional
    namestringThe name of the identity.
  • optional
    passwordstring

    The identity's password.

Response body

200 OK
{
id: "c255a487-743d-4a3f-9468-656edf632a56"
createdAt: "2026-09-05T11:30:38.985Z"
updatedAt: "2026-09-05T11:30:38.985Z"
user: {
id: "151a9492-4cc8-46a4-bb24-1b155051504c"
createdAt: "2026-09-05T11:30:38.985Z"
updatedAt: "2026-09-05T11:30:38.985Z"
lastActiveAt: "2026-09-05T11:30:38.985Z"
activated: true
displayName: "Sample User"
description: "Sample user description"
}
name: "Sample Identity"
group: "sample-group"
token: "<IDENTITY TOKEN>"
activated: true
}

Response headers

No response headers

2024-10-29