Skip to main content
A Legal Identity is a cryptographically secured, Neuron-verified collection of personal or organizational information tied to an account. It is required for signing smart contracts, participating in token transactions, and using eDaler.

Prerequisites

  • An active, verified Neuron account with a valid JWT
  • At least one cryptographic key created on the account (see Creating cryptographic keys)

Overview

Step 1: Get application requirements

Each Neuron can be configured with different minimum requirements for identity applications. Retrieve them before building your form:
POST /Agent/Legal/GetApplicationAttributes
Authorization: Bearer {token}
The response tells you:
  • Which properties are required (e.g. first name, last name, personal number, country)
  • Minimum number of photos required
  • Whether peer review is available and how many approvals are needed
  • Whether ISO 3166 country codes are required
Use this to adapt your UI to the specific Neuron’s rules.

Step 2: Validate the personal number (optional)

If your application includes a personal number, validate and normalize it first:
POST /Agent/Legal/ValidatePNr
Authorization: Bearer {token}
Content-Type: application/json

{
  "pNr": "<personal number>",
  "country": "SE"
}
The response returns a normalized personal number. Using a normalized value avoids format mismatches during approval.

Step 3: Submit the application

Submit the identity application, referencing the cryptographic key that will be associated with this identity:
POST /Agent/Legal/ApplyId
Authorization: Bearer {token}
Content-Type: application/json

{
  "keyId": "<your key local name>",
  "keyNamespace": "<your key namespace>",
  "keyPassword": "<key password>",
  "properties": [
    { "name": "FIRST", "value": "Jane" },
    { "name": "LAST",  "value": "Smith" },
    { "name": "PNR",   "value": "<normalized personal number>" },
    { "name": "COUNTRY", "value": "SE" }
  ]
}
Common property names for personal identities include FIRST, MIDDLE, LAST, PNR, ADDR, ZIP, CITY, REGION, COUNTRY. For organizational identities, additional properties like ORGNAME, ORGNR, ORGDEPT, and ORGROLE are available. The response includes a Legal Identity ID and a status of Created.
The properties you include are cryptographically signed together with the key. They cannot be changed after submission — you must submit a new application if corrections are needed.

Step 4: Attach supporting documents (if required)

If the Neuron requires photos or other attachments:
POST /Agent/Legal/AddIdAttachment
Authorization: Bearer {token}
Content-Type: multipart/form-data

<binary file content with legalId and attachment fields>
Upload at least the minimum number of photos specified by GetApplicationAttributes.

Step 5: Mark ready for approval

Once all attachments are uploaded, signal that the application is complete:
POST /Agent/Legal/ReadyForApproval
Authorization: Bearer {token}
Content-Type: application/json

{
  "legalId": "<legal identity ID>",
  "keyId": "<your key local name>",
  "keyNamespace": "<your key namespace>",
  "keyPassword": "<key password>"
}
This triggers the approval process on the Neuron.

Monitoring the application status

Status changes are delivered asynchronously. Poll for updates using:
POST /Agent/Xmpp/PopMessages
Authorization: Bearer {token}
Or fetch the identity directly:
POST /Agent/Legal/GetIdentity
Authorization: Bearer {token}
Content-Type: application/json

{ "legalId": "<legal identity ID>" }
Monitor the state field. Proceed once it reaches Approved.

Next steps