{"openapi":"3.1.0","info":{"title":"Dusk State API","version":"1","description":"Operational software and machine-readable intelligence. Versioning and deprecation: https://duskstate.dev/api-policy","contact":{"email":"hello@duskstate.dev"},"termsOfService":"https://duskstate.dev/terms"},"externalDocs":{"description":"Dusk State Docs","url":"https://docs.duskstate.dev"},"servers":[{"url":"https://duskstate.dev"}],"paths":{"/health":{"get":{"summary":"Liveness","responses":{"200":{"description":"OK"}}}},"/api/v1/products":{"get":{"summary":"Published products","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/product-list"}}}}}}},"/api/v1/store/categories":{"get":{"summary":"Store categories with published products","responses":{"200":{"description":"OK"}}}},"/api/v1/waitlist":{"post":{"summary":"Join the waiting list for public registration","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/human-waitlist-entry"}}}},"responses":{"202":{"description":"Received"},"415":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"422":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"429":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"503":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}}}}},"/api/v1/records/{id}":{"get":{"summary":"A public record","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/public-record"}}}},"404":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}}}}},"/api/v1/audit-requests":{"post":{"summary":"Request the Founding Agent-Readiness Audit","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-request"}}}},"responses":{"200":{"description":"Repeated idempotency key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-request-created"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/audit-request-created"}}}},"400":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"415":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"422":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"429":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"503":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}}}}},"/api/v1/agents/waitlist":{"post":{"summary":"Join the agent waiting list","security":[{"agentToken":["waitlist:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent-waitlist-entry"}}}},"responses":{"201":{"description":"Received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent-submission-accepted"}}}},"401":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"403":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"409":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"422":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"429":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}}}}},"/api/v1/agents/survey":{"post":{"summary":"Answer the agent survey","security":[{"agentToken":["survey:write"]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent-survey"}}}},"responses":{"201":{"description":"Received","content":{"application/json":{"schema":{"$ref":"#/components/schemas/agent-submission-accepted"}}}},"401":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"403":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"409":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"422":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}},"429":{"description":"Problem","content":{"application/problem+json":{"schema":{"type":"object"}}}}}}}},"components":{"schemas":{"audit-request":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact_name":{"type":"string","minLength":1,"maxLength":200},"contact_email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"company":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","minLength":1,"maxLength":200},"production_use":{"type":"string","enum":["yes","no","planned"]},"endpoints":{"type":"string","maxLength":4000},"auth_method":{"type":"string","enum":["none","api_key","oauth2","mtls","other","unknown"]},"pricing_visibility":{"type":"string","enum":["public","partial","private","unknown"]},"terms_visibility":{"type":"string","enum":["public","partial","private","unknown"]},"schema_visibility":{"type":"string","enum":["public","partial","private","unknown"]},"recent_incident":{"type":"string","maxLength":4000},"desired_outcome":{"type":"string","minLength":1,"maxLength":4000},"publish_anonymised_finding":{"type":"boolean"},"consent":{"type":"boolean","const":true},"consent_version":{"type":"string","pattern":"^privacy-\\d{4}-\\d{2}-\\d{2}(\\.\\d+)?$"}},"required":["contact_name","contact_email","company","role","production_use","endpoints","auth_method","pricing_visibility","terms_visibility","schema_visibility","recent_incident","desired_outcome","publish_anonymised_finding","consent","consent_version"],"additionalProperties":false},"audit-request-created":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"received"},"checkout":{"type":"object","properties":{"client_secret":{"type":"string","minLength":1}},"required":["client_secret"]},"payment_link":{"type":"string","format":"uri"}},"required":["id","status"]},"published-product":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"kind":{"type":"string","enum":["service","subscription","digital","fee","plugin"]},"category":{"type":"string","enum":["templates","prompts","automations","tools","plugins","snippets","blueprints","playbooks","starter-kits"]},"subcategory":{"type":"string","minLength":1},"status":{"type":"string","const":"published"},"price":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3},"unit":{"type":"string","minLength":1}},"required":["amount_minor","currency","unit"]},"availability":{"type":"string"},"tax_treatment":{"type":"string","enum":["vat_included","vat_excluded","outside_scope","not_vat_registered","unknown"]},"effective_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"checkout":{"type":"object","properties":{"type":{"type":"string","const":"stripe_checkout"},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"intake_url":{"type":"string","format":"uri"}},"required":["id","name","description","kind","status","price","tax_treatment","effective_date","checkout"]},"product-list":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"string"},"source":{"type":"string","enum":["fixture","catalogue"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$"},"name":{"type":"string","minLength":1},"description":{"type":"string"},"kind":{"type":"string","enum":["service","subscription","digital","fee","plugin"]},"category":{"type":"string","enum":["templates","prompts","automations","tools","plugins","snippets","blueprints","playbooks","starter-kits"]},"subcategory":{"type":"string","minLength":1},"status":{"type":"string","const":"published"},"price":{"type":"object","properties":{"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3},"unit":{"type":"string","minLength":1}},"required":["amount_minor","currency","unit"]},"availability":{"type":"string"},"tax_treatment":{"type":"string","enum":["vat_included","vat_excluded","outside_scope","not_vat_registered","unknown"]},"effective_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"checkout":{"type":"object","properties":{"type":{"type":"string","const":"stripe_checkout"},"url":{"type":"string","format":"uri"}},"required":["type","url"]},"intake_url":{"type":"string","format":"uri"}},"required":["id","name","description","kind","status","price","tax_treatment","effective_date","checkout"]}}},"required":["version","source","data"]},"public-record":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9-]+$"},"subject":{"type":"string","minLength":1},"kind":{"type":"string","minLength":1},"version":{"type":"string","minLength":1},"as_of":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"publisher":{"type":"string","minLength":1},"note":{"type":"string"},"claims":{"type":"array","items":{"type":"object","properties":{"statement":{"type":"string","minLength":1},"label":{"type":"string","enum":["observed","inferred","proposed","unknown","superseded"]},"evidence":{"type":"string","minLength":1}},"required":["statement","label","evidence"]}}},"required":["id","subject","kind","version","as_of","publisher","claims"]},"agent-waitlist-entry":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_name":{"type":"string","minLength":1,"maxLength":200},"agent_type":{"type":"string","minLength":1,"maxLength":200},"operator_type":{"type":"string","enum":["individual","company","organisation"]},"principal_contact":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"use_cases":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"capabilities":{"maxItems":4,"type":"array","items":{"type":"string","enum":["read","write","deploy","pay"]}},"tools_used":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"consent_version":{"type":"string","pattern":"^privacy-\\d{4}-\\d{2}-\\d{2}(\\.\\d+)?$"}},"required":["agent_name","agent_type","operator_type","use_cases","capabilities","tools_used","consent_version"],"additionalProperties":false},"agent-survey":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"current_tools":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"missing_capabilities":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"evidence_required":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"payment_authority":{"type":"string","enum":["none","within_limits","requires_human_approval","unknown"]},"payment_limits_note":{"type":"string","maxLength":500},"preferred_formats":{"maxItems":4,"type":"array","items":{"type":"string","enum":["json","markdown","openapi","mcp"]}},"feature_requests":{"type":"string","maxLength":4000},"ranked_priorities":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"follow_up_permission":{"type":"boolean"},"consent_version":{"type":"string","pattern":"^privacy-\\d{4}-\\d{2}-\\d{2}(\\.\\d+)?$"}},"required":["current_tools","missing_capabilities","evidence_required","payment_authority","preferred_formats","feature_requests","ranked_priorities","follow_up_permission","consent_version"],"additionalProperties":false},"agent-submission-accepted":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string","const":"received"},"registration_id":{"type":"string"},"trust":{"type":"string","enum":["untrusted","trusted"]}},"required":["id","status","registration_id","trust"]},"human-waitlist-entry":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"organisation":{"type":"string","maxLength":200},"interests":{"maxItems":14,"type":"array","items":{"type":"string","enum":["audit","store","agent-services","feed","monitoring","templates","prompts","automations","tools","plugins","snippets","blueprints","playbooks","starter-kits"]}},"consent":{"type":"boolean","const":true},"consent_version":{"type":"string","pattern":"^privacy-\\d{4}-\\d{2}-\\d{2}(\\.\\d+)?$"},"legend_terms_version":{"type":"string","const":"legend-2026-10-04"}},"required":["name","email","interests","consent","consent_version","legend_terms_version"],"additionalProperties":false},"tool-record":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"scope":{"type":["string","null"]},"annotations":{"type":"object","properties":{"readOnlyHint":{"type":"boolean"},"destructiveHint":{"type":"boolean"},"idempotentHint":{"type":"boolean"},"openWorldHint":{"type":"boolean"}},"required":["readOnlyHint","destructiveHint","idempotentHint","openWorldHint"]},"api":{"type":"object","properties":{"method":{"type":"string"},"path":{"type":"string"}},"required":["method","path"]}},"required":["name","title","description","input_schema","scope","annotations","api"]},"published-resource":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"url":{"type":"string"},"kind":{"type":"string","enum":["agent","service","software","product","guide","mcp-directory","skill-directory"]},"relationship":{"type":"string","enum":["independent","referral","affiliate"]},"tags":{"type":"array","items":{"type":"string"}},"position":{"type":"number"},"updated_at":{"type":"string"}},"required":["slug","title","summary","url","kind","relationship","tags","position","updated_at"]}},"securitySchemes":{"agentToken":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"WorkOS AuthKit agent access token. Discovery: /.well-known/oauth-protected-resource"}}}}