{"openapi":"3.1.0","info":{"title":"OnSanctions","version":"2026-11-08","description":"Ongoing sanctions screening. POST /v1/screen enrolls a subject and screens it; sending the same subject again rescreens it. POST /v1/withdraw removes the subject."},"servers":[{"url":"https://onsanctions.com"}],"security":[{"apiKey":[]}],"paths":{"/v1/screen":{"post":{"operationId":"screen","summary":"Screen a subject","description":"Enrols a person or company on the first call and screens them. The same subject sent again is rescreened.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"8 to 160 characters, unique per operation. The same key with the same body replays the stored response for 48 hours.","schema":{"type":"string","minLength":8,"maxLength":160}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Screen"}}}},"responses":{"200":{"description":"Screen result","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenResult"}}}},"202":{"description":"The screen is still running. Retry with the same Idempotency-Key after Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"400":{"description":"The body, identifier or Idempotency-Key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A live key's subscription is not active, or access is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"POPULATION_LIMIT_EXCEEDED, or the key's IP allowlist rejected the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency-Key was reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate limit (60 a minute) or TEST_LIMIT_EXCEEDED. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Screening is temporarily unavailable. Retry with the same Idempotency-Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/withdraw":{"post":{"operationId":"withdraw","summary":"Withdraw a subject","description":"Removes an enrolled subject from the active population. Send the same entity and identifier used to enroll.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"8 to 160 characters, unique per operation. The same key with the same body replays the stored response for 48 hours.","schema":{"type":"string","minLength":8,"maxLength":160}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Identity"}}}},"responses":{"200":{"description":"Subject withdrawn","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WithdrawResult"}}}},"400":{"description":"The body, identifier or Idempotency-Key is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"The API key is unknown or revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"A live key's subscription is not active, or access is paused.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"POPULATION_LIMIT_EXCEEDED, or the key's IP allowlist rejected the caller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No enrolled subject matches that entity and identifier.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The Idempotency-Key was reused with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Over the rate limit (60 a minute) or TEST_LIMIT_EXCEEDED. See Retry-After.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Screening is temporarily unavailable. Retry with the same Idempotency-Key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"x-api-key","description":"os_live_ or os_test_ key from the account page."}},"schemas":{"Identity":{"type":"object","required":["entity","identifierType","identifierValue","identifierCountry"],"properties":{"entity":{"type":"integer","enum":[0,1,2,3],"description":"0 person, 1 company, 2 organization, 3 legal entity."},"identifierType":{"type":"string","enum":["passport","lei"],"description":"passport for entity 0, lei otherwise."},"identifierValue":{"type":"string","minLength":5,"maxLength":20,"description":"Passport number (5 to 20 letters or digits) or a 20-character LEI."},"identifierCountry":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"2-letter ISO country that issued the identifier."}}},"Screen":{"allOf":[{"$ref":"#/components/schemas/Identity"},{"type":"object","required":["name","country","dataset"],"properties":{"name":{"type":"string","minLength":2,"maxLength":300},"country":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Nationality for a person, country of registration for a company."},"dataset":{"type":"string","enum":["all","sanctions","peps","crime"]}}}]},"ScreenResult":{"type":"object","properties":{"success":{"type":"boolean"},"operation":{"type":"string","enum":["onboarding","ongoing"]},"screened_name":{"type":"string"},"screened_entity_type":{"type":"integer"},"screened_country":{"type":"string"},"screened_dataset":{"type":"string"},"results":{"type":"object","properties":{"Success":{"type":"boolean"},"ResponseCode":{"type":"integer"},"Header":{"type":"object","properties":{"DatasetVersion":{"type":"string"},"DatasetPublishedAt":{"type":"string","format":"date-time"},"ScreenedAt":{"type":"string","format":"date-time"},"CategoriesRequested":{"type":"array","items":{"type":"string"}}}},"SearchResults":{"type":"object","properties":{"Found":{"type":"boolean"},"Message":{"type":"string"},"RecordCount":{"type":"integer"}}},"PossibleMatches":{"type":"object","properties":{"Found":{"type":"boolean"},"Results":{"type":"array","items":{"type":"object"}}}},"JurisdictionRisks":{"type":"object"}}},"mode":{"type":"string","enum":["live","test"]},"requestId":{"type":"string"}}},"WithdrawResult":{"type":"object","properties":{"success":{"type":"boolean"},"withdrawn":{"type":"boolean"},"mode":{"type":"string","enum":["live","test"]},"requestId":{"type":"string"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"requestId":{"type":"string"}}}}}}