Skip to main content
POST
/
api
/
v1
/
account
/
create
curl --location --request POST 'https://nostrapi.com/api/v1/account/create' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>' \
--data-raw '{
    "name": "My Test account!"
}'
{
  "success": true,
  "message": "Successfully generated new public / private key pair.",
  "data": {
    "id": "7ae11a30-aa79-4f54-8628-48bd7c91a64b",
    "name": "My Test account!",
    "hex": {
      "publicKey": "632182f5d63a9f142387af42b72298fe8789437d91d1ebb9d742f863a675aaef",
      "privateKey": "c4969103f96e1a97e814b7002accb925e7e1871fa25328df741b47944349c4db"
    },
    "nip19": {
      "publicKey": "npub1vvsc9awk8203ggu84aptwg5cljrcssmaj8g7hwwhgtux8fn44thsuq4dwe",
      "privateKey": "nsec1cjtfzqledcvf06q5kuqz49n9eyhn7rpcl5ffj3hm5rdregs6fcndsv3sevs"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.nostrapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Body

name
string
Given name of this Nostr account.

Response

success
boolean
Indicates whether the call was successful. true if successful, false if not.
message
string
Message detailing the results of the operation.
data
object
The contents of the data response object.
curl --location --request POST 'https://nostrapi.com/api/v1/account/create' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>' \
--data-raw '{
    "name": "My Test account!"
}'
{
  "success": true,
  "message": "Successfully generated new public / private key pair.",
  "data": {
    "id": "7ae11a30-aa79-4f54-8628-48bd7c91a64b",
    "name": "My Test account!",
    "hex": {
      "publicKey": "632182f5d63a9f142387af42b72298fe8789437d91d1ebb9d742f863a675aaef",
      "privateKey": "c4969103f96e1a97e814b7002accb925e7e1871fa25328df741b47944349c4db"
    },
    "nip19": {
      "publicKey": "npub1vvsc9awk8203ggu84aptwg5cljrcssmaj8g7hwwhgtux8fn44thsuq4dwe",
      "privateKey": "nsec1cjtfzqledcvf06q5kuqz49n9eyhn7rpcl5ffj3hm5rdregs6fcndsv3sevs"
    }
  }
}