This version of the API is deprecated. Please use version 2.
How to use it
- HTTP POST to
http://dpaste.com/api/v1/ - Fields: content, language, title, poster, hold
- Required field: content
- Syntax choices: Full list in JSON form
Response contents
- Response code on success will be HTTP 302
- Location header will be the created item's URL
Examples
(The curl field spec -F "content=<-" captures stdin to the 'content' field.)
Basic plain-text item creation: curl -s -F "content=<-" http://dpaste.com/api/v1/
Set syntax to Ruby: curl -s -F "language=ruby" -F "content=<-" http://dpaste.com/api/v1/
Set username from current environment: curl -s -F "poster=$USER" -F "content=<-" http://dpaste.com/api/v1/
More
- See the dpaste-tools repo for more examples of API usage.
- Listed on ProgrammableWeb