How to Restore a Deleted Role

Updated on 08 April, 2026

Restore a previously deleted IAM role on Vultr. Recover the role and its policy attachments to reassign it to users and groups in your organization's IAM.


Restoring a deleted role reinstates it along with its previous configuration. This is useful when a role was deleted by mistake or when you need to recover access configurations that were managed under that role.

Note
To restore a deleted role, you must have the role's id.

This guide explains how to restore a previously deleted role using the Vultr API.

  1. Send a PATCH request to the Restore Role endpoint to restore the deleted role. Replace {role-id} with the id of the deleted role.

    console
    $ curl "https://api.vultr.com/v2/roles/{role-id}/restore" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a GET request to the Read Role endpoint to retrieve the role details.

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

    Verify that the role details are intact.

Comments