Home

API Usage Examples

The following examples demonstrate common use cases with the HelioNote REST API.

1. Creating a Note

This example shows how to create a new note with a title and body.


curl -X POST "https://api.helionote.com/v1/notes" \
-H "Authorization: Bearer [your_api_key]" \
-H "Content-Type: application/json" \
-d '{
"title": "Meeting Notes",
"content": "Discuss project milestones and deadlines."
}'
            

2. Retrieving All Notes


curl -X GET "https://api.helionote.com/v1/notes" \
-H "Authorization: Bearer [your_api_key]"
            

Response:


[
{
"id": "101",
"title": "Meeting Notes",
"content": "Discuss project milestones and deadlines."
},
{
"id": "102",
"title": "Shopping List",
"content": "Milk, bread, eggs"
}
]
               

3. Updating a Note


curl -X PUT "https://api.helionote.com/v1/notes/101" \
-H "Authorization: Bearer [your_api_key]" \
-H "Content-Type: application/json" \
 -d '{
"title": "Updated Meeting Notes",
"content": "Revised project deadlines."
}'
                    

4. Deleting a Note


curl -X DELETE "https://api.helionote.com/v1/notes/101" \
-H "Authorization: Bearer [your_api_key]"