How to restore a deleted droplet from snapshot through API?

Posted April 20, 2020 534 views
DigitalOcean API and CLI (doctl)

I have a droplet, took a snapshot and deleted it. How to restore the droplet through API?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello, @cto3a70ae5eca1d2b3153833c5

In order to launch a new droplet based on a snapshot, you need to supply it’s ID for the image parameter:

curl -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer $TOKEN' -d \

Hope this helps!