Robot tokens accept an IP allowlist

Published: November 27, 2026

v2025-07-11

The Access API robots endpoints now accept and return an IP allowlist for each robot token. Requests made with the token from any other address are refused. Available to Enterprise organizations on v2025-07-11.

New features

  • Robots: POST /access/{resourceType}/{resourceId}/robots and PUT /access/{resourceType}/{resourceId}/robots/{robotId} accept networkPolicy. Set networkPolicy to null to remove the allowlist. Both GET endpoints return networkPolicy, or null for a token without one. See Restrict a robot token to specific IP addresses and the Access API reference.
{
  "networkPolicy": {
    "allowedSourceCidrs": ["34.120.10.5", "34.121.0.0/24"]
  }
}

Changes

  • Robots: PUT /access/{resourceType}/{resourceId}/robots/{robotId} no longer requires expiresAt. Send expiresAt, networkPolicy, or both. See Authentication and tokens.

Before you use it

  • An allowlist holds up to 10 IPv4 addresses or ranges, each /16 or narrower. IPv6, private ranges, hostnames, and wildcards are rejected with HTTP 400 and a network_policy_* error code.
  • Organizations without the feature get HTTP 403 with Robot network policies are not available for this organization. Removing an allowlist with null always works.
  • Tokens used by Sanity Functions can't have an allowlist, and a robot can't set or remove its own allowlist.
Sanity logosanity.ioAll Systems Operational© Sanity 2026
Change site theme