---
title: Add IP Addresses
url: https://docs.vultr.com/platform/other/users/manage-users/api-access/ip-address-whitelisting/add-ip-address
description: Learn how to add IP addresses to your accounts whitelist for secure access management
publish_date: 2025-07-05T12:04:58.352089Z
last_updated: 2025-09-12T21:47:48.348359Z
---

# How to Add IP Addresses to a User's Whitelist

Adding an IP address or subnet to a user's whitelist allows authorized administrators to define which public IPs are permitted to access the Vultr platform on that user’s behalf. This action is restricted to root users or those granted the manage_users permission, maintaining strict access control. Only public IP addresses are allowed, with valid subnet ranges of `/8` to `/32` for IPv4 and `/20` to `/128` for IPv6. The operation is idempotent—repeated additions of the same IP or subnet do not result in errors, making it safe for use in automated access management scripts.

Follow this guide to add IP addresses for a user's whitelist using the Vultr API.

1. Send a `GET` request to the [**Get Users** endpoint](https://www.vultr.com/api/#tag/users/operation/list-users) to view all users and note the user id for the target user.

    ```console
    $ curl "https://api.vultr.com/v2/users" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    ```

1. Send a `POST` request to the [**Add IP to User Whitelist** endpoint](https://www.vultr.com/api/#tag/users/operation/add-user-ip-whitelist) to add IP addresses in the user's whitelist.

    ```console
    $ curl "https://api.vultr.com/v2/users/{user-id}/ip-whitelist" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "subnet" : "8.8.8.0",
            "subnet_size" : 24
        }'
    ```

1. Send a `GET` request to the [**List User IP Whitelist** endpoint](https://www.vultr.com/api/#tag/users/operation/list-user-ip-whitelist) to list confirm the addition of IP addresses.

    ```console
    $ curl "https://api.vultr.com/v2/users/{user-id}/ip-whitelist" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    ```