API
POST
to: https://amnesia.io/api
with Content-Type: application/json
:
{
"content": "your_snippet_body",
"ttl": 300,
"extension": "js"
}
content
- The body of the snippet contentttl
- Specified in seconds as an Integer -0
sets NO TTL.extension
- The file extension (rb, js, erl - no ‘.’ included)
Response will be:
{
"url": "https://amnesia.io/[id]",
"ttl": 300
}
url
- Full URL of snippetttl
- Reflected TTL - same as the one you sent
POST
to https://amnesia.io
with a content type of multipart/form-data
with a header of x-ttl
:
curl -F "file=@mix.exs" -H "x-ttl: 300" http://amnesia.io
x-ttl
- Optionally set TTL, default is current 1 week - 604,800 seconds