Unprocessable Entity

I’m getting a 422 Unprocessable Entity when trying to create a droplet via postman.

First, a GET to gives me a list of droplet images. Let’s say I want to base my droplet on this one…

      "id": 13764801,
      "name": "Elixir on 14.04",
      "distribution": "Ubuntu",
      "slug": null,
      "public": true,
      "regions": [
      "created_at": "2015-09-30T15:42:07Z",
      "min_disk_size": 30,
      "type": "snapshot",
      "size_gigabytes": 1.85

So I POST to with this request body:

 "name" : "512-auto",
 "region" : "lon1",
 "size" : "512mb",
 "image" : "Elixir on 14.04",
 "ssh_keys" : ["a9:a2:b4:d2:4f:79:32:22:9d:e3:68:72:11:11:aa:aa"]

I get a 422 error… How do I make this work?


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.

Hi @adam95c2fc3ac28a1681a23714

The image needs to be either a number (if using an image id), or String (if using a public image slug), so since the image you’re listing doesn’t have a slug I would think you need to use the id:

 "name" : "512-auto",
 "region" : "lon1",
 "size" : "512mb",
 "image" : 13764801,
 "ssh_keys" : ["a9:a2:b4:d2:4f:79:32:22:9d:e3:68:72:11:11:aa:aa"]