REST API Documentation

If you're interested in using an API to automate your paste creations, you can find all of the information you'll need below!

To use our api, you'll need to have an account (sign up here), and an api key (create an api here once you've logged in).

We've allowed for multiple apis with differing privileges, so you're able to pass these keys to trusted partners with peace of mind, they can only complete actions you allow.

Restrictions

We've throttled our api calls to 1000 requests per day. This is liable to change in the future as we look to open up or restrict the api connections based on useage

Endpoints

ENDPOINT PARAMETER

Create Paste

URL/api/v1/create-paste/
MethodPOST
Creates a new paste
Top
api_key
string
required
An api key with the create permission. Create an api key here
title
string
optional
The title of the paste. Maximum 1000
paste_content
string
optional/required if paste_content_markdown and paste_content_code are both empty or omitted
The main content of the paste in html format.
paste_content_markdown
string
optional/required if paste_content and paste_content_code are both empty or omitted
The main content of the paste in markdown format.
paste_content_code
string
optional/required if paste_content and paste_content_markdown are both empty or omitted
The main content of the paste in code format, to be displayed with syntax highlighting where possible.
paste_content_code_language
string
optional
The code type to syntax highlight. Possible options are: XXX | YYY | ZZZ
visibility
string
required
One of: public | private | password (requires password param)
expiry_date_type
string
required
One of: minutes | hours | days | weeks | months
expiry_date
int
required
If expiry_date is
  • minutes - between 1-60 inclusive
  • hours - between 1-24 inclusive
  • days - between 1-7 inclusive
  • weeks - between 1-4 inclusive
  • months - between 1-12 inclusive
custom_url
string
optional
A custom url for the paste. Max 240 characters

Response JSON

Will return json object with success or error param with a message. Also returns the url regardless of whether a custom url has been requested.

Update Paste

URL/api/v1/update-paste/
MethodPOST
Update an existing paste
Top
api_key
string
required
An api key with the update permission. Create an api key here
url
string
required
The url slug of the paste to update for
title
string
optional
The title of the paste. Maximum 1000
paste_content
string
optional/required if paste_content_markdown and paste_content_code are both empty or omitted
The main content of the paste in html format.
paste_content_markdown
string
optional/required if paste_content and paste_content_code are both empty or omitted
The main content of the paste in markdown format.
paste_content_code
string
optional/required if paste_content and paste_content_markdown are both empty or omitted
The main content of the paste in code format, to be displayed with syntax highlighting where possible.
paste_content_code_language
string
optional
The code type to syntax highlight. Possible options are: XXX | YYY | ZZZ
visibility
string
required
One of: public | private | password (requires password param)
expiry_date_type
string
required
One of: minutes | hours | days | weeks | months
expiry_date
int
required
If expiry_date is
  • minutes - between 1-60 inclusive
  • hours - between 1-24 inclusive
  • days - between 1-7 inclusive
  • weeks - between 1-4 inclusive
  • months - between 1-12 inclusive

Response JSON

Will return json object with success or error param with a message.

Update Paste Visibility

URL/api/v1/update-visibility/
MethodPOST
Updates a pastes visibility
Top
api_key
string
required
An api key with the visibility permission. Create an api key here
url
string
required
The url slug of the paste to update visibility for
visibility
string
required
One of: public | private | password
password
string
required when visibility is password
A password that will be required to access the paste content. Make sure you keep this safe!

Response JSON

Will return json object with success or error param with a message.

Delete Paste

URL/api/v1/delete-paste/
MethodPOST
Delete a paste
Top
api_key
string
required
An api key with the delete permission. Create an api key here
url
string
required
The url slug of the paste to delete

Response JSON

Will return json object with success or error param with a message.