Skip to content
ToolsOnDuty - free online tools
Browse documentation

Reference / Security

Security API

2 endpoints for security workflows. Every call requires bearer authentication and uses the standard ToolsOnDuty response envelope.

Try it

Runs a real request from your browser to your own ToolsOnDuty account. Your key is only kept in this page and is never stored.

POST/v1/security/mask-data1 credit / call

Data masking

Mask generic text, email addresses, phone numbers or payment-card digits.

ParameterTypeRequiredDescription
valuestringYesSensitive value to mask.
modestringNogeneric | email | phone | card. Default: generic.
visibleStartnumberNoLeading characters to preserve in generic mode. Default: 2.
visibleEndnumberNoTrailing characters or phone digits to preserve. Default: 2.
maskCharacterstringNoSingle masking character. Default: *.

Request

curl -X POST https://toolsonduty.com/api/v1/security/mask-data \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"value":"john@example.com","mode":"email"}'

Response

{
  "ok": true,
  "data": {
    "result": "j***@example.com"
  }
}
POST/v1/generators/captcha2 credits / call

CAPTCHA SVG generator

Generate a lightweight CAPTCHA-style SVG and answer for server-side integration testing.

ParameterTypeRequiredDescription
lengthnumberNoChallenge length (4-8). Default: 6.

Request

curl -X POST https://toolsonduty.com/api/v1/generators/captcha \
  -H "Authorization: ******" \
  -H "Content-Type: application/json" \
  -d '{"length":6}'

Response

{
  "ok": true,
  "data": {
    "answer": "AB7K9P",
    "svg": "<svg>...</svg>",
    "warning": "Hash the answer server-side."
  }
}