{"openapi":"3.1.0","info":{"title":"Mask API","version":"1.0.0","description":"Mask a value for safe display. The mask endpoint keeps the first and/or last few characters visible and replaces the rest with a mask character — so a card becomes ••••••••••••1111 and an API token becomes sk**********3456 — and can keep separators (spaces and dashes) intact so the value keeps its shape. A dedicated email masker hides the local part (and optionally the domain) while keeping the address recognisable, e.g. j•••••••@example.com. Choose how many characters to reveal and which mask character to use. Perfect for showing the last four digits of a card, partially hiding emails and phone numbers, and masking tokens and account numbers in UIs, receipts and logs. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This masks a known value for display; to find and redact PII inside free text, use a redaction API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/mask-api","description":"oanor gateway"}],"tags":[{"name":"Mask"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/email":{"get":{"operationId":"get_v1_email","tags":["Mask"],"summary":"Mask an email","description":"","parameters":[{"name":"email","in":"query","required":true,"description":"Email address","schema":{"type":"string"},"example":"john.doe@example.com"},{"name":"show_first","in":"query","required":false,"description":"Visible local chars (default 1)","schema":{"type":"string"}},{"name":"mask_domain","in":"query","required":false,"description":"true to also mask the domain","schema":{"type":"string"}},{"name":"mask_char","in":"query","required":false,"description":"Mask character (default •)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"email":"john.doe@example.com","domain":"example.com","masked":"j•••••••@example.com","local_part":"john.doe"},"meta":{"timestamp":"2026-06-03T09:25:08.030Z","request_id":"adff3162-3c9b-44c9-b77b-13ea2d24fa7b"},"status":"ok","message":"Mask an email","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/mask":{"get":{"operationId":"get_v1_mask","tags":["Mask"],"summary":"Mask a value","description":"","parameters":[{"name":"value","in":"query","required":true,"description":"The string to mask","schema":{"type":"string"},"example":"4111111111111111"},{"name":"show_last","in":"query","required":false,"description":"Visible chars at end (default 4)","schema":{"type":"string"},"example":"4"},{"name":"show_first","in":"query","required":false,"description":"Visible chars at start (default 0)","schema":{"type":"string"}},{"name":"mask_char","in":"query","required":false,"description":"Mask character (default •)","schema":{"type":"string"}},{"name":"keep_separators","in":"query","required":false,"description":"true to keep spaces/dashes","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"shown":4,"masked":"••••••••••••1111","masked_count":12,"original_length":16},"meta":{"timestamp":"2026-06-03T09:25:08.146Z","request_id":"e2ca0e28-28b7-4271-83ad-c032fff2a1fa"},"status":"ok","message":"Mask a value","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Mask API","notes":"This masks a known value for display (e.g. •••• 1234) — to find and redact PII inside free text, use a redaction API. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/mask","params":{"value":"the string (required)","mask_char":"default •","show_last":"visible chars at end (default 4)","show_first":"visible chars at start (default 0)","keep_separators":"true to keep spaces/dashes"},"returns":"the masked string"},{"path":"/v1/email","params":{"email":"an email address (required)","mask_char":"default •","show_first":"visible local chars (default 1)","mask_domain":"true to also mask the domain"},"returns":"the masked email"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Mask a value for safe display — keep the first and/or last few characters visible and replace the rest with a mask character, optionally leaving separators (spaces, dashes) intact so a card or phone number keeps its shape. A dedicated email masker hides the local part (and optionally the domain) while keeping it recognisable. Pure local, no key."},"meta":{"timestamp":"2026-06-03T09:25:08.232Z","request_id":"7817b0e0-ef2f-4936-b4c5-16f97afb828b"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":1235,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":275,"monthly_call_quota":10750,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2265,"monthly_call_quota":158500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6065,"monthly_call_quota":835000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/mask-api"}