---
title: "Previews which active agent instances a CIDR allowlist would block."
method: POST
path: "/companies/{identifier}/auth/cidr-blocks/validate"
tags: ["companies"]
---

# Previews which active agent instances a CIDR allowlist would block.

`POST /companies/{identifier}/auth/cidr-blocks/validate`

Requires the privilege [`COMPANY_SECURITY_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Path parameters

- `identifier` string, required

## Request body

- ValidateCidrBlocksRequest — Prospective CIDR blocks to validate against currently active agents.
  - `cidrBlocks` string[], required — IPv4 or IPv6 CIDR blocks to test.

## Response `default`

default response

- ValidateCidrBlocksResponse — Preview of which currently-active agent instances would be blocked.
  - `totalInstances` integer — Total active application instances (seen within last 5 minutes).
  - `blockedInstances` integer — Instances that would be blocked by the supplied CIDR list.
  - `blockedPercent` number, double — Percentage of active instances that would be blocked.
  - `instancesWithUnknownXff` integer — Instances whose last-seen IP is unknown (registered before XFF capture was added); excluded from blocked count.
  - `blockedAgentSample` BlockedInstanceSample[] — Up to 50 blocked instances for debugging.
    - `name` string
    - `instanceId` string
    - `lastSeenXff` string
    - `lastSeen` string
  - `callerIp` string — Source IP of the API caller (from X-Forwarded-For); null if not detectable.
  - `callerBlocked` boolean — Whether the caller's own IP would be blocked by the supplied CIDR list.

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege: COMPANY_SECURITY_WRITE

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/revisions/70fe938a0b35/schema)
