# FoxPaste

A pastebin at https://paste.orangefox.tech. Every paste has a canonical URL of https://paste.orangefox.tech/{id}.

## Read

Raw text:  https://paste.orangefox.tech/{id}/raw   (also https://paste.orangefox.tech/{id}.txt)
JSON:      https://paste.orangefox.tech/api/{id}

The canonical URL also content-negotiates on Accept:
  Accept: text/plain        -> the raw body
  Accept: application/json  -> the JSON object
  Accept: text/html or */*  -> the web app, which embeds the content in a <pre>

Raw responses are text/plain; charset=utf-8 with Access-Control-Allow-Origin: *.
JSON includes: id, url, rawUrl, content, language, lineCount, byteSize,
createdAt, updatedAt, isOwner.

IDs are case-sensitive and may contain '-' and '_'. Pastes created before
2026-07 may have an ID that starts or ends with those characters.

## Write

  curl -sS --data-binary @file.txt \
       -H 'Content-Type: text/plain' -H 'Accept: text/plain' \
       https://paste.orangefox.tech/api

Prints the URL of the new paste. No prior authentication is needed; the response
sets a cookie that identifies you as the owner, which is what later permits
PUT https://paste.orangefox.tech/api/{id} to edit it. Discard the cookie and the paste becomes
permanently read-only.

JSON form: POST {"content": "...", "language": "rust"} to https://paste.orangefox.tech/api.
Language is optional and detected from the content when omitted.
Maximum paste size is 1 MB.

## Spec

OpenAPI: https://paste.orangefox.tech/api/openapi.json
Docs:    https://paste.orangefox.tech/docs
