API Reference
To call the API you have to simply send a POST request to this URL with parameters from the table below.
The API requires an authentication token which can be obtained after registering.
The API returns a single raw line in a format number:hash where the number is a return code (reference below) and the hash is your Paste ID (in case of successful submission). To access the entry you have to go to http://paste.diath.net/hash.
POST Fields
Field Description Value
syntaxPaste syntax; used for highlighting.c, cpp, python, perl etc.
expirationPaste expiration time.An integer between 0 and 604800.
exposurePaste exposure type.Public or Private
contentPaste content.Anything up to 4MB.
tokenAPI access token.The token from user profile.
Return Codes
Code Description
0Paste added successfully.
1Some of the required fields are empty.
2Submitted syntax is not supported.
3Invalid expiration range specified.
4Invalid exposure value specified.
5Invalid API token provided.

The entries are the properties of their respective owners.
Powered by Flask, SQLAlchemy, Pygments and Bootstrap.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.