Can I create a Debian 8 droplet via the API?

If I create a droplet from the control panel I can choose Debian 8 x64 but if I list all the images available from the API there is no Debian 8, only Debian 7 and 6. How do I create a Debian 8 droplet via the API?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

To create a Debian 8 Droplet via the API, you can use the slug debian-8-x64 or debian-8-x32 For example:

curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" \
    -d '{"name":"example","region":"nyc3","size":"512mb","image":"debian-8-x64"}' \

The issue that you likely ran into was that lists returned via the API are paginated. By default, you only receive the first 25 items and need to make another call to receive the next page of results. You can request more items per page by appending ?per_page=200 to the URL in the call.