Identity Provider
API Endpoints
Identity
Create

Create Identity

Creates an Identity. Required: Unburned nonce


Request

POST /api/identity

Parameters

name : String The username of the account to create

pubkey : String User public key

lud16 : JSON LUD16 JSON response object

Format

The body should be wrapped in a NOSTR event, included in the content

{
  "id": "eventHash",
  "pubkey": "AUTHORIZED_PUB_KEY",
  "kind": 1112,
  "content": {
    "name": "string",
    "pubkey": "string",
    "lud16": {
      ...
    }
  },
  "tags": [
    ["nonce", "BURNABLE_NONCE"],
  ],
  "sig": "signature of AUTHORIZED_PUB_KEY"
}

Response

200

Valid Response

{
  "success": true,
  "id": "Account UUID"
}

400

Malformed request

{
  "success": false,
  "reason": "Should send as NOSTR event"
}

403

Forbidden operation

{
  "success": false,
  "reason": "Pubkey not authorized"
}

405

Method Not Allowed

{
  "success": false,
  "reason": "Must use POST method"
}

409

Conflict

{
  "success": false,
  "reason": "Name already taken"
}
{
  "success": false,
  "reason": "Pubkey already assigned to an existing account"
}