Can You Use the API to Create WordPress or Rails Droplets

December 15, 2014 4k views


I’ve searched around for this answer and come up short, which either means it’s not possible or it’s not a popular discussion.

Using the API, I am wondering if you’re able to create a Droplet using one of the |1-Click Apps" you have.

So for instance, I want to spin up a Droplet, using the API that will have WordPress or Rails installed on it and ready to go from the start (so not installation required on my part)

Look forward to a reply.


3 Answers

You can definitely launch One-Click applications via the API. Each public image has a “slug” that you can use to launch an image. You can also filter the list of images to only show application images:

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

That will provide you with a list of images like:

    "min_disk_size": 20,
    "created_at": "2014-09-28T21:34:48Z",
    "regions": [
    "public": true,
    "slug": "wordpress",
    "distribution": "Ubuntu",
    "name": "WordPress on 14.04",
    "id": 6423475

Here you see that the image’s slug is “wordpress” To launch a WordPress droplet, you can run:

curl -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer '$TOKEN'' -d \
    '{"name":"","region":"nyc3","size":"2gb","image":"wordpress"}' \

There’s no difference between creating a droplet from say a Debian image or a Wordpress image. It’s the same API call.

  • So correct me if I’m wrong…

    In this part of the API:

    "image": "ubuntu-14-04-x64",

    Instead of putting Ubuntu, I can put “WordPress”?

  • The documentation for the create call describes what to put in the parameter:

    “The image ID of a public or private image, or the unique slug identifier for a public image. This image will be the base image for your Droplet.”

    And you would retrieve those using the typical image listing calls.

Have another answer? Share your knowledge.