Skip to content
Logo

api.apiKeys.update

Replace a key's IP allow-list. Full replacement, not a merge. Send the complete desired set every time. An empty array clears all restrictions.

const  = await ..(, {
  : ["203.0.113.4", "10.0.0.0/8"],
});
.(.); // ["203.0.113.4/32", "10.0.0.0/8"]
 
// Clear all restrictions:
await ..(, { : [] });
ArgumentType
idstring
req{ ip_allowlist: string[] }

Returns: Promise<ApiKey>, the updated key with its normalized allow-list.

Throws: ApiError 400 InvalidRequest (bad entry or over 50 entries), 404 ApiKeyNotFound, 403 ApiKeyRevokeForbidden (caller is neither owner/admin nor the key's creator).

REST endpoint: PATCH /auth/api-keys/{id}.