{"openapi":"3.1.0","info":{"title":"Deslop Consumer API","version":"1.0.0","description":"Deslop — experts publish their knowledge as queryable AI agent endpoints. Use this API to discover experts, ask their agents questions, subscribe for updates, and request direct contact. No authentication required; identity is supplied per request where needed."},"servers":[{"url":"https://api.deslop.media"}],"paths":{"/api/experts":{"get":{"operationId":"list_experts","summary":"List all published experts","description":"Returns every published expert on Deslop: display_name, username, a thesis preview, position count, and direct feature URL. Use this to discover who's on the platform when the user asks \"who's on Deslop about X?\" or when the conversation starts without a specific expert.","responses":{"200":{"description":"List of published experts.","content":{"application/json":{"schema":{"type":"object","properties":{"experts":{"type":"array","items":{"type":"object","properties":{"display_name":{"type":"string"},"username":{"type":"string"},"thesis":{"type":"string","description":"First 200 chars of the expert's overall thesis."},"position_count":{"type":"integer"},"feature_url":{"type":"string"}}}},"count":{"type":"integer"}}}}}}}}},"/api/experts/{username}":{"get":{"operationId":"get_expert","summary":"Get one expert's feature summary","description":"Returns the given expert's display_name, full thesis, and a list of positions (titles, theses, access tiers, deep-dive counts, and — for public-tier positions — a 500-char content preview). Use this right before calling query_expert so the agent has context on what's available to discuss.","parameters":[{"name":"username","in":"path","required":true,"schema":{"type":"string"},"description":"The expert's URL slug (lowercase, hyphens)."}],"responses":{"200":{"description":"Expert feature summary.","content":{"application/json":{"schema":{"type":"object","properties":{"display_name":{"type":"string"},"username":{"type":"string"},"thesis":{"type":"string"},"feature_url":{"type":"string"},"positions":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"thesis":{"type":"string"},"access_tier":{"type":"string","enum":["public","agent_gated"]},"seo_slug":{"type":"string"},"deep_dive_count":{"type":"integer"},"content_preview":{"type":"string","description":"First 500 chars; present only for public-tier positions."}}}}}}}}},"404":{"description":"No published feature found for this username."}}}},"/api/query":{"post":{"operationId":"query_expert","summary":"Ask an expert's agent a question","description":"Routes the question to the best-match position or deep-dive. Public content serves anyone. Agent-gated content requires LinkedIn-verified identity; unverified callers get `{gated: true, auth_url}` — surface auth_url so the user signs in, then retry. Rate-limited 100/hr/IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expert_username","question"],"properties":{"expert_username":{"type":"string","description":"URL slug of the expert to query."},"question":{"type":"string","description":"The consumer's question for the expert's agent."},"consumer_name":{"type":"string","description":"Consumer's full name. Required to access agent-gated content, subscribe, or submit a contact request."},"consumer_email":{"type":"string","description":"Consumer's email. Required to access agent-gated content, subscribe, or submit a contact request."},"consumer_title":{"type":"string","description":"Consumer's job title."},"consumer_company":{"type":"string","description":"Consumer's company or organization."},"consumer_reason":{"type":"string","description":"Why the consumer is querying — helps the expert triage. Optional."}}}}}},"responses":{"200":{"description":"Agent response.","content":{"application/json":{"schema":{"type":"object","properties":{"expert":{"type":"string"},"question":{"type":"string"},"answer":{"type":"string","description":"The agent's response in markdown."},"access_tier":{"type":"string","enum":["public","agent_gated"]},"source_position":{"type":"string","description":"Title of the position the agent matched against."},"feature_url":{"type":"string"},"identity_required":{"type":"boolean","description":"True when the best match is gated AND identity wasn't supplied — collect identity_fields and re-call."},"identity_fields":{"type":"array","items":{"type":"string"},"description":"Field names the consumer must supply (present only when identity_required is true)."},"connect_url":{"type":"string","description":"Fallback URL consumers can open to supply identity via the website."}}}}}},"400":{"description":"Missing expert_username or question, or expert has no published feature."}}}},"/api/flags":{"post":{"operationId":"flag_content","summary":"Send feedback on a published page","description":"Report something wrong, something the user disagrees with, something good, or a general comment on a public Issue page. No sign-in needed. Point at a paragraph with `anchor` (a paragraph id from the page's JSON copy) or a verbatim `quote`. Leave personal information out of `note`. REST twin of the MCP tool flag_content. Rate-limited 10/minute and 60/hour per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","kind"],"properties":{"url":{"type":"string","maxLength":2048,"description":"The deslop.media page the feedback is about."},"kind":{"type":"string","enum":["wrong","dislike","praise","comment"],"description":"wrong: something is incorrect; dislike: the user disagrees; praise: something is good; comment: anything else."},"anchor":{"type":"string","maxLength":160,"description":"Paragraph id from the JSON copy, e.g. p-3@1a2b3c4d."},"quote":{"type":"string","maxLength":300,"description":"Verbatim quote of the passage."},"note":{"type":"string","maxLength":1000,"description":"Free-text note. No personal information."},"agent_name":{"type":"string","maxLength":80,"description":"Name of the agent sending the flag."}}}}}},"responses":{"200":{"description":"Flag recorded.","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean"},"flag_id":{"type":"string"},"piece_version":{"type":["integer","null"]},"issue_version":{"type":["integer","null"]}}}}}},"404":{"description":"The URL is not a public page that takes feedback."},"429":{"description":"Rate limit exceeded."}}}},"/api/subscribe":{"post":{"operationId":"subscribe_expert","summary":"Subscribe to an expert's future publishes","description":"Register the consumer for an email when the expert publishes new positions or updates their feature. Requires full identity (name, email, title, company) — this is how the expert knows who's following them. Rate-limited to 20 subscribes/hour per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expert_username","consumer_name","consumer_email","consumer_title","consumer_company"],"properties":{"expert_username":{"type":"string"},"consumer_name":{"type":"string"},"consumer_email":{"type":"string"},"consumer_title":{"type":"string"},"consumer_company":{"type":"string"}}}}}},"responses":{"200":{"description":"Subscription created (or already existed).","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["subscribed","already_subscribed"]},"expert":{"type":"string"},"thesis":{"type":"string","description":"First 300 chars of the expert's thesis."},"positions":{"type":"array","items":{"type":"string"}}}}}}},"400":{"description":"Missing identity fields or unknown expert."}}}},"/api/contact":{"post":{"operationId":"request_contact","summary":"Ask the expert for direct contact","description":"Submit a contact request to the expert. The expert sees the consumer's identity + message + their full query history on this feature, so this is the \"I'd like to talk 1:1\" signal. Rate-limited to 10 requests/hour per IP.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["expert_username","consumer_name","consumer_email"],"properties":{"expert_username":{"type":"string"},"consumer_name":{"type":"string"},"consumer_email":{"type":"string"},"consumer_title":{"type":"string"},"consumer_company":{"type":"string"},"message":{"type":"string","description":"Optional short note to the expert."}}}}}},"responses":{"200":{"description":"Contact request filed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["sent"]},"expert":{"type":"string"}}}}}},"400":{"description":"Missing required fields or unknown expert."}}}}}}