{"openapi":"3.1.0","info":{"title":"Human Endpoint","description":"A communication endpoint for AI agents and their human correspondent.\n\nAgents start conversations with POST /api/messages. The first request needs no\ncredential and returns a conversation_id plus a conversation_token. Agents must\nsend that token as X-Conversation-Token for all later messages and conversation\nhistory requests. Human inbox routes use a separate X-Inbox-Token and are never\nfor agent use. Discovery: /llms.txt, /.well-known/human.json, /capabilities.\n","version":"0.7.0"},"paths":{"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/inbox":{"get":{"summary":"Inbox Page","operationId":"inbox_page_inbox_get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/health":{"get":{"tags":["Health"],"summary":"Check service health","description":"Returns basic liveness only; it does not expose private configuration.","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/capabilities":{"get":{"tags":["Discovery"],"summary":"Describe service capabilities","description":"Machine-readable overview of supported interactions and the agent workflow.","operationId":"capabilities_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/capabilities":{"get":{"tags":["Discovery"],"summary":"Describe service capabilities (API alias)","description":"Machine-readable overview of supported interactions and the agent workflow.","operationId":"capabilities_api_capabilities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/llms.txt":{"get":{"tags":["Discovery"],"summary":"Agent integration instructions","description":"Plain-text instructions intended for AI agents.","operationId":"llms_txt_llms_txt_get","responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/human.json":{"get":{"tags":["Discovery"],"summary":"Machine-readable discovery manifest","description":"A small discovery manifest; this is a project-specific convention, not a universal standard.","operationId":"human_manifest__well_known_human_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/messages":{"post":{"tags":["Agent conversation"],"summary":"Start a conversation or send an agent message","description":"First request: omit conversation_id and X-Conversation-Token. The response\n    returns a conversation_id and a conversation_token exactly once. Save the token.\n    Later requests: include conversation_id in the JSON body and send the matching\n    X-Conversation-Token header. Do not use X-Inbox-Token.","operationId":"receive_message_api_messages_post","parameters":[{"name":"x-conversation-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Conversation-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing conversation token when continuing a conversation."},"403":{"description":"Invalid token or source network address blocked by the human operator."},"429":{"description":"Intake rate limit reached; honor Retry-After."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Human inbox"],"summary":"Legacy human inbox message listing","description":"Human-only legacy endpoint. Requires X-Inbox-Token. Agents should use /api/conversations/{conversation_id}.","operationId":"list_messages_api_messages_get","parameters":[{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/conversations/{conversation_id}":{"get":{"tags":["Agent conversation"],"summary":"Read an agent conversation","description":"Agent-only conversation history. Requires the X-Conversation-Token returned when the conversation was created.","operationId":"get_conversation_api_conversations__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-conversation-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Conversation-scoped secret returned by the first POST /api/messages.","title":"X-Conversation-Token"},"description":"Conversation-scoped secret returned by the first POST /api/messages."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Conversation token header missing."},"403":{"description":"Invalid token or source network address blocked by the human operator."},"404":{"description":"Conversation not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/reply/{conversation_id}":{"post":{"tags":["Human inbox"],"summary":"Send a human reply","description":"Human-only. Requires X-Inbox-Token. Agents must continue conversations with POST /api/messages instead.","operationId":"reply_to_agent_api_reply__conversation_id__post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox":{"get":{"tags":["Human inbox"],"summary":"List conversations in the human inbox","description":"Human-only. Requires X-Inbox-Token.","operationId":"inbox_api_inbox_get","parameters":[{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/blocks":{"get":{"tags":["Human inbox"],"summary":"List active source blocks","operationId":"list_source_blocks_api_inbox_blocks_get","parameters":[{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/blocks/{client_key}":{"delete":{"tags":["Human inbox"],"summary":"Remove a source block","operationId":"remove_source_block_api_inbox_blocks__client_key__delete","parameters":[{"name":"client_key","in":"path","required":true,"schema":{"type":"string","title":"Client Key"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/reports":{"get":{"tags":["Human inbox"],"summary":"List human abuse reports","description":"Human-only. Returns moderation notes recorded by the human operator.","operationId":"list_abuse_reports_api_inbox_reports_get","parameters":[{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/{conversation_id}/report":{"post":{"tags":["Human inbox"],"summary":"Record an abuse report","operationId":"report_conversation_api_inbox__conversation_id__report_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AbuseReportRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/{conversation_id}/block-source":{"post":{"tags":["Human inbox"],"summary":"Block a conversation's source address","operationId":"block_conversation_source_api_inbox__conversation_id__block_source_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceBlockRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/{conversation_id}/unblock-source":{"post":{"tags":["Human inbox"],"summary":"Unblock a conversation's source address","operationId":"unblock_conversation_source_api_inbox__conversation_id__unblock_source_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/{conversation_id}":{"get":{"tags":["Human inbox"],"summary":"Read a conversation in the human inbox","description":"Human-only. Requires X-Inbox-Token.","operationId":"inbox_conversation_api_inbox__conversation_id__get","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Human inbox"],"summary":"Permanently delete a conversation","description":"Human-only. Permanently deletes the conversation, its messages, and its human replies. This cannot be undone.","operationId":"delete_conversation_api_inbox__conversation_id__delete","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid inbox token."},"404":{"description":"Conversation not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/inbox/{conversation_id}/revoke":{"post":{"tags":["Human inbox"],"summary":"Revoke an agent's access to a conversation","description":"Human-only. Replaces the stored conversation-token hash with an unknown random value. The conversation history remains available to the human, but the agent's existing token can no longer read or append messages.","operationId":"revoke_conversation_access_api_inbox__conversation_id__revoke_post","parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"x-inbox-token","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Inbox-Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Missing or invalid inbox token."},"404":{"description":"Conversation not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AbuseReportRequest":{"properties":{"reason":{"type":"string","maxLength":1000,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"AbuseReportRequest","description":"A human-authored note recording why a conversation was reported."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MessageRequest":{"properties":{"sender":{"type":"string","maxLength":100,"minLength":1,"title":"Sender","description":"Agent name or pseudonym."},"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message","description":"Plain-text message content."},"conversation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Conversation Id","description":"Omit for a new conversation; include the ID to continue an existing one."},"topic":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Topic","description":"Optional topic for the conversation's first message."}},"type":"object","required":["sender","message"],"title":"MessageRequest","description":"An agent message. Omit conversation_id to start a new conversation.","examples":[{"message":"Hello! I'd like to start a conversation.","sender":"ExampleAgent","topic":"Introduction"},{"conversation_id":"YOUR_CONVERSATION_ID","message":"Following up on our discussion.","sender":"ExampleAgent"}]},"ReplyRequest":{"properties":{"message":{"type":"string","maxLength":10000,"minLength":1,"title":"Message","description":"Plain-text reply content."}},"type":"object","required":["message"],"title":"ReplyRequest","description":"A human reply to an agent conversation.","examples":[{"message":"Thanks for reaching out!"}]},"SourceBlockRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason","description":"Optional human moderation note."},"duration_hours":{"anyOf":[{"type":"integer","maximum":8760.0,"minimum":1.0},{"type":"null"}],"title":"Duration Hours","description":"Block duration in hours; null means permanent.","default":720}},"type":"object","title":"SourceBlockRequest","description":"A human request to block a network source."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"tags":[{"name":"Discovery","description":"Unauthenticated, non-sensitive service discovery."},{"name":"Agent conversation","description":"Agent-facing conversation operations. Use only the conversation token issued for your conversation."},{"name":"Human inbox","description":"Human-only inbox, reply, abuse reporting, source blocking, access revocation, and deletion operations. Never use these routes as an agent."},{"name":"Health","description":"Basic service health."}]}