We allow anyone to create tools and applications with our developers API. To create a new pastebin submit your
POST request to the following URL:
You can test this API url here:
http://pastebin.com/api_form.php.
On Success
A valid new pastebin.com URL will be returned.
Error Codes
ERROR: Invalid POST request, or "input_text" value empty. - If 'paste_code' was left empty, or no POST was used.
ERROR: Invalid file format. - If 'paste_format' was not a valid input.
Required Parameters:
paste_code
(string)
- this is simply the text that you paste on pastebin.
Optional Parameters:
paste_name
(string)
- for adding a title or name to your paste.
paste_email
(string)
- for sending confirmation email with paste link.
paste_subdomain
(string)
- for using a certain subdomain.
paste_private
(integer: 0 or 1)
- for making it public (0) or private (1).
paste_expire_date
(string: N, 10M, 1H, 1D, 1M)
- for adding expiration date. N = Never, 10M = 10 Minutes, 1H = 1 Hour, 1D = 1 Day, 1M = 1 Month.
paste_format
(string)
- for adding syntax highlighting. These are possible:
abap = ABAP
actionscript = ActionScript
actionscript3 = ActionScript 3
ada = Ada
apache = Apache Log
applescript = AppleScript
apt_sources = APT Sources
asm = ASM (NASM)
asp = ASP
autoit = AutoIt
avisynth = Avisynth
bash = Bash
basic4gl = Basic4GL
bibtex = BibTeX
blitzbasic = Blitz Basic
bnf = BNF
boo = BOO
bf = BrainFuck
c = C
c_mac = C for Macs
cill = C Intermediate Language
csharp = C#
cpp = C++
caddcl = CAD DCL
cadlisp = CAD Lisp
cfdg = CFDG
klonec = Clone C
klonecpp = Clone C++
cmake = CMake
cobol = COBOL
cfm = ColdFusion
css = CSS
d = D
dcs = DCS
delphi = Delphi
dff = Diff
div = DIV
dos = DOS
dot = DOT
eiffel = Eiffel
email = Email
erlang = Erlang
fo = FO Language
fortran = Fortran
freebasic = FreeBasic
gml = Game Maker
genero = Genero
gettext = GetText
groovy = Groovy
haskell = Haskell
hq9plus = HQ9 Plus
html4strict = HTML
idl = IDL
ini = INI file
inno = Inno Script
intercal = INTERCAL
io = IO
java = Java
java5 = Java 5
javascript = JavaScript
kixtart = KiXtart
latex = Latex
lsl2 = Linden Scripting
lisp = Lisp
locobasic = Loco Basic
lolcode = LOL Code
lotusformulas = Lotus Formulas
lotusscript = Lotus Script
lscript = LScript
lua = Lua
m68k = M68000 Assembler
make = Make
matlab = MatLab
matlab = MatLab
mirc = mIRC
modula3 = Modula 3
mpasm = MPASM
mxml = MXML
mysql = MySQL
text = None
nsis = NullSoft Installer
oberon2 = Oberon 2
objc = Objective C
ocaml-brief = OCalm Brief
ocaml = OCaml
glsl = OpenGL Shading
oobas = Openoffice BASIC
oracle11 = Oracle 11
oracle8 = Oracle 8
pascal = Pascal
pawn = PAWN
per = Per
perl = Perl
php = PHP
php-brief = PHP Brief
pic16 = Pic 16
pixelbender = Pixel Bender
plsql = PL/SQL
povray = POV-Ray
powershell = Power Shell
progress = Progress
prolog = Prolog
properties = Properties
providex = ProvideX
python = Python
qbasic = QBasic
rails = Rails
rebol = REBOL
reg = REG
robots = Robots
ruby = Ruby
gnuplot = Ruby Gnuplot
sas = SAS
scala = Scala
scheme = Scheme
scilab = Scilab
sdlbasic = SdlBasic
smalltalk = Smalltalk
smarty = Smarty
sql = SQL
tsql = T-SQL
tcl = TCL
tcl = TCL
teraterm = Tera Term
thinbasic = thinBasic
typoscript = TypoScript
unreal = unrealScript
vbnet = VB.NET
verilog = VeriLog
vhdl = VHDL
vim = VIM
visualprolog = Visual Pro Log
vb = VisualBasic
visualfoxpro = VisualFoxPro
whitespace = WhiteSpace
whois = WHOIS
winbatch = Win Batch
xml = XML
xorg_conf = Xorg Config
xpp = XPP
z80 = Z80 Assembler