NoPaste.me

Secure and Anonymous

Login

  • Only for Administration!

API - Documentation


Methods

Adds a paste. Destination of your request must be:
http://nopaste.me/api
via
POST

At the moment the limitation is a maximum of 50 added pastes per 1 Hour(s)

  • Name
  • Required
  • Maximum length
  • Type
  • Default
  • Options
  • name
  • not required
  • 255
  • string
  • none
  • none
Paste name
  • author
  • not required
  • 255
  • string
  • none
  • none
Author of paste
  • code
  • required
  • 512000
  • string
  • none
  • none
Code of paste. Important: The Code must be urlencoded (use new lines with %0A) and uft8 encoded
  • language
  • not required
  • 255
  • string
  • plain-text
  • none
Language of the paste
  • format
  • not required
  • 255
  • string
  • json
  • xml, json, plain
The result (return) format
  • private
  • not required
  • none
  • int
  • none
  • 1, 0
Privacy setting
Verification code

Use the lowercase language names for the request.
  • ActionScript
    actionscript
  • Apache
    apache
  • ASM
    asm
  • Bash
    bash
  • C#
    c-sharp
  • C++
    cpp
  • Clojure
    clojure
  • CSS
    css
  • D
    d
  • Diff
    diff
  • Erlang
    erlang
  • Fortran
    fortran
  • Go
    go
  • Haskell
    haskell
  • HTML
    html
  • INI
    ini
  • Io
    io
  • Java
    java
  • Javascript
    javascript
  • Lisp
    lisp
  • Literate-Haskell
    literate-haskell
  • Log
    log
  • Lua
    lua
  • Makefile
    makefile
  • Nu
    nu
  • Objective-C
    objective-c
  • Pascal
    pascal
  • Pascal / Delphi
    pascal-delphi
  • Perl
    perl
  • PHP
    php
  • Plain-Text
    plain-text
  • Python
    python
  • Ruby
    ruby
  • Ruby-on-Rails
    ruby-on-rails
  • Scala
    scala
  • Scheme
    scheme
  • Smarty
    smarty
  • SQL
    sql
  • TeX
    tex
  • VB.net
    vb-net
  • XML
    xml
  • YAML
    yaml

When the paste was added this values will be returned if the request was Success
  • Name
  • Type
  • boolean
  • boolean
Containing the truth value (in this case true)
  • language
  • string
Containing the given language
  • name
  • string
Containing the given paste name
  • private
  • int
Containing the given value for private
  • author
  • string
Containing the given author name
  • url
  • string
Containing the url where the paste was pasted
After the request was Failure it will return this values
  • Name
  • Type
  • boolean
  • boolean
Containing the truth value (in this case false)
  • error
  • string
Containing the error message
This is a small curl POST request in PHP example for creating a
private
paste with the name
My first Test Paste!
$parameter = array(
	// required settings
	'method'	=> 'paste', 				// method
	'code'	  => urlencode(utf8_encode('Hey there')), 	// encoded code & encoded with utf-8
	'apiKey'	=> 'YOURAPIKEY', 			// your api key
	
	// additional settings
	'private'	=> 1, 						// is private
	'name'	   => 'My first Test Paste!' 	// name of the paste
);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://nopaste.me/api");
curl_setopt($ch, CURLOPT_POST, count($parameter)); 	// howmany parameter to post
curl_setopt($ch, CURLOPT_POSTFIELDS, $parameter); 	// post!
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);		// we want to see what happend
$result = curl_exec($ch); 							// get the result
curl_close($ch); 									// close curl
print $result; 										// give us the result