Pastebin API

Welcome to the developer documentation for our API at pastebin.dotmaui.com.

Here, you will find comprehensive information to help you get started with integrating our API into your applications. Whether you're looking to create, retrieve, or manage pastes, this documentation provides detailed instructions and examples to guide you through the process.

Explore the various endpoints and functionalities available, and don't hesitate to reach out if you have any questions or need further assistance.

Listing Pastes

List all your pastes.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

cmd String

At the moment, only the ls command is available for displaying your pastes, with a maximum limit of 500.

True

limit String

It accepts two numeric arguments separated by a comma (e.g., 10,10). The first argument indicates the offset of the first file to be returned, while the second specifies the maximum number of files to be returned." Default is 0,500.

False

beauty Boolean

Format your JSON to make it more readable. Default is false.

False

 

For performance reasons, the text content is excluded. To retrieve the text of a single paste, use the get function.

 

Success 200

It will be a JSON string

HTTP/1.1 200 OK         
{
    "1": {
        "title": "Raspberry Pi",
        "date": "2024-03-10T10:06:47.657Z"",
        "language": "html",
        "author": "DotMaui",
        "UID": "ZOgxLQv7",
        "exposure": "public",
        "url": "https://pastebin.dotmaui.com//ZOgxLQv7",
        "expiration": null
    },
    "2": {
        "title": "Pyserver",
        "date": "2024-03-11T12:06:55.657Z"",
        "language": "python",
        "author": "DotMaui",
        "UID": "7Q433Fl5",
        "exposure": "public",
        "url": "https://pastebin.dotmaui.com/7Q433Fl5",
        "expiration": "2024-03-20T12:06:55.657Z"
    }
}

Create New Paste

Creating a new paste.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/new/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

text String

The text of your paste

True

title String

The title of the paste. Default is Untitled

False

author String

The author of the paste. Default is A Guest

False

language String

The language to determine the syntax highlighting. Default is text.

False

exposure String

"public" or "private". Default is public.

False

theme String

For the complete list of themes see this paste.

False

expiration String

For the complete list of accepted values see this paste. Default is N (never).

False

 

Success 200

The response will be a JSON string containing the URL and UID of the newly created paste.

HTTP/1.1 200 OK         
{
    "UID": "2ujGg8IA",
    "url": "https://pastebin.dotmaui.com/2ujGg8IA"
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "text"     => "My Text.",
              "title"    => "My Title",
              "language" => "text",
              "theme"    => "pastel-on-dark");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/new/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

Edit Paste

Editing a paste.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/edit/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

uid String

The UID of your paste

True

text String

The text of your paste

False

title String

The title of the paste. Default is Untitled

False

author String

The author of the paste. Default is A Guest

False

language String

The language to determine the syntax highlighting. Default is text.

False

exposure String

"public" or "private". Default is public.

False

theme String

For the complete list of themes see this paste.

False

expiration String

For the complete list of accepted values see this paste. Default is N (never).

False

 

Success 200

The response will be a JSON string containing the URL and UID of the newly created paste.

HTTP/1.1 200 OK         
{
    "code": "OK",
    "result": "The paste has been successfully modified."
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "uid"     => "ai84kdkd",
              "text"     => "My Text.",
              "language" => "text",
              "theme"    => "pastel-on-dark");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/edit/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

Get a complete Paste

Get a complete paste by UID.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/get/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

uid String

The UID of your paste

True

 

Success 200

It will be a JSON string.

HTTP/1.1 200 OK         
{
    "url": "https://pastebin.dotmaui.com/hexsntl4",
    "expiration": null,
    "date": "2017-11-02T13:24:01.142",
    "author": "DotMaui",
    "exposure": "public",
    "title": "SambucaJS v0.1",
    "text": "Sambuca JavaScript Library v0.1",
    "language": "javascript",
    "UID": "hexsntl4"
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "UID"     => "AQSWDEFR");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/get/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

Delete a Paste

Delete a paste by UID.

POSTGET *
https://api.dotmaui.com/client/1.0/pastebin/del/

Parameters

Field Type Description Required
apikey String

.Maui Api key

True

uid String

The UID of your paste

True

 

Success 200

The response will be a JSON string containing the result of the operation.

HTTP/1.1 200 OK         
{
    "code": "OK",
    "result": "The paste has been successfully deleted."
}
<?php

$data = array("apikey"   => "YOUR_API_KEY", 
              "UID"     => "AQSWDEFR");

$curl = curl_init("https://api.dotmaui.com/client/1.0/pastebin/del/");
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); 

$output = curl_exec($curl);  

curl_close($curl);

echo $output;

* Only for premium users.