/

/

API reference

API.

Four endpoints. JSON in, JSON out.

/

/

API reference

API.

Four endpoints. JSON in, JSON out.

/

/

API reference

API.

Four endpoints. JSON in, JSON out.

POST

/v1/redact

Find and mask personal data in text.

Field

Type

Notes

text

string

Required. Up to 1 MB.

mode

mask | token | hash

Default mask.

detect

string[]

Types to look for. Default all.

region

eu | us | gulf

Where to process.

curl https://api.veil.dev/v1/redact \ -H "Authorization: Bearer $VEIL_KEY" \ -d '{"text":"Mail layla@example.com","mode":"token"}'

POST

/v1/redact

Find and mask personal data in text.

Field

Type

Notes

text

string

Required. Up to 1 MB.

mode

mask | token | hash

Default mask.

detect

string[]

Types to look for. Default all.

region

eu | us | gulf

Where to process.

curl https://api.veil.dev/v1/redact \ -H "Authorization: Bearer $VEIL_KEY" \ -d '{"text":"Mail layla@example.com","mode":"token"}'

POST

/v1/redact

Find and mask personal data in text.

Field

Type

Notes

text

string

Required. Up to 1 MB.

mode

mask | token | hash

Default mask.

detect

string[]

Types to look for. Default all.

region

eu | us | gulf

Where to process.

curl https://api.veil.dev/v1/redact \ -H "Authorization: Bearer $VEIL_KEY" \ -d '{"text":"Mail layla@example.com","mode":"token"}'

POST

/v1/restore

Turn tokens back into original values.

Field

Type

Notes

text

string

Text containing tokens.

key

string

Your token key.

curl https://api.veil.dev/v1/restore \ -d '{"text":"Mail [EMAIL_1]","key":"tk_..."}'

POST

/v1/restore

Turn tokens back into original values.

Field

Type

Notes

text

string

Text containing tokens.

key

string

Your token key.

curl https://api.veil.dev/v1/restore \ -d '{"text":"Mail [EMAIL_1]","key":"tk_..."}'

POST

/v1/restore

Turn tokens back into original values.

Field

Type

Notes

text

string

Text containing tokens.

key

string

Your token key.

curl https://api.veil.dev/v1/restore \ -d '{"text":"Mail [EMAIL_1]","key":"tk_..."}'

GET

/v1/audit

List redaction events.

Field

Type

Notes

from

ISO date

Start of range.

to

ISO date

End of range.

type

string

Filter by field type.

format

json | csv

Default json.

curl "https://api.veil.dev/v1/audit?from=2026-10-01&format=csv"

GET

/v1/audit

List redaction events.

Field

Type

Notes

from

ISO date

Start of range.

to

ISO date

End of range.

type

string

Filter by field type.

format

json | csv

Default json.

curl "https://api.veil.dev/v1/audit?from=2026-10-01&format=csv"

GET

/v1/audit

List redaction events.

Field

Type

Notes

from

ISO date

Start of range.

to

ISO date

End of range.

type

string

Filter by field type.

format

json | csv

Default json.

curl "https://api.veil.dev/v1/audit?from=2026-10-01&format=csv"

GET

/v1/detectors

List built in and custom detectors.

Field

Type

Notes

kind

builtin | custom

Optional filter.

curl https://api.veil.dev/v1/detectors

GET

/v1/detectors

List built in and custom detectors.

Field

Type

Notes

kind

builtin | custom

Optional filter.

curl https://api.veil.dev/v1/detectors

GET

/v1/detectors

List built in and custom detectors.

Field

Type

Notes

kind

builtin | custom

Optional filter.

curl https://api.veil.dev/v1/detectors

ERR

Errors

Code

Meaning

Fix

400

Bad request

Check the body.

401

Missing or bad key

Send your Bearer key.

413

Text too large

Split the input.

429

Rate limited

Retry after the header.

ERR

Errors

Code

Meaning

Fix

400

Bad request

Check the body.

401

Missing or bad key

Send your Bearer key.

413

Text too large

Split the input.

429

Rate limited

Retry after the header.

ERR

Errors

Code

Meaning

Fix

400

Bad request

Check the body.

401

Missing or bad key

Send your Bearer key.

413

Text too large

Split the input.

429

Rate limited

Retry after the header.

Start building.

Start building.

Start building.

Copy template

Create a free website with Framer, the website builder loved by startups, designers and agencies.