Skip to main content
curl -X POST "$API_BASE_URL/v1/org/$ORG_ID/contexts/sign-in/$CTX_ID/modules/whitelistings/batch/add" \
  -H "x-auth-token: $NETGRAPH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "whitelistings": [
      { "mac": "AA:BB:CC:00:00:01", "name": "Printer A" },
      { "mac": "AA:BB:CC:00:00:02", "name": "Printer B" }
    ],
    "autoGenerateTags": true,
    "autoGenerateDateTag": true
  }'
{
  "createdWhitelistingMacs": ["AA:BB:CC:00:00:01", "AA:BB:CC:00:00:02"],
  "existingWhitelistingMacs": [],
  "faultyRequests": [],
  "updatedLogins": 0
}
Bulk-create whitelist entries. Entries that already exist (same MAC) are skipped and returned in existingWhitelistingMacs. Entries that fail validation are returned in faultyRequests for inspection.

Request

organizationId
string
required
Organization ID.
contextId
string
required
Sign-In Context ID.
x-auth-token
string
required
Context API key.
whitelistings
object[]
required
Array of whitelist entries to create.
autoGenerateTags
boolean
default:"false"
When true, tags derived from the batch (e.g. source integration) are attached to every created entry.
autoGenerateDateTag
boolean
default:"false"
When true, each created entry gets a tag carrying the current date — useful when you rotate batches daily.
curl -X POST "$API_BASE_URL/v1/org/$ORG_ID/contexts/sign-in/$CTX_ID/modules/whitelistings/batch/add" \
  -H "x-auth-token: $NETGRAPH_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "whitelistings": [
      { "mac": "AA:BB:CC:00:00:01", "name": "Printer A" },
      { "mac": "AA:BB:CC:00:00:02", "name": "Printer B" }
    ],
    "autoGenerateTags": true,
    "autoGenerateDateTag": true
  }'

Response

createdWhitelistingMacs
string[]
MACs that were newly created.
existingWhitelistingMacs
string[]
MACs that were already in the whitelist and were therefore skipped.
faultyRequests
object[]
Entries that failed validation. Each entry matches the input shape so you can re-submit after fixing the data.
updatedLogins
integer
Number of existing guest sessions updated as a side-effect of the batch (e.g. moved to a whitelist-authorized state).
{
  "createdWhitelistingMacs": ["AA:BB:CC:00:00:01", "AA:BB:CC:00:00:02"],
  "existingWhitelistingMacs": [],
  "faultyRequests": [],
  "updatedLogins": 0
}