API

At the moment we provide a simple HTTP API

Its mainly useful for non-browser such as curl/wget

  • New Paste - Send a POST request to / with the available parameters:
    • paste - the thing you want to paste - REQUIRED
    • ttl - the time in hours the paste will be available for before deletion - defaults to 1 hour
    • lexer - define the lexer to use for the paste - defaults to auto-detection.
    • burn - number of times the paste can be viewed before it is deleted - disabled by default
    • raw - any value except 'true' (default) will return a URL pointing to the non-raw version of the paste
  • Retrieve raw paste - Send a GET request to either /<pasteid>?raw or use the endpoints 'raw' or 'plain' - /raw/<pasteid>
  • Delete a paste - Use the token received when creating the paste
    • Send a DELETE request to /<pasteid> (or the raw/plain equivalent) with the parameter 'token=<yourtoken>' or set the request header 'token: <yourtoken>'
    • Send a GET request to /<pasteid>/<yourtoken> (this will reply with a full html page)

A simple CLI client is available