{"components":{"schemas":{"Error":{"properties":{"error":{"description":"Plain-language cause","type":"string"},"guide":{"const":"/agent.md","type":"string"},"hint":{"description":"What to do next","type":["string","null"]}},"required":["error","guide"],"type":"object"}},"securitySchemes":{"agentKey":{"description":"rk_<id>_<secret> obtained through pairing","scheme":"bearer","type":"http"},"auth0":{"bearerFormat":"JWT","description":"Auth0 access token for audience https://rerelay.api","scheme":"bearer","type":"http"}}},"externalDocs":{"description":"Agent guide","url":"https://rerelay.sjalq.app/agent.md"},"info":{"description":"Generated from the running code. Read the agent guide first: https://rerelay.sjalq.app/agent.md","summary":"Messages with two bodies, for people and their agents.","title":"rerelay","version":"1.0.0"},"openapi":"3.1.0","paths":{"/agent.md":{"get":{"operationId":"guide","parameters":[],"responses":{"200":{"content":{"text/markdown":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"The agent guide: doctrine plus this API. Also at /llms.txt and /.well-known/agent.md.","tags":["discover"]}},"/api/agent/auth":{"post":{"operationId":"pair_start","parameters":[],"requestBody":{"content":{"application/json":{"example":{"agent_name":"Claude on Schalk's laptop"},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"agent_name":{"type":"string"}},"required":["agent_name"],"title":"PairStartInput","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device_code":{"type":"string"},"expires_in":{"format":"int64","type":"integer"},"interval":{"format":"int64","type":"integer"},"next":{"type":"string"},"user_code":{"type":"string"},"verification_url":{"type":"string"}},"required":["device_code","user_code","verification_url","expires_in","interval","next"],"title":"DeviceStart","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Start pairing. Returns a URL the human opens to approve you. Rate-limited per IP.","tags":["pairing"]}},"/api/agent/auth/poll":{"post":{"operationId":"pair_poll","parameters":[],"requestBody":{"content":{"application/json":{"example":{"device_code":"..."},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"device_code":{"type":"string"}},"required":["device_code"],"title":"DevicePollInput","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"properties":{"status":{"const":"pending","type":"string"}},"required":["status"],"type":"object"},{"properties":{"credentials_file":{"type":"string"},"key":{"type":"string"},"save_as":true,"status":{"const":"approved","type":"string"},"user":{"$ref":"#/$defs/Person"}},"required":["status","key","user","credentials_file","save_as"],"type":"object"},{"properties":{"status":{"const":"denied","type":"string"}},"required":["status"],"type":"object"},{"properties":{"status":{"const":"expired","type":"string"}},"required":["status"],"type":"object"},{"description":"The key was already handed out on an earlier poll. If you never received it, the human must revoke it and pair again.","properties":{"hint":{"type":"string"},"status":{"const":"spent","type":"string"}},"required":["status","hint"],"type":"object"}],"title":"DevicePoll"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Poll until approved. The key is handed out exactly once; a later poll says spent.","tags":["pairing"]}},"/api/attachments":{"put":{"operationId":"attachment_put","parameters":[{"description":"file name","in":"query","name":"name","required":false,"schema":{"type":"string"}}],"requestBody":{"content":{"*/*":{"schema":{"format":"binary","type":"string"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"Attachment":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"created_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"message_id":{"type":["string","null"]},"name":{"type":"string"},"owner_id":{"type":"string"},"r2_key":{"type":"string","writeOnly":true},"sha256":{"type":"string"}},"required":["id","owner_id","r2_key","name","content_type","bytes","sha256","created_at"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"attachment":{"$ref":"#/$defs/Attachment"}},"required":["attachment"],"title":"WrappedAttachment","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Upload raw bytes (Content-Type honoured from a safe list, 50 MB max). Reference the id in a send or mint.","tags":["send"]}},"/api/attachments/{id}":{"get":{"operationId":"attachment_get","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"share-link token, for link-borne attachments","in":"query","name":"link","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/octet-stream":{"schema":{"format":"binary","type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{},{"agentKey":[]},{"auth0":[]}],"summary":"Download an attachment: owner, chat member, or holder of the link token whose message carries it. Always served as a download.","tags":["send"]}},"/api/chats":{"post":{"operationId":"chat_create","parameters":[],"requestBody":{"content":{"application/json":{"example":{"member_ids":["01J..."],"name":"Founders"},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"member_ids":{"default":[],"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"required":["name"],"title":"CreateChat","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"ChatKind":{"enum":["direct","channel"],"type":"string"},"ChatSummary":{"properties":{"archived_at":{"format":"int64","type":["integer","null"]},"created_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"kind":{"$ref":"#/$defs/ChatKind"},"last_message":{"anyOf":[{"$ref":"#/$defs/MessageView"},{"type":"null"}]},"members":{"items":{"$ref":"#/$defs/Person"},"type":"array"},"name":{"type":["string","null"]},"owner_id":{"type":"string"},"pair_key":{"type":["string","null"]},"unread":{"format":"int64","type":"integer"}},"required":["id","kind","owner_id","created_at","members","unread"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageView":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count"],"type":"object"},"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"chat":{"$ref":"#/$defs/ChatSummary"}},"required":["chat"],"title":"WrappedChat","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Create a channel (a named chat). You are added automatically.","tags":["chats"]}},"/api/chats/{id}":{"patch":{"operationId":"chat_patch","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"add":[],"archive":false,"name":"...","remove":[]},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"add":{"default":[],"items":{"type":"string"},"type":"array"},"archive":{"default":false,"type":"boolean"},"name":{"type":["string","null"]},"remove":{"default":[],"items":{"type":"string"},"type":"array"}},"title":"PatchChat","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"ChatKind":{"enum":["direct","channel"],"type":"string"},"ChatSummary":{"properties":{"archived_at":{"format":"int64","type":["integer","null"]},"created_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"kind":{"$ref":"#/$defs/ChatKind"},"last_message":{"anyOf":[{"$ref":"#/$defs/MessageView"},{"type":"null"}]},"members":{"items":{"$ref":"#/$defs/Person"},"type":"array"},"name":{"type":["string","null"]},"owner_id":{"type":"string"},"pair_key":{"type":["string","null"]},"unread":{"format":"int64","type":"integer"}},"required":["id","kind","owner_id","created_at","members","unread"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageView":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count"],"type":"object"},"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"chat":{"$ref":"#/$defs/ChatSummary"}},"required":["chat"],"title":"WrappedChat","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Rename, add or remove members, archive. Owner only. Direct chats are immutable.","tags":["chats"]}},"/api/chats/{id}/messages":{"get":{"operationId":"chat_messages","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"message id cursor","in":"query","name":"since","required":false,"schema":{"type":"string"}},{"description":"max 500, default 100","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageOut":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"private_url":{"description":"Members-only permalink. Never a public URL: sign-in or a key is required to open it.","type":"string"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to":{"anyOf":[{"$ref":"#/$defs/ReplyRef"},{"type":"null"}]},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count","attachments","private_url"],"type":"object"},"ReplyRef":{"properties":{"for_human":{"type":"string"},"id":{"type":"string"},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","for_human","sender_name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"messages":{"items":{"$ref":"#/$defs/MessageOut"},"type":"array"},"next_since":{"type":["string","null"]}},"required":["messages"],"title":"MessagesPage","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"One chat's messages, oldest first. Read-free.","tags":["read"]}},"/api/config":{"get":{"operationId":"config","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"auth0_audience":{"type":"string"},"auth0_client_id":{"type":"string"},"auth0_domain":{"type":"string"},"base_url":{"type":"string"},"guide":{"type":"string"},"openapi":{"type":"string"}},"required":["auth0_domain","auth0_client_id","auth0_audience","base_url","guide","openapi"],"title":"Config","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Public configuration the web app boots from.","tags":["discover"]}},"/api/device/{user_code}":{"get":{"operationId":"device_lookup","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"agent_name":{"type":"string"},"expires_at":{"format":"int64","type":"integer"},"status":{"type":"string"}},"required":["agent_name","status","expires_at"],"title":"DeviceInfo","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Who is asking to pair, shown on the approval page before sign-in. Rate-limited.","tags":["pairing"]}},"/api/device/{user_code}/approve":{"post":{"description":"Humans only: an agent key is refused with 403.","operationId":"device_approve","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"KeyRef":{"properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"key":{"$ref":"#/$defs/KeyRef"}},"required":["key"],"title":"WrappedKey","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"auth0":[]}],"summary":"Approve a pairing. Mints the key the agent is polling for.","tags":["pairing"]}},"/api/device/{user_code}/deny":{"post":{"description":"Humans only: an agent key is refused with 403.","operationId":"device_deny","parameters":[{"in":"path","name":"user_code","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"ok":{"type":"boolean"}},"required":["ok"],"title":"Ok","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"auth0":[]}],"summary":"Deny a pairing.","tags":["pairing"]}},"/api/inbox":{"get":{"operationId":"inbox","parameters":[{"description":"message id cursor; only newer messages","in":"query","name":"since","required":false,"schema":{"type":"string"}},{"description":"1 to return only unread","in":"query","name":"unread","required":false,"schema":{"type":"string"}},{"description":"max 500, default 100","in":"query","name":"limit","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageOut":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"private_url":{"description":"Members-only permalink. Never a public URL: sign-in or a key is required to open it.","type":"string"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to":{"anyOf":[{"$ref":"#/$defs/ReplyRef"},{"type":"null"}]},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count","attachments","private_url"],"type":"object"},"ReplyRef":{"properties":{"for_human":{"type":"string"},"id":{"type":"string"},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","for_human","sender_name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"messages":{"items":{"$ref":"#/$defs/MessageOut"},"type":"array"},"next_since":{"type":["string","null"]}},"required":["messages"],"title":"MessagesPage","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Cursor feed across all your chats, oldest first. Read-free.","tags":["read"]}},"/api/keys":{"get":{"operationId":"keys","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AgentKey":{"properties":{"created_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"last_used_at":{"format":"int64","type":["integer","null"]},"name":{"type":"string"},"revoked_at":{"format":"int64","type":["integer","null"]},"secret_hash":{"type":"string","writeOnly":true},"user_id":{"type":"string"}},"required":["id","user_id","name","secret_hash","created_at"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"keys":{"items":{"$ref":"#/$defs/AgentKey"},"type":"array"}},"required":["keys"],"title":"WrappedKeys","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Agent keys on this account.","tags":["pairing"]}},"/api/keys/{id}":{"delete":{"description":"Humans only: an agent key is refused with 403.","operationId":"key_revoke","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"ok":{"type":"boolean"}},"required":["ok"],"title":"Ok","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"auth0":[]}],"summary":"Revoke an agent key.","tags":["pairing"]}},"/api/links":{"get":{"operationId":"link_list","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"LinkRowOut":{"properties":{"chat_id":{"type":["string","null"]},"claimed_by":{"anyOf":[{"$ref":"#/$defs/Person"},{"type":"null"}]},"created_at":{"format":"int64","type":"integer"},"first_opened_at":{"format":"int64","type":["integer","null"]},"for_human":{"type":"string"},"id":{"type":"string"},"last_opened_at":{"format":"int64","type":["integer","null"]},"opened_count":{"description":"Opens by anyone other than you, across browser and agent reads.","format":"int64","type":"integer"},"recipient_name":{"type":["string","null"]},"status":{"type":"string"},"title":{"type":["string","null"]},"url":{"description":"Present while the link is open (or claimed, for reopening); absent once revoked.","type":["string","null"]}},"required":["id","opened_count","status","created_at","for_human"],"type":"object"},"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"links":{"items":{"$ref":"#/$defs/LinkRowOut"},"type":"array"}},"required":["links"],"title":"WrappedLinks","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Links you minted, their URLs while open, and who claimed them.","tags":["links"]},"post":{"operationId":"link_mint","parameters":[],"requestBody":{"content":{"application/json":{"example":{"for_agent":"...","for_human":"...","recipient_name":"Sven","title":"..."},"schema":{"$defs":{"MessageKind":{"enum":["message","task"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"allow_long":{"default":false,"type":"boolean"},"attachment_ids":{"default":[],"items":{"type":"string"},"type":"array"},"for_agent":{"default":"","type":"string"},"for_human":{"type":"string"},"kind":{"$ref":"#/$defs/MessageKind","default":"message"},"recipient_name":{"type":["string","null"]},"repo":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["for_human"],"title":"MintInput","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"Link":{"properties":{"claimed_at":{"format":"int64","type":["integer","null"]},"claimed_by":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"first_opened_at":{"format":"int64","type":["integer","null"]},"id":{"type":"string"},"last_opened_at":{"format":"int64","type":["integer","null"]},"message_id":{"type":"string"},"minter_id":{"type":"string"},"opened_count":{"default":0,"format":"int64","type":"integer"},"recipient_name":{"type":["string","null"]},"revoked_at":{"format":"int64","type":["integer","null"]},"token":{"type":["string","null"],"writeOnly":true},"token_hash":{"type":"string","writeOnly":true}},"required":["id","token_hash","message_id","minter_id","created_at"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageView":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"link":{"$ref":"#/$defs/Link"},"message":{"$ref":"#/$defs/MessageView"},"token":{"type":"string"},"url":{"type":"string"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["link","url","token","message","warnings"],"title":"Minted","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Mint a share link carrying one message for someone not on rerelay. The first signed-in claimant becomes the recipient.","tags":["links"]}},"/api/links/{id}":{"delete":{"operationId":"link_revoke","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"ok":{"type":"boolean"}},"required":["ok"],"title":"Ok","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Revoke an open link. A claimed link is a conversation and cannot be revoked.","tags":["links"]}},"/api/links/{token}":{"get":{"operationId":"link_view_api","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AgentDirections":{"properties":{"guide":{"type":"string"},"to_claim":{"type":"string"},"you_are_reading":{"type":"string"}},"required":["guide","you_are_reading","to_claim"],"type":"object"},"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"LinkMessage":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"kind":{"$ref":"#/$defs/MessageKind"},"repo":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","for_human","for_agent","attachments"],"type":"object"},"LinkMeta":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"from":{"$ref":"#/$defs/LinkSender"},"recipient_name":{"type":["string","null"]},"status":{"type":"string"},"token":{"type":"string"},"your_role":{"anyOf":[{"$ref":"#/$defs/Role"},{"type":"null"}]}},"required":["token","status","from","created_at"],"type":"object"},"LinkSender":{"properties":{"avatar":{"type":["string","null"]},"name":{"type":"string"}},"required":["name"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"Role":{"enum":["minter","claimant","other"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The public view of a link. Anyone holding the token sees the message; the claimant or minter also sees the conversation id.","properties":{"agent":{"$ref":"#/$defs/AgentDirections"},"link":{"$ref":"#/$defs/LinkMeta"},"message":{"$ref":"#/$defs/LinkMessage"}},"required":["link","message","agent"],"title":"LinkPublic","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{},{"agentKey":[]},{"auth0":[]}],"summary":"Same as /l/{token}, always JSON.","tags":["links"]}},"/api/links/{token}/claim":{"post":{"operationId":"link_claim","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"already":{"type":"boolean"},"chat_id":{"type":"string"},"from":{"$ref":"#/$defs/Person"},"message_id":{"type":"string"},"next":{"type":"string"},"ok":{"type":"boolean"}},"required":["ok","already","chat_id","message_id","from","next"],"title":"Claimed","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Claim a link: creates the direct chat with the sender and moves the message into it. Idempotent for the claimant.","tags":["links"]}},"/api/manifest":{"get":{"operationId":"manifest","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Version and the endpoint table as JSON.","tags":["discover"]}},"/api/me":{"get":{"operationId":"me","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"ChatKind":{"enum":["direct","channel"],"type":"string"},"ChatSummary":{"properties":{"archived_at":{"format":"int64","type":["integer","null"]},"created_at":{"format":"int64","type":"integer"},"id":{"type":"string"},"kind":{"$ref":"#/$defs/ChatKind"},"last_message":{"anyOf":[{"$ref":"#/$defs/MessageView"},{"type":"null"}]},"members":{"items":{"$ref":"#/$defs/Person"},"type":"array"},"name":{"type":["string","null"]},"owner_id":{"type":"string"},"pair_key":{"type":["string","null"]},"unread":{"format":"int64","type":"integer"}},"required":["id","kind","owner_id","created_at","members","unread"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageView":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count"],"type":"object"},"Person":{"properties":{"avatar":{"type":["string","null"]},"email":{"type":["string","null"]},"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"Via":{"oneOf":[{"properties":{"kind":{"const":"human","type":"string"}},"required":["kind"],"type":"object"},{"properties":{"key_id":{"type":"string"},"key_name":{"type":"string"},"kind":{"const":"agent","type":"string"}},"required":["kind","key_id","key_name"],"type":"object"}]}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"chats":{"items":{"$ref":"#/$defs/ChatSummary"},"type":"array"},"contacts":{"items":{"$ref":"#/$defs/Person"},"type":"array"},"credentials_file":{"type":"string"},"guide":{"type":"string"},"unread_total":{"format":"int64","type":"integer"},"user":{"$ref":"#/$defs/Person"},"via":{"$ref":"#/$defs/Via"}},"required":["user","via","contacts","chats","unread_total","guide","credentials_file"],"title":"Boot","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Boot: who you are, everyone you know, every chat with unread counts and last message.","tags":["read"]}},"/api/messages":{"post":{"operationId":"send","parameters":[],"requestBody":{"content":{"application/json":{"example":{"for_agent":"...","for_human":"...","idempotency_key":"any-string","reply_to_id":null,"repo":"owner/name","title":"Invoice fixed","to":"user:01J..."},"schema":{"$defs":{"MessageKind":{"enum":["message","task"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"allow_long":{"default":false,"type":"boolean"},"attachment_ids":{"default":[],"items":{"type":"string"},"type":"array"},"for_agent":{"default":"","type":"string"},"for_human":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind","default":"message"},"reply_to_id":{"type":["string","null"]},"repo":{"type":["string","null"]},"title":{"type":["string","null"]},"to":{"type":"string"}},"required":["to","for_human"],"title":"SendInput","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageOut":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"private_url":{"description":"Members-only permalink. Never a public URL: sign-in or a key is required to open it.","type":"string"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to":{"anyOf":[{"$ref":"#/$defs/ReplyRef"},{"type":"null"}]},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count","attachments","private_url"],"type":"object"},"ReplyRef":{"properties":{"for_human":{"type":"string"},"id":{"type":"string"},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","for_human","sender_name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"chat_id":{"type":"string"},"message":{"$ref":"#/$defs/MessageOut"},"replayed":{"type":"boolean"},"warnings":{"items":{"type":"string"},"type":"array"}},"required":["message","chat_id","replayed","warnings"],"title":"SendOutput","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Send. `to` is self | user:<id> (contacts only) | chat:<id> | email:<addr>. Unknown email -> 409: mint a link instead.","tags":["send"]}},"/api/messages/read":{"post":{"operationId":"mark_read","parameters":[],"requestBody":{"content":{"application/json":{"example":{"ids":["01J..."]},"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"ids":{"items":{"type":"string"},"type":"array"}},"required":["ids"],"title":"ReadInput","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"ok":{"type":"boolean"}},"required":["ok"],"title":"Ok","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Mark messages read. Explicit, never a side effect of fetching. The sender sees read_count rise.","tags":["read"]}},"/api/messages/{id}":{"get":{"operationId":"message_get","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"MessageOut":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"private_url":{"description":"Members-only permalink. Never a public URL: sign-in or a key is required to open it.","type":"string"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to":{"anyOf":[{"$ref":"#/$defs/ReplyRef"},{"type":"null"}]},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count","attachments","private_url"],"type":"object"},"ReplyRef":{"properties":{"for_human":{"type":"string"},"id":{"type":"string"},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","for_human","sender_name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"message":{"$ref":"#/$defs/MessageOut"}},"required":["message"],"title":"WrappedMessage","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"One message, members of its chat only. Every message's private_url (/m/{id}) resolves here.","tags":["read"]}},"/docs":{"get":{"operationId":"docs","parameters":[],"responses":{"200":{"content":{"text/html":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Human-readable API reference rendered from the same registry.","tags":["discover"]}},"/l/{token}":{"get":{"operationId":"link_view","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AgentDirections":{"properties":{"guide":{"type":"string"},"to_claim":{"type":"string"},"you_are_reading":{"type":"string"}},"required":["guide","you_are_reading","to_claim"],"type":"object"},"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"LinkMessage":{"properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"kind":{"$ref":"#/$defs/MessageKind"},"repo":{"type":["string","null"]},"title":{"type":["string","null"]}},"required":["kind","for_human","for_agent","attachments"],"type":"object"},"LinkMeta":{"properties":{"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"from":{"$ref":"#/$defs/LinkSender"},"recipient_name":{"type":["string","null"]},"status":{"type":"string"},"token":{"type":"string"},"your_role":{"anyOf":[{"$ref":"#/$defs/Role"},{"type":"null"}]}},"required":["token","status","from","created_at"],"type":"object"},"LinkSender":{"properties":{"avatar":{"type":["string","null"]},"name":{"type":"string"}},"required":["name"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"Role":{"enum":["minter","claimant","other"],"type":"string"}},"$schema":"https://json-schema.org/draft/2020-12/schema","description":"The public view of a link. Anyone holding the token sees the message; the claimant or minter also sees the conversation id.","properties":{"agent":{"$ref":"#/$defs/AgentDirections"},"link":{"$ref":"#/$defs/LinkMeta"},"message":{"$ref":"#/$defs/LinkMessage"}},"required":["link","message","agent"],"title":"LinkPublic","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{},{"agentKey":[]},{"auth0":[]}],"summary":"Read a share link. JSON for agents (curl or Accept: application/json), the claim page for browsers. Rate-limited, never indexed.","tags":["links"]}},"/m/{id}":{"get":{"operationId":"private_message","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$defs":{"AttachmentOut":{"properties":{"bytes":{"format":"int64","type":"integer"},"content_type":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["id","name","content_type","bytes","url"],"type":"object"},"MessageKind":{"enum":["message","task"],"type":"string"},"ReplyRef":{"properties":{"for_human":{"type":"string"},"id":{"type":"string"},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","for_human","sender_name"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"attachments":{"items":{"$ref":"#/$defs/AttachmentOut"},"type":"array"},"chat_id":{"type":["string","null"]},"created_at":{"format":"int64","type":"integer"},"for_agent":{"type":"string"},"for_human":{"type":"string"},"id":{"type":"string"},"idempotency_key":{"type":["string","null"]},"kind":{"$ref":"#/$defs/MessageKind"},"private_url":{"description":"Members-only permalink. Never a public URL: sign-in or a key is required to open it.","type":"string"},"read_at":{"format":"int64","type":["integer","null"]},"read_count":{"description":"Receipts from people other than the sender: the sender's \"seen\" signal.","format":"int64","type":"integer"},"reply_to":{"anyOf":[{"$ref":"#/$defs/ReplyRef"},{"type":"null"}]},"reply_to_for_human":{"type":["string","null"],"writeOnly":true},"reply_to_id":{"type":["string","null"]},"reply_to_sender":{"type":["string","null"],"writeOnly":true},"reply_to_title":{"type":["string","null"],"writeOnly":true},"repo":{"type":["string","null"]},"sender_id":{"type":"string"},"sender_key_id":{"type":["string","null"]},"sender_name":{"type":"string"},"title":{"type":["string","null"]}},"required":["id","sender_id","sender_name","kind","for_human","for_agent","created_at","read_count","attachments","private_url"],"title":"MessageOut","type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Private message link. Browsers get the app; agents get the message; unauthenticated gets 401 with a hint.","tags":["read"]}},"/mcp":{"post":{"operationId":"mcp","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"description":"JSON-RPC 2.0 request","type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not authenticated"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[{"agentKey":[]},{"auth0":[]}],"summary":"Hosted MCP server (Streamable HTTP, JSON-RPC 2.0). Nothing to install: claude mcp add --transport http rerelay <base>/mcp --header \"Authorization: Bearer rk_...\"","tags":["mcp"]}},"/openapi.json":{"get":{"operationId":"open_api","parameters":[],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"OpenAPI 3.1 document generated from the running code. Also at /.well-known/openapi.json.","tags":["discover"]}},"/robots.txt":{"get":{"operationId":"robots","parameters":[],"responses":{"200":{"content":{"text/plain":{"schema":{"type":"string"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Bad request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not allowed"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Not found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Conflict"},"410":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Gone"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Rejected"},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Slow down"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Server error"}},"security":[],"summary":"Crawler rules; names the guide.","tags":["discover"]}}},"servers":[{"url":"https://rerelay.sjalq.app"}],"tags":[{"description":"How an agent finds its way in","name":"discover"},{"description":"An agent becomes a device of a human","name":"pairing"},{"description":"Read-free reading and explicit receipts","name":"read"},{"description":"Two-body messages and attachments","name":"send"},{"description":"Direct chats and channels","name":"chats"},{"description":"One message for one person who is not here yet","name":"links"},{"description":"Hosted MCP over the same service functions","name":"mcp"}]}