PasteMyst

string home => "/"; string github => "github.com/codemyst/pastemyst"; string api-docs => "/api-docs"; string description => "A simple website for pasting text, mainly code snippets."; string version => "1.6.4"; // changelog

API

The base endpoint for the api is https://paste.myst.rs/api. It only supports HTTPS.

Rate Limit 🔗

The API is rate limited to 5 requests a second (a request every 200 milliseconds). After exceeding that limit you will get a 429 (Too Many Requests) satus code.

Create a PasteMyst 🔗

POST/paste

Create a new PasteMyst. Returns a PasteMystInfo object on success.

PasteMyst JSON parameters
FieldTypeDescription
codestringThe contents of the paste uri component encoded (encodeURIComponent).
expiresInstringWhen the PasteMyst expires. Valid values are: never, 1h, 2h, 10h, 1d, 2d or 1w.
Example PasteMyst POST request
{
    "code": "public%20class%20I%0A%7B%0A%20%20%20%20public%20string%20Dont%3B%0A%20%20%20%20public%20string%20Know%3B%0A%20%20%20%20public%20string%20Of%3B%0A%20%20%20%20public%20string%20Anything%3B%0A%20%20%20%20public%20string%20Clever%3B%0A%20%20%20%20public%20string%20To%3B%0A%20%20%20%20public%20string%20Put%3B%0A%20%20%20%20public%20string%20Here%3B%0A%7D",
    "expiresIn": "never"
}

Get a PasteMyst 🔗

GET /paste?id={PasteMystInfo.id}

Returns a PasteMystInfo object for a given PasteMyst ID.

PasteMystInfo Object 🔗

FieldTypeDescription
idstringPasteMyst's ID.
createdAtlongWhen the PasteMyst was created. In unix time.
codestringThe contents of the paste uri component encoded (encodeURIComponent).
expiresInstringWhen the PasteMyst expires. Valid values are: never, 1h, 2h, 10h, 1d, 2d or 1w.
Example PasteMystInfo Object
{
    "id": "br6",
    "createdAt": 1541188042,
    "code": "public%20class%20I%0A%7B%0A%20%20%20%20public%20string%20Dont%3B%0A%20%20%20%20public%20string%20Know%3B%0A%20%20%20%20public%20string%20Of%3B%0A%20%20%20%20public%20string%20Anything%3B%0A%20%20%20%20public%20string%20Clever%3B%0A%20%20%20%20public%20string%20To%3B%0A%20%20%20%20public%20string%20Put%3B%0A%20%20%20%20public%20string%20Here%3B%0A%7D",
    "expiresIn": "never"
}