{"name":"The Golden Jingle Post","version":1,"language":"en","authentication":"No key, cookies or JavaScript are required. A recipient URL may be opened by anyone who has it.","discovery":"Given /p/{id}, take its final path segment and GET /api/parcels/{id}. Its links are paths relative to this origin. This returns a sealed envelope even after previous openings. To accept the gift, choose one of the two opening methods below. A reader with GET alone can use recipient.read.","sender":{"method":"POST","path":"/api/parcels","contentType":"application/json","body":{"motif":"One of the motif IDs below.","from":"Optional plain-text sender line, up to 60 Unicode grapheme clusters. Surrounding whitespace is trimmed. Leave blank or omit to send anonymously. Control characters are rejected."},"motifs":["tree","heart","snow","bell","fox","saturn","disco","fire"],"response":"201 sealed envelope. Share its url with the recipient.","optionalHeaders":{"Idempotency-Key":"A random UUIDv4 for this draft. Its first eight hexadecimal digits give the unsigned 32-bit preview seed. Retry the same motif and trimmed sender line with this key to retrieve the same sealed envelope (200). A different selection returns 409. Omit the key to send a new parcel on every request."}},"recipient":{"inspect":{"method":"GET","path":"/api/parcels/{id}","response":"200 sealed envelope with links, or 404."},"unwrap":{"method":"POST","path":"/api/parcels/{id}/open","body":"empty","response":"200 performance receipt. Repeating the request returns the same receipt and leaves the envelope sealed for other readers."},"read":{"method":"GET","path":"/api/parcels/{id}/read?intent=unwrap","instructions":"When you choose to unwrap, replace {id} with the parcel ID and request this exact path and query. Keep this address out of previews. HEAD requests and requests marked as prefetch or prerender do not return a receipt. Anyone who sends the affirmative GET can read the contents.","response":"200, the same receipt as POST. This read leaves the stored parcel untouched. Read giftCard directly in a text-only client."}},"receipt":{"giftCard":"A plain-English gift card describing the motif, its movement and the jingle. Read it directly and display the accompanying Unicode dot art from terminalPlate.text.","from":"Optional, self-reported sender line. It appears only on an opened receipt when the sender supplied it.","motif":"Motif ID.","seed":"Seed for the original particle arrangement.","palette":"Named colors in hexadecimal sRGB.","motion":"Choreography for the motif.","terminalPlate":"A 36-column by 14-line Unicode dot art engraving generated from the seeded particles. Display terminalPlate.text in a monospaced font.","score":"The jingle, with tempo, note timing and synthesis data. Each event includes its MIDI pitch and scientific pitch name in note (C4 = MIDI 60, sharps use #). releaseTailSeconds is the final hold at floorGain after decay. The browser uses this same score."},"example":["curl -s -X POST -H 'Content-Type: application/json' -d '{\"motif\":\"fox\"}' \"$ORIGIN/api/parcels\"","curl -s \"$ORIGIN/api/parcels/$ID\"","curl -s -X POST \"$ORIGIN/api/parcels/$ID/open\""]}