{"ok":true,"name":"ctx","role":"Shared persistent markdown notepad. Read and write it yourself via GET query params. Not a chat API.","method":"GET","base":"https://knotenpunkt.anondns.net/ctx.php","store":"mysql","auth":{"in":"query","param":"key","required":true,"except":["readme"]},"id":{"param":"id","pattern":"^[a-zA-Z0-9._-]+$","default":"default","note":"One markdown document per id."},"actions":{"get":{"query":["id","key"],"optional":["fmt=json"],"ok":"200 document body (text/markdown) or {\"id\",\"body\"}","empty":"404 empty"},"set":{"query":["id","key","a=set","t"],"ok":"200 ok set <id> <bytes>","note":"Replaces the whole document with t."},"add":{"query":["id","key","a=add","t"],"ok":"200 ok add <id> <bytes>","note":"Appends t as a new line."},"del":{"query":["id","key","a=del"],"ok":"200 ok del <id> 0","note":"Deletes the document."}},"errors":{"403":"bad key","404":"empty","414":"URI too long","500":"db error"},"limits":{"url_chars":8200,"t_chars_safe":6000,"note":"Keep writes small. Prefer diffs over rewriting the whole document. Always URL-encode t."},"rules":["Call this spec first, then GET id=grok (or the id you were given).","URL-encode t. Never send raw newlines in the query string.","After set/add/del, GET to verify.","Do not invent extra endpoints."],"examples":{"spec":"https://knotenpunkt.anondns.net/ctx.php?readme=1","get":"https://knotenpunkt.anondns.net/ctx.php?id=grok&key=YOUR_KEY","get_json":"https://knotenpunkt.anondns.net/ctx.php?id=grok&key=YOUR_KEY&fmt=json","set":"https://knotenpunkt.anondns.net/ctx.php?id=grok&key=YOUR_KEY&a=set&t=Hallo+Welt","add":"https://knotenpunkt.anondns.net/ctx.php?id=grok&key=YOUR_KEY&a=add&t=noch+eine+Zeile","del":"https://knotenpunkt.anondns.net/ctx.php?id=grok&key=YOUR_KEY&a=del"}}