Update a whitelisting
Replaces the name, the description, the tags and the end date of an active whitelisting.
PUT /organizations/{organizationId}/contexts/sign-in/{contextId}/whitelistings/{whitelistingId}
Permission: Sign In › Sign In Modules › Whitelisting (Write). See API permissions.
- The MAC address stays the same.
- Every field is replaced. A field you leave out is cleared:
no
descriptionremoves the description, notagsremoves the tags, and novalidUntilremoves the end date, so the whitelisting no longer expires. Send the values you keep. - Only an active whitelisting can be changed. A whitelisting that
has ended, by its end date or by a revocation, returns
409with theerrorCodeSIGN_IN_WHITELISTING_ENDED. Create a new whitelisting for the device instead.
The whitelistingId is in the response of
Create a whitelisting
and in the list of active whitelistings.
Request
Section titled “Request”| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organizationId | Path | string | Yes | The Organization ID of the API key. Any other ID returns 404. |
contextId | Path | string | Yes | The ID of a Sign-In Context of the Organization. Any other ID returns 404. |
whitelistingId | Path | string | Yes | The ID of the whitelisting. An unknown ID returns 404. |
name | Body | string | Yes | A name that describes the device, 2 to 100 characters. |
description | Body | string | No | The description, up to 200 characters. Left out, the description is cleared. |
tags | Body | string[] | No | Up to 50 tags, each 2 to 30 characters. Stored in lower case. Left out, the tags are cleared. |
validUntil | Body | string (date) | No | The last day the whitelisting is valid, YYYY-MM-DD, today or later and before 2099-12-31. It ends at the end of that day in the time zone of the platform. Left out, the whitelisting does not expire. |
The name, the description and the tags follow the Validation rules.
Request example
curl -X PUT "$API_BASE_URL/organizations/$ORGANIZATION_ID/contexts/sign-in/$CONTEXT_ID/whitelistings/6aba6cb007a2eda4c7c79ade" \ -H "Authorization: Bearer $NCP_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "name": "Lobby display", "description": "Digital signage, moved to reception", "tags": ["signage", "reception"], "validUntil": "2027-06-30" }'Response
Section titled “Response”200 with the updated whitelisting. The fields are the same as in
Create a whitelisting.
Response example
{ "whitelistingId": "6aba6cb007a2eda4c7c79ade", "mac": "02:00:5e:10:ab:01", "name": "Lobby display", "description": "Digital signage, moved to reception", "tags": ["reception", "signage"], "createdAt": "2026-09-28T13:33:36.341Z", "expiresAt": "2027-06-30T21:59:59.999Z"}Errors
Section titled “Errors”| Status | errorCode | When |
|---|---|---|
400 | VALIDATION_FAILED | A field is missing or breaks a validation rule. errors names each field. Nothing is changed. |
404 | RESOURCE_NOT_FOUND | The context has no whitelisting with this ID, organizationId is not the Organization of the API key, or contextId is not one of its Sign-In Contexts. |
409 | SIGN_IN_WHITELISTING_ENDED | The whitelisting has ended, by its end date or by a revocation. |
{ "type": "about:blank", "title": "Conflict", "status": 409, "detail": "The whitelisting has ended and cannot be changed. Create a new whitelisting for the device.", "errorCode": "SIGN_IN_WHITELISTING_ENDED", "requestId": "0d4b7c29-5e61-4f3a-9a2e-7c18b6e0f453"}Errors common to all operations are in Errors.