{"openapi":"3.1.0","info":{"title":"HUMINT Request Intake API","version":"1.0.0","description":"Create private request drafts. The account owner reviews, funds and publishes them in HUMINT."},"servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"requestKey":{"type":"http","scheme":"bearer","bearerFormat":"hmt_req_…"}},"schemas":{"RequestInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":5,"maxLength":100},"description":{"type":"string","minLength":20,"maxLength":10000},"region":{"type":"string","minLength":2,"maxLength":60},"category":{"default":"other","type":"string","enum":["regional_affairs","economy_supply_chains","infrastructure_disasters","humanitarian_conditions","other"]},"privateBrief":{"default":"","type":"string","maxLength":10000},"currency":{"default":"HRS","type":"string","enum":["HRS","USDG"]},"reward":{"default":"","type":"string","pattern":"^(?:|\\d{1,7}(?:\\.\\d{1,6})?)$"},"slots":{"default":null,"anyOf":[{"type":"integer","minimum":1,"maximum":100},{"type":"null"}]},"deadline":{"default":"","anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"string","const":""}]},"minLevel":{"default":0,"type":"integer","minimum":0,"maximum":4},"approvalRequired":{"default":false,"type":"boolean"},"collection":{"default":{"objective":"","scope":"","collectionPeriod":"","questions":[],"acceptanceCriteria":"","exclusions":"","deliveryInstructions":"","language":"en"},"type":"object","properties":{"objective":{"default":"","type":"string","maxLength":2000},"scope":{"default":"","type":"string","maxLength":2000},"collectionPeriod":{"default":"","type":"string","maxLength":300},"questions":{"default":[],"maxItems":8,"type":"array","items":{"type":"string","maxLength":500}},"acceptanceCriteria":{"default":"","type":"string","maxLength":3000},"exclusions":{"default":"","type":"string","maxLength":2000},"deliveryInstructions":{"default":"","type":"string","maxLength":2000},"language":{"default":"en","type":"string","enum":["ko","en","ru","zh","ja","th","es","de","fr","ar","any"]}}},"delivery":{"default":{"mode":"either","formats":["pdf","jpg","png","webp","txt","csv"],"minFiles":0,"maxFiles":3,"maxFileSizeMb":8,"minTextLength":0},"type":"object","properties":{"mode":{"default":"either","type":"string","enum":["text","files","text_and_files","either"]},"formats":{"default":["pdf","jpg","png","webp","txt","csv"],"maxItems":7,"type":"array","items":{"type":"string","enum":["pdf","jpg","png","webp","txt","csv","mp4"]}},"minFiles":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991},"maxFiles":{"default":3,"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"maxFileSizeMb":{"default":8,"type":"integer","minimum":1,"maximum":100},"minTextLength":{"default":0,"type":"integer","minimum":0,"maximum":10000}}}},"required":["title","description","region"],"additionalProperties":false}}},"paths":{"/requests":{"post":{"operationId":"createRequestDraft","security":[{"requestKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9_.:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestInput"}}}},"responses":{"200":{"description":"Existing draft returned for an identical retry."},"201":{"description":"Private draft created; includes id, status=draft, published=false, requiresWalletPublication=true, reviewUrl and createdAt."},"400":{"description":"Invalid input or missing Idempotency-Key."},"401":{"description":"Invalid, expired or revoked API key."},"403":{"description":"Account owner must accept current terms in HUMINT."},"409":{"description":"Idempotency-Key already used with different input."},"429":{"description":"Rate limit reached: 20 new drafts/hour and 100/day per account."}}}}}}