API reference
Use the API to create, read, update, and delete snippets. For a machine-readable description, use the OpenAPI document.
Create a snippet
Send JSON to POST /snippets. Save edit_token from the response. You need it to update or delete the snippet.
Every write request must include an Origin header. Use the public URL's origin, without its path.
curl -X POST https://snippets.ix0.io/snippets \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Origin: https://snippets.ix0.io" \
-d '{"title":"Notes","language":"text","content":"Text to share"}'Request fields
contentis required.titledefaults toUntitled snippet.languagedefaults totext.tags,description,custom_url,password,expiration, andburn_after_readingare optional.contentcan contain up to 1048576 bytes. Tags use lowercase letters, numbers, and hyphens.
Read and manage a snippet
GET /s/{id}returns JSON when you sendAccept: application/json.GET /raw/{id}returns the plain text content.PUT /snippets/{id}andDELETE /snippets/{id}requireOriginandX-Edit-Tokenheaders.