Developers

Here you can find all the information you need to integrate with our API.

CLI

Install the pento CLI to interact with the API from your shell. This is a bash wrapper over a curl but provides QoL improvements such as file piping and slim STDOUT.

$ mkdir ~/bin
$ curl https://pento.page/developers/script > ~/bin/pento
$ chmod +x ~/bin/pento
$ export PATH=$PATH:~/bin
API

Use the following curl command to interact with the API. This example creates a new note with the title " == TITLE ==". The content of the note is " == YOUR DATA HERE ==". The note is public and has the tag "tag".

Using a wrapper over this shell is recommended!

Request

curl --request POST \
    --url https://pento.pockethost.io/api/custom/notes \
    --header 'Accept: application/json, text/plain, */*' \
    --header 'Connection: keep-alive' \
    --data '{
    "content": "== YOUR DATA HERE ==",
    "title": " == TITLE ==",
    "encrypted": false,
    "type": "raw",
    "tags": "tag",
    "visibility": "public"
    }'

Response

"data": {
    "created": "2024-09-27 09:57:52.030Z",
    "id": "ivw9mmet791q7pp",
    "shortcut": "microscopic-hollow-translator",
    "tags": [
    "ykks2pmtfv2w3hc"
    ],
    "title": "test curl",
    "type": "raw",
    "updated": "2024-09-27 09:57:52.030Z",
    "visibility": "public"
    },
    "success": true