API Documentation
Welcome to the EternalNote API. Our API allows you to programmatically manage your notes and permanently inscribe them on the Bitcoin blockchain.
Authentication
All API endpoints require authentication using an API Key. You can find your API Key in your Dashboard under the Settings tab.
Include the API Key in your requests using the X-Api-Key header.
Example Header
X-Api-Key: your-uuid-api-key
GET /api/note
Retrieve the details of a specific note using its hash.
Parameters
| Parameter | Type | Description |
|---|---|---|
hash |
string | The SHA256 hash of the note content. |
Sample Request
cURL
Python
curl -X GET "https://eternalnote.one/api/note?hash=abc123..." \
-H "X-Api-Key: your-api-key"
import requests
url = "https://eternalnote.one/api/note"
headers = {"X-Api-Key": "your-api-key"}
params = {"hash": "abc123..."}
response = requests.get(url, headers=headers, params=params)
print(response.json())
POST /api/note
Create a new note and queue it for inscription on the Bitcoin blockchain.
Request Body
| Field | Type | Description |
|---|---|---|
content |
string | The markdown content of the note (max 100KB). |
Sample Request
cURL
Python
curl -X POST "https://eternalnote.one/api/note" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"content": "Hello Bitcoin!"}'
import requests
url = "https://eternalnote.one/api/note"
headers = {
"X-Api-Key": "your-api-key",
"Content-Type": "application/json"
}
data = {"content": "Hello Bitcoin!"}
response = requests.post(url, headers=headers, json=data)
print(response.json())
GET /api/notes
List all notes created by the authenticated user.
Sample Request
cURL
Python
curl -X GET "https://eternalnote.one/api/notes" \
-H "X-Api-Key: your-api-key"
import requests
url = "https://eternalnote.one/api/notes"
headers = {"X-Api-Key": "your-api-key"}
response = requests.get(url, headers=headers)
print(response.json())
POST /api/estimate_fee
Estimate the inscription fee for a given content without creating a note.
Request Body
| Field | Type | Description |
|---|---|---|
content |
string | The markdown content to estimate. |
Sample Request
cURL
Python
curl -X POST "https://eternalnote.one/api/estimate_fee" \
-H "X-Api-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"content": "Sample content for fee estimation."}'
import requests
url = "https://eternalnote.one/api/estimate_fee"
headers = {
"X-Api-Key": "your-api-key",
"Content-Type": "application/json"
}
data = {"content": "Sample content for fee estimation."}
response = requests.post(url, headers=headers, json=data)
print(response.json())