load->view("defaults/header");?>

API

Create pastes from the commandline

API URL

Get paste

Get random paste

Get recent pastes

Get trending pastes

List available languages

Create a paste

POST parameters

text=[your paste text]

The paste content. Required.

title=[title]

Title for the paste.

name=[name]

The author's name.

private=1

Make paste private.

lang=[language]

Use alternative syntax highlighting.
Possible values:

expire=[minutes]

Set paste expiration.

reply=[pasteid]

Reply to existing paste.

Return values

On success, the API returns the paste URL:
On error, the API returns the error message: Error: Missing paste text

Examples

Create paste

curl -d text='this is my text'

Create a paste with the text 'this is my text'.

Create paste from a file

curl -d private=1 -d name=Herbert --data-urlencode text@/etc/passwd

Create a private paste with the author 'Herbert' and the contents of '/etc/passwd'.

Create paste from a php file

curl -d lang=php --data-urlencode text@main.php

Create a paste with PHP syntax highlighting.

Create paste via a pipe

echo foo | curl --data-urlencode text@-

Create a paste based on standard output of a command.

Get paste ;-)

curl

Display paste.

load->view("defaults/footer");?>