API

December 12, 2023 ยท View on GitHub

Create a paste

Request

Method: POST /api/paste

Body

NameTypeDescriptionRequired
contentstringPaste content. If encrypted, must be encoded into a string (preferably Base64).Yes
configobjectConfiguration for the pasteNo
passwordProtectedbooleanWhether the paste is password protected.No
initVectorstringInitialization vector for AES encryption. Max length: 64.No

Config Object:

NameTypeDescriptionRequired
languagestringProgramming language of the paste. Default: plaintext.No
encryptedbooleanWhether the paste is encrypted. Default: false.No
expiresAfternumberTime in seconds until the paste expires.No
burnAfterReadbooleanWhether the paste is deleted after reading.No

Examples

{
    "content": "i0n3PW6qDUhDaTrzoKg+/ip4qQwu+iq8/fWDVg==",
    "config": {
        "language": "plaintext",
        "encrypted": true,
        "expiresAfter": 3600,
        "burnAfterRead": false
    },
    "passwordProtected": false,
    "initVector": "27DIWK00yDiGx001"
}
{
    "content": "Hello World!",
    "config": {
        "language": "plaintext"
    }
}

Get a paste

Request

Method: GET /api/paste

Query Parameters

NameTypeDescriptionRequired
keystringPaste key.Yes