Log in New API Help About

Using the dpaste.com API with curl

368 bytes of Bash
Created 5 months, 3 weeks ago by dpaste.com
https://dpaste.com/FZNXRMS75
SOFT WRAP RAW TEXT DUPLICATE DIFF
# Note: The curl field spec -F "content=<-" captures stdin to the 'content' field.

# Basic plain-text item creation
curl -s -F "content=<-" https://dpaste.com/api/v2/

# Set syntax to Javascript
curl -s -F "syntax=js" -F "content=<-" https://dpaste.com/api/v2/

# Set expiry (1–365 days)
curl -s -F "expiry_days=10" -F "content=<-" https://dpaste.com/api/v2/