Upload image
Add an image to your Media Library from a URL, to use on products.
POST https://cotlet.dev/api/v1/printify/images
write
Uploads an image from a public URL to your Printify Media Library and returns its ID, size and type. Reuse the ID on any product. It reaches no customer and you can archive the image later, so it runs without asking first.
Parameters
| Name | Type | Description |
|---|---|---|
| file_name string required | string | Name shown in the Media Library. |
| url string required | string | Public URL of the image. |
Request
curl -X POST https://cotlet.dev/api/v1/printify/images \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_name":"file name","url":"https://example.com"}' result = client.call("printify", "upload_image", {"file_name":"file name","url":"https://example.com"}) const result = await cotlet.call('printify', 'upload_image', {"file_name":"file name","url":"https://example.com"}); cotlet call printify upload_image --data '{"file_name":"file name","url":"https://example.com"}' Example response
{
"image_id": "5d39b159e7c48c000728c89f",
"file_name": "night-owl.png",
"width": 4000,
"height": 4000,
"mime_type": "image/png"
}