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"
}
}
}
{
"success": false,
"message": "You must pass a valid API key to use this endpoint."
}
Account APIs
Create Account
Generate new Nostr accounts with public + private key pairs
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"
}
}
}
{
"success": false,
"message": "You must pass a valid API key to use this endpoint."
}
Body
string
Given name of this Nostr account.
Response
boolean
Indicates whether the call was successful.
true if successful, false if not.string
Message detailing the results of the operation.
object
The contents of the data response object.
Show Toggle
Show Toggle
string
The NOSTRAPI ID of the newly created Nostr account.
string
The name of the account. Only visible to the user who created the account.
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"
}
}
}
{
"success": false,
"message": "You must pass a valid API key to use this endpoint."
}