{"openapi":"3.1.0","info":{"title":"MilScreen API","description":"Restricted-party screening. Every /v1 call sends `Authorization: Bearer <key>`: `ms_live_` (1 credit per name), `ms_test_` (free, livemode false, 100 names per hour), or `ms_pub_` (milscreen.com, 100 names per hour per IP). Clients must ignore unknown response fields: new fields, enum values, and lists are additive. Every error has the ErrorResponse shape; branch on `code`. Results are informational only, not a compliance determination. Docs: https://milscreen.com/docs","version":"1"},"servers":[{"url":"https://api.milscreen.com"}],"paths":{"/v1/screenings":{"post":{"summary":"Screen one name","description":"Screens one name and returns the stored receipt. Live keys spend 1 credit.","operationId":"createScreening","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours returns the stored response with Idempotent-Replayed: true and is not billed again.","title":"Idempotency-Key"},"description":"1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours returns the stored response with Idempotent-Replayed: true and is not billed again."}],"responses":{"200":{"description":"The stored receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Screening"},"examples":{"match":{"value":{"id":"scr_01JBX7Q9T4M2ZK8VQ3W5E6R7T8","object":"screening","created_at":"2026-10-22T14:03:11Z","livemode":true,"query":{"name":"Ivan Petrov","birth_date":"1975-03-02","country":"RU","entity_type":null},"threshold":85,"status":"match","matches":[{"list":"ofac_sdn","entry_id":"12345","entity_type":"individual","name":"PETROV, Ivan Ivanovich","matched_name":"PETROV, Ivan Ivanovich","score":93,"reasons":[{"field":"name","points":93,"detail":"primary name 'PETROV, Ivan Ivanovich': ivan=ivan, petrov=petrov; extra on entry: ivanovich"},{"field":"birth_date","points":0,"detail":"matches 1975-03-02"},{"field":"country","points":0,"detail":"matches RU"}],"birth_dates":["1975-03-02"],"countries":["RU"],"programs":["RUSSIA-EO14024"],"url":"https://sanctionssearch.ofac.treas.gov/Details.aspx?id=12345"}],"lists":[{"id":"ofac_sdn","version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","status":"current"},{"id":"ofac_cons","version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","status":"current"},{"id":"bis_el","version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_dpl","version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_uvl","version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_meu","version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_dtc","version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_acn","version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"un_sc","version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","status":"current"}],"algorithm":"2026-10-23","disclaimer":"Informational only. Not a compliance determination. Verify any match against the official list."}},"no_match":{"value":{"id":"scr_01JBX7V2N8D4KQ6MZ1P5C3W9HB","object":"screening","created_at":"2026-10-22T14:05:42Z","livemode":false,"query":{"name":"Acme Widgets LLC","birth_date":null,"country":"US","entity_type":"organization"},"threshold":85,"status":"no_match","matches":[],"lists":[{"id":"ofac_sdn","version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","status":"current"},{"id":"ofac_cons","version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","status":"current"},{"id":"bis_el","version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_dpl","version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_uvl","version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_meu","version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_dtc","version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_acn","version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"un_sc","version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","status":"current"}],"algorithm":"2026-10-23","disclaimer":"Informational only. Not a compliance determination. Verify any match against the official list."}}}}}},"400":{"description":"Error. code: invalid_json, parameter_missing, parameter_invalid, unknown_parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"parameter_invalid":{"value":{"error":{"type":"invalid_request_error","code":"parameter_invalid","message":"birth_date must be YYYY, YYYY-MM, or YYYY-MM-DD.","param":"birth_date","doc_url":"https://milscreen.com/docs#parameter_invalid","request_id":"req_01JBX7RA2C5D6E7F8G9H0J1K2M"}}}}}}},"401":{"description":"Error. code: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error. code: insufficient_credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error. code: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Error. code: request_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Error. code: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error. code: rate_limit_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"rate_limit_exceeded":{"value":{"error":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Rate limit reached: 100 names per hour. Retry in 1520 seconds.","param":null,"doc_url":"https://milscreen.com/docs#rate_limit_exceeded","request_id":"req_01JBX81K7W3N5Q9S2D4F6H8J0M"}}}}}}},"500":{"description":"Error. code: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Error. code: list_unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningRequest"},"examples":{"match":{"value":{"name":"Ivan Petrov","birth_date":"1975-03-02","country":"RU"}}}}}}}},"/v1/screenings/batch":{"post":{"summary":"Screen up to 100 names","description":"Each item is validated and screened alone. An invalid item becomes an error object at its index, costs nothing, and does not fail the other items. Live keys spend 1 credit per valid item.","operationId":"createScreeningBatch","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours returns the stored response with Idempotent-Replayed: true and is not billed again.","title":"Idempotency-Key"},"description":"1 to 255 printable ASCII characters. A retry with the same key and body within 24 hours returns the stored response with Idempotent-Replayed: true and is not billed again."}],"responses":{"200":{"description":"One Screening or error per item, in input order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"},"examples":{"batch":{"value":{"data":[{"id":"scr_01JBX7XG4R6T8V0W2Y4A6C8E0G","object":"screening","created_at":"2026-10-22T14:07:30Z","livemode":true,"query":{"name":"Ivan Petrov","birth_date":"1975-03-02","country":"RU","entity_type":null},"threshold":85,"status":"match","matches":[{"list":"ofac_sdn","entry_id":"12345","entity_type":"individual","name":"PETROV, Ivan Ivanovich","matched_name":"PETROV, Ivan Ivanovich","score":93,"reasons":[{"field":"name","points":93,"detail":"primary name 'PETROV, Ivan Ivanovich': ivan=ivan, petrov=petrov; extra on entry: ivanovich"},{"field":"birth_date","points":0,"detail":"matches 1975-03-02"},{"field":"country","points":0,"detail":"matches RU"}],"birth_dates":["1975-03-02"],"countries":["RU"],"programs":["RUSSIA-EO14024"],"url":"https://sanctionssearch.ofac.treas.gov/Details.aspx?id=12345"}],"lists":[{"id":"ofac_sdn","version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","status":"current"},{"id":"ofac_cons","version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","status":"current"},{"id":"bis_el","version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_dpl","version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_uvl","version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_meu","version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_dtc","version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_acn","version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"un_sc","version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","status":"current"}],"algorithm":"2026-10-23","disclaimer":"Informational only. Not a compliance determination. Verify any match against the official list."},{"id":"scr_01JBX7XG4R6T8V0W2Y4A6C8E0H","object":"screening","created_at":"2026-10-22T14:07:30Z","livemode":true,"query":{"name":"Acme Widgets LLC","birth_date":null,"country":"US","entity_type":"organization"},"threshold":85,"status":"no_match","matches":[],"lists":[{"id":"ofac_sdn","version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","status":"current"},{"id":"ofac_cons","version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","status":"current"},{"id":"bis_el","version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_dpl","version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_uvl","version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_meu","version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_dtc","version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_acn","version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"un_sc","version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","status":"current"}],"algorithm":"2026-10-23","disclaimer":"Informational only. Not a compliance determination. Verify any match against the official list."},{"error":{"type":"invalid_request_error","code":"parameter_invalid","message":"birth_date must be YYYY, YYYY-MM, or YYYY-MM-DD.","param":"birth_date","doc_url":"https://milscreen.com/docs#parameter_invalid","request_id":"req_01JBX7XG3M5P7R9T1V3X5Z7B9D"}}]}}}}}},"400":{"description":"Error. code: invalid_json, parameter_missing, parameter_invalid, unknown_parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Error. code: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"Error. code: insufficient_credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"Error. code: idempotency_key_reused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"413":{"description":"Error. code: request_too_large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"415":{"description":"Error. code: unsupported_media_type.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Error. code: rate_limit_exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"rate_limit_exceeded":{"value":{"error":{"type":"rate_limit_error","code":"rate_limit_exceeded","message":"Rate limit reached: 100 names per hour. Retry in 1520 seconds.","param":null,"doc_url":"https://milscreen.com/docs#rate_limit_exceeded","request_id":"req_01JBX81K7W3N5Q9S2D4F6H8J0M"}}}}}}},"500":{"description":"Error. code: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"},"examples":{"batch":{"value":{"screenings":[{"name":"Ivan Petrov","birth_date":"1975-03-02","country":"RU"},{"name":"Acme Widgets LLC","country":"US","entity_type":"organization"},{"name":"Maria Lopez","birth_date":"1980-13-01"}]}}}}}}}},"/v1/screenings/{id}":{"get":{"summary":"Fetch a stored receipt","description":"Returns the exact receipt stored at creation. Test keys see only test receipts, and live keys only live receipts.","operationId":"getScreening","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","title":"Id"}}],"responses":{"200":{"description":"The stored receipt.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Screening"},"examples":{"match":{"value":{"id":"scr_01JBX7Q9T4M2ZK8VQ3W5E6R7T8","object":"screening","created_at":"2026-10-22T14:03:11Z","livemode":true,"query":{"name":"Ivan Petrov","birth_date":"1975-03-02","country":"RU","entity_type":null},"threshold":85,"status":"match","matches":[{"list":"ofac_sdn","entry_id":"12345","entity_type":"individual","name":"PETROV, Ivan Ivanovich","matched_name":"PETROV, Ivan Ivanovich","score":93,"reasons":[{"field":"name","points":93,"detail":"primary name 'PETROV, Ivan Ivanovich': ivan=ivan, petrov=petrov; extra on entry: ivanovich"},{"field":"birth_date","points":0,"detail":"matches 1975-03-02"},{"field":"country","points":0,"detail":"matches RU"}],"birth_dates":["1975-03-02"],"countries":["RU"],"programs":["RUSSIA-EO14024"],"url":"https://sanctionssearch.ofac.treas.gov/Details.aspx?id=12345"}],"lists":[{"id":"ofac_sdn","version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","status":"current"},{"id":"ofac_cons","version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","status":"current"},{"id":"bis_el","version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_dpl","version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_uvl","version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"bis_meu","version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_dtc","version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"state_acn","version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","status":"current"},{"id":"un_sc","version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","status":"current"}],"algorithm":"2026-10-23","disclaimer":"Informational only. Not a compliance determination. Verify any match against the official list."}}}}}},"401":{"description":"Error. code: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Error. code: not_found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error. code: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/lists":{"get":{"summary":"List every list covered","description":"Every list in registry order, with its loaded version and freshness, including lists not loaded yet.","operationId":"listLists","responses":{"200":{"description":"Every list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreeningList"},"examples":{"lists":{"value":{"data":[{"id":"ofac_sdn","object":"list","name":"Specially Designated Nationals and Blocked Persons List","publisher":"U.S. Treasury, OFAC","url":"https://sanctionslist.ofac.treas.gov/Home/SdnList","default":true,"version":"a3f9c2e1b7d4","updated_at":"2026-10-21T16:52:10Z","checked_at":"2026-10-22T14:00:04Z","entry_count":19471,"status":"current"},{"id":"ofac_cons","object":"list","name":"Consolidated Sanctions List (non-SDN)","publisher":"U.S. Treasury, OFAC","url":"https://sanctionslist.ofac.treas.gov/Home/ConsolidatedList","default":true,"version":"5be08d7f19c3","updated_at":"2026-10-21T16:52:12Z","checked_at":"2026-10-22T14:00:05Z","entry_count":486,"status":"current"},{"id":"bis_el","object":"list","name":"Entity List","publisher":"U.S. Commerce, BIS","url":"https://www.bis.gov/regulations/ear/744#supplement-4-744","default":true,"version":"e17c4a9b02f6","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":3419,"status":"current"},{"id":"bis_dpl","object":"list","name":"Denied Persons List","publisher":"U.S. Commerce, BIS","url":"https://www.bis.gov/licensing/end-user-guidance/denied-persons-list-dpl","default":true,"version":"0c9d2e8a4b71","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":441,"status":"current"},{"id":"bis_uvl","object":"list","name":"Unverified List","publisher":"U.S. Commerce, BIS","url":"https://www.bis.gov/regulations/ear/744#supplement-6-744","default":true,"version":"7a41f0c6d9e2","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":222,"status":"current"},{"id":"bis_meu","object":"list","name":"Military End User List","publisher":"U.S. Commerce, BIS","url":"https://www.bis.gov/regulations/ear/744#supplement-7-744","default":true,"version":"b2e6a19d3f05","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":70,"status":"current"},{"id":"state_dtc","object":"list","name":"ITAR Debarred Parties","publisher":"U.S. State, DDTC","url":"https://deccs.pmddtc.state.gov/ddtc_public?id=ddtc_kb_article_page&sys_id=c22d1833dbb8d300d0a370131f9619f0","default":true,"version":"4f8c07b5e1a9","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":801,"status":"current"},{"id":"state_acn","object":"list","name":"Nonproliferation Sanctions","publisher":"U.S. State, ISN","url":"https://www.state.gov/bureau-of-arms-control-and-nonproliferation/nonproliferation-sanctions","default":true,"version":"d06b3e2f8c14","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":105,"status":"current"},{"id":"bis_dpl_expired","object":"list","name":"Denied Persons List, expired orders (opt-in)","publisher":"U.S. Commerce, BIS","url":"https://www.bis.gov/licensing/end-user-guidance/denied-persons-list-dpl","default":false,"version":"91e5c7a0b3d8","updated_at":"2026-10-22T09:15:03Z","checked_at":"2026-10-22T14:00:09Z","entry_count":1155,"status":"current"},{"id":"un_sc","object":"list","name":"UN Security Council Consolidated List","publisher":"United Nations Security Council","url":"https://main.un.org/securitycouncil/en/content/un-sc-consolidated-list","default":true,"version":"68ad1f4e9c27","updated_at":"2026-10-22T08:30:41Z","checked_at":"2026-10-22T14:00:11Z","entry_count":1010,"status":"current"}]}}}}}},"401":{"description":"Error. code: missing_api_key, invalid_api_key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Error. code: internal_error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"BatchResponse":{"properties":{"data":{"items":{"anyOf":[{"$ref":"#/components/schemas/Screening"},{"$ref":"#/components/schemas/ErrorResponse"}]},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"BatchResponse","description":"Same length and order as the request. Each element is a Screening or an error."},"ErrorBody":{"properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","rate_limit_error","api_error"],"title":"Type"},"code":{"type":"string","title":"Code","description":"Stable machine-readable code. Branch on this."},"message":{"type":"string","title":"Message","description":"Human-readable text. May change."},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param","description":"The request field to blame. Relative to the item in a batch."},"doc_url":{"type":"string","title":"Doc Url"},"request_id":{"type":"string","title":"Request Id","description":"Equals the Request-Id response header."}},"type":"object","required":["type","code","message","param","doc_url","request_id"],"title":"ErrorBody"},"ErrorResponse":{"properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"type":"object","required":["error"],"title":"ErrorResponse","description":"Every error, and every failed batch item, has this shape."},"ListObject":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"list","title":"Object"},"name":{"type":"string","title":"Name"},"publisher":{"type":"string","title":"Publisher"},"url":{"type":"string","title":"Url"},"default":{"type":"boolean","title":"Default","description":"true when the list is screened if a request omits `lists`."},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"null when unavailable."},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When MilScreen first loaded this version. null when unavailable."},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At"},"entry_count":{"type":"integer","minimum":0.0,"title":"Entry Count"},"status":{"type":"string","enum":["current","stale","unavailable"],"title":"Status","description":"current: checked within the last 2 hours. stale: loaded, not checked for 2 hours. unavailable: no version loaded."}},"type":"object","required":["id","object","name","publisher","url","default","version","updated_at","checked_at","entry_count","status"],"title":"ListObject","description":"A list MilScreen covers."},"ListVersion":{"properties":{"id":{"type":"string","title":"Id"},"version":{"type":"string","title":"Version","description":"12 lowercase hex characters. Changes only when the list content changes."},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When MilScreen first loaded this version."},"checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Checked At","description":"The last time the source was confirmed to serve this version."},"status":{"type":"string","enum":["current","stale","unavailable"],"title":"Status","description":"current: checked within the last 2 hours. stale: loaded, not checked for 2 hours."}},"type":"object","required":["id","version","updated_at","checked_at","status"],"title":"ListVersion","description":"The version of one list used by a screening."},"Match":{"properties":{"list":{"type":"string","title":"List","description":"List ID."},"entry_id":{"type":"string","title":"Entry Id","description":"The publisher's identifier, unique within the list."},"entity_type":{"type":"string","enum":["individual","organization","vessel","aircraft","unknown"],"title":"Entity Type"},"name":{"type":"string","title":"Name","description":"The entry's primary name, as published."},"matched_name":{"type":"string","title":"Matched Name","description":"The entry name or alias that scored best, as published."},"score":{"type":"integer","maximum":100.0,"minimum":0.0,"title":"Score","description":"Sum of reasons[].points, clamped to 0-100."},"reasons":{"items":{"$ref":"#/components/schemas/Reason"},"type":"array","title":"Reasons","description":"`name` first, then birth_date, country, and entity_type when the query supplied them."},"birth_dates":{"items":{"type":"string"},"type":"array","title":"Birth Dates","description":"Display text: 1972-03-12, 1965, 1970-12, 1955 to 1957, circa 1951."},"countries":{"items":{"type":"string"},"type":"array","title":"Countries","description":"Alpha-2 codes, sorted and unique."},"programs":{"items":{"type":"string"},"type":"array","title":"Programs","description":"Sanctions programs, as published."},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The official page for this entry or list."}},"type":"object","required":["list","entry_id","entity_type","name","matched_name","score","reasons","birth_dates","countries","programs","url"],"title":"Match"},"Query":{"properties":{"name":{"type":"string","title":"Name"},"birth_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Birth Date"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"ISO 3166-1 alpha-2, uppercase."},"entity_type":{"anyOf":[{"type":"string","enum":["individual","organization","vessel","aircraft"]},{"type":"null"}],"title":"Entity Type"}},"type":"object","required":["name","birth_date","country","entity_type"],"title":"Query","description":"The normalized inputs. Values not provided are null."},"Reason":{"properties":{"field":{"type":"string","enum":["name","birth_date","country","entity_type"],"title":"Field"},"points":{"type":"integer","title":"Points"},"detail":{"type":"string","title":"Detail"}},"type":"object","required":["field","points","detail"],"title":"Reason","description":"One line of the score. Display `detail`, but do not parse it."},"Screening":{"properties":{"id":{"type":"string","title":"Id","description":"scr_ followed by a 26-character ULID."},"object":{"type":"string","const":"screening","title":"Object"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"livemode":{"type":"boolean","title":"Livemode","description":"false for test keys."},"query":{"$ref":"#/components/schemas/Query"},"threshold":{"type":"integer","title":"Threshold"},"status":{"type":"string","enum":["match","no_match"],"title":"Status","description":"match if and only if matches is non-empty."},"matches":{"items":{"$ref":"#/components/schemas/Match"},"type":"array","title":"Matches","description":"Sorted by score descending, then list order, then entry_id. At most 50."},"lists":{"items":{"$ref":"#/components/schemas/ListVersion"},"type":"array","title":"Lists","description":"The lists screened, in registry order."},"algorithm":{"type":"string","title":"Algorithm","description":"Scorer version. Changes whenever scoring changes."},"disclaimer":{"type":"string","title":"Disclaimer"}},"type":"object","required":["id","object","created_at","livemode","query","threshold","status","matches","lists","algorithm","disclaimer"],"title":"Screening","description":"A stored screening receipt. GET /v1/screenings/{id} returns the same bytes."},"ScreeningList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ListObject"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"ScreeningList","description":"GET /v1/lists: every list, in registry order, including lists not loaded yet."},"BatchRequest":{"additionalProperties":false,"description":"Up to 100 screenings. Each item is validated alone; an invalid item becomes an error at its index.","properties":{"screenings":{"items":{"$ref":"#/components/schemas/ScreeningRequest"},"maxItems":100,"minItems":1,"title":"Screenings","type":"array"}},"required":["screenings"],"title":"BatchRequest","type":"object"},"ScreeningRequest":{"additionalProperties":false,"description":"One name to screen. Only `name` is required. Any other key is rejected with unknown_parameter.","properties":{"name":{"description":"The name to screen. Trimmed; must contain a letter or digit and no control characters.","maxLength":512,"minLength":1,"title":"Name","type":"string"},"birth_date":{"anyOf":[{"pattern":"^[0-9]{4}(-[0-9]{2}(-[0-9]{2})?)?$","type":"string"},{"type":"null"}],"default":null,"description":"YYYY, YYYY-MM, or YYYY-MM-DD, year 1900 to the current year. Lowers the score of individuals whose birth dates differ. An empty string means not provided.","title":"Birth Date"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"ISO 3166-1 alpha-2 code in any case, or an English country name such as Russia. The receipt echoes the alpha-2 code. An empty string means not provided.","title":"Country"},"entity_type":{"anyOf":[{"enum":["individual","organization","vessel","aircraft"],"type":"string"},{"type":"null"}],"default":null,"description":"Screens only entries of this type, plus entries whose type is not stated. An empty string means not provided.","title":"Entity Type"},"threshold":{"anyOf":[{"maximum":100,"minimum":50,"type":"integer"},{"type":"null"}],"default":null,"description":"Minimum score for a match. Default 85. Must be a JSON integer.","title":"Threshold"},"lists":{"anyOf":[{"items":{"type":"string"},"maxItems":10,"minItems":1,"type":"array","uniqueItems":true},{"type":"null"}],"default":null,"description":"List IDs from GET /v1/lists. Default: every list with `default: true`.","title":"Lists"}},"required":["name"],"title":"ScreeningRequest","type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API key: ms_live_..., ms_test_..., or ms_pub_..."}}},"security":[{"bearerAuth":[]}]}