Where tokenisation fits in an API
Choose the boundary
Consider a support system that needs to recognise a returning customer using a sensitive membership number. At intake, a restricted service can exchange the number for an opaque reference. Downstream systems can associate cases with the reference.
Design the return journey
List the few workflows that require the original number. Give each a specific permission to resolve the token, scope the lookup to the tenant and record the purpose of the lookup. Possession of a reference alone should never authorise disclosure.
Follow a failed request
Send synthetic test data through validation failures, retries and error reporting. Inspect logs and dead-letter queues for the original value. A tokenised database offers little protection if the intake payload survives in telemetry.