Question

Where can i find slug identifier for size while creating droplet by API

I found php script to create droplet by API but it only creates shared type of droplet… i need to dynamically change slug identifier in API. But i didn’t find any explanation for “Size slug identifier” in API documentation mentioned at https://docs.digitalocean.com/reference/api/api-reference/#operation/create_droplet Anyone please know how can i pass Size value to create cpu and memory optimized droplet.


Submit an answer

This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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 list all of available Droplet sizes, send a GET request to /v2/sizes.

Hello @jotjpn ,

The slugs for different Droplet plans can be found here https://slugs.do-api.dev/

You can also check the available sizes with the following API https://docs.digitalocean.com/reference/api/api-reference/#operation/list_all_sizes

The desired size can be provided in the ‘size’ field when creating a new Droplet. https://docs.digitalocean.com/reference/api/api-reference/#operation/create_droplet

Hope this helps!

Cheers, Lalitha