Skip to main content
POST
https://nostrapi.com
/
api
/
v1
/
post
curl --location --request POST 'https://nostrapi.com/api/v1/post' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>' \
--data-raw '{
    "relays": ["wss://nostr.zbd.gg", "wss://relay.damus.io"],
    "content": "GM NOSTR FAM",
    "when": 1685405495
}'
{
  "success": true,
  "message": "Successfully published b4edd89a1c06c1aced80ed799090c418685939b3fe8778f8e76cc7ff1f2e36d7 event."
}

Body

content
string
The contents of the post you wish to publish. This can be any string of text, can include any links.
relays
array
The array of relay URLs you wish to publish your post to.
when
number
If you want to schedule the post to be published at a later time, you can pass a UNIX timestamp number here. If you do not pass this parameter, the post will be broadcast immediately.

Response

success
boolean
Indicates whether the call was successful. true if successful, false if not.
message
string
Message detailing the results of the operation.
curl --location --request POST 'https://nostrapi.com/api/v1/post' \
--header 'Content-Type: application/json' \
--header 'apikey: <YOUR_KEY_HERE>' \
--data-raw '{
    "relays": ["wss://nostr.zbd.gg", "wss://relay.damus.io"],
    "content": "GM NOSTR FAM",
    "when": 1685405495
}'
{
  "success": true,
  "message": "Successfully published b4edd89a1c06c1aced80ed799090c418685939b3fe8778f8e76cc7ff1f2e36d7 event."
}