Create and manage Vultr API keys for other users with admin credentials securely.
Creating an additional API key for a user allows you to isolate access per integration, improving security and simplifying credential management. This enables better access control and easier rotation of credentials.
Follow this guide to create a user API key using the Vultr Customer Portal or Vultr API.
Send a GET request to the Get Users endpoint to list all users.
$ curl "https://api.vultr.com/v2/users" \
    -X GET \
    -H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the user for whom you want to create an API key.
Send a POST request to the Create User API Key endpoint and specify the user ID to create a new API key for the target user.
$ curl "https://api.vultr.com/v2/users/{user-id}/apikeys" \
    -X POST \
    -H "Authorization: Bearer ${VULTR_API_KEY}" \
    -H "Content-Type: application/json" \
    --data '{
        "name": "<api-key-name>",
        "expire": true,
        "date_expire": "2030-01-01T00:00:00Z"
    }'
The response includes the newly generated API key in plain text. This is the only time the key is visible. Copy and store it in a secure location as you cannot view or recover it later from the portal or API.