Restrict robot tokens to IP addresses

Published: November 27, 2026

v2026-11-27

Enterprise organizations can now restrict a robot token to the IP addresses they choose. Requests made with the token from any other address are refused, so a leaked token can't be used outside your network. Set it up in Manage or with the Access API. See Restrict a robot token to specific IP addresses.

New features

  • Manage: On the project or organization Tokens page, open a token's three-dot menu and select Add IP allowlist, or fill in the IP allowlist field when you create a token. Restricted tokens show an IP allowlist badge, and you can edit or remove the allowlist from the same menu.
  • Activity log: Adding, changing, or removing an allowlist is recorded in your activity log.

Before you add an allowlist

  • An allowlist holds up to 10 IPv4 addresses or ranges, each /16 or narrower. IPv6 and private ranges aren't accepted.
  • A restricted token only works with api.sanity.io, not the API CDN. In @sanity/client, set useCdn: false.
  • Tokens used by Sanity Functions can't have an allowlist. Sanity-hosted services that call the API with your token, such as Context MCP, can't use a restricted token.
Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change site theme