×Read this message from Erik, founder of YouMagine

Params

Param nameDescription
image
required

Value:

Must be hash

image[name]
optional

name of the image (file name is used by default)


Value:

Must be string.

image[description]
optional

description of the image


Value:

Must be text/html.

image[file]
required

an image file (jpg, jpeg, tiff, bmp or png)


Value:

Must be file.

Supported Formats

json

Examples

Request

POST /v1/designs/gabvine-1/images?auth_token=vyM5hyDtgxSouaEL3Nym
Content-Type: multipart/form-data; boundary=APIPIE_RECORDER_EXAMPLE_BOUNDARY

--APIPIE_RECORDER_EXAMPLE_BOUNDARY
Content-Disposition: form-data; name="image[file]"; filename="example.jpg"
Content-Type: text/plain
Content-Length: 125

... contents of "image[file]" ...
--APIPIE_RECORDER_EXAMPLE_BOUNDARY--

Response

201
{
  "id": 1,
  "name": "Linktype",
  "description": "<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin risus. Praesent lectus.</p>\n\n<p>Vestibulum quam sapien, varius ut, blandit non, interdum in, ante. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Duis faucibus accumsan odio. Curabitur convallis.</p>\n\n<p>Duis consequat dui nec nisi volutpat eleifend. Donec ut dolor. Morbi vel lectus in quam fringilla rhoncus.</p>",
  "user_id": 1,
  "imagable_id": 1,
  "imagable_type": "Design",
  "file": {
    "url": "/spec_uploads/image/file/1/example.jpg",
    "small": {
      "url": "/spec_uploads/image/file/1/small_example.jpg"
    },
    "medium": {
      "url": "/spec_uploads/image/file/1/medium_example.jpg"
    },
    "large": {
      "url": "/spec_uploads/image/file/1/large_example.jpg"
    },
    "span4": {
      "url": "/spec_uploads/image/file/1/span4_example.jpg"
    },
    "span2": {
      "url": "/spec_uploads/image/file/1/span2_example.jpg"
    },
    "span1": {
      "url": "/spec_uploads/image/file/1/span1_example.jpg"
    },
    "mini": {
      "url": "/spec_uploads/image/file/1/mini_example.jpg"
    },
    "grid": {
      "url": "/spec_uploads/image/file/1/grid_example.jpg"
    },
    "carousel": {
      "url": "/spec_uploads/image/file/1/carousel_example.jpg"
    },
    "carousel_thumb": {
      "url": "/spec_uploads/image/file/1/carousel_thumb_example.jpg"
    }
  },
  "created_at": "2016-06-10T12:16:56.240+02:00",
  "updated_at": "2016-06-10T12:16:56.240+02:00",
  "contribution_id": null
}