---
title: "Photos · API docs — Reeflip"
description: "Photos are added to your business first, then used by products, the logo and covers. Upload a file in two steps, or add one from a web address."
url: "https://reeflip.com/docs/photos"
---

# Photos · API docs — Reeflip

Photos are added to your business first, then used by products, the logo and covers. Upload a file in two steps, or add one from a web address.

Needs a key with Media access: Read for GET requests, Read and write for the rest.

Every request follows [How requests work](https://reeflip.com/docs/requests.md).

## What a photo upload takes

`GET /photos/upload-rules`

The file types and the largest size Start uploading a photo accepts. With `product_id`, the answer also names the product the photos are for, which needs read access to Products.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `product_id` | id | No | The product the photos are for. |

### Example

```sh
curl https://app.reeflip.com/api/v1/photos/upload-rules \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 200 OK

```json
{
  "content_types": [
    "image/jpeg"
  ],
  "max_size_bytes": 1,
  "product": {
    "id": "fbaa4951-a9dd-4ad3-a05a-c240889485c8",
    "title": "Oak dining chair",
    "photo_count": 1
  }
}
```

Other errors: `product_not_found`

## Start uploading a photo

`POST /photos/uploads`

Step 1 of an upload. Gives you a signed link that uploads one photo straight to storage, for 15 minutes: JPEG, PNG, WebP, AVIF or HEIC, up to 25 MB.

The type and exact size are part of the signature, so the link refuses any other file. Send the file with the answer's `method`, `url` and `headers`, then call Add an uploaded photo with its `photo_id`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `content_type` | text | Yes | The type the file will be sent as: image/jpeg, image/png, image/webp, image/avif or image/heic. |
| `size` | number | Yes | The file's exact size in bytes; up to 25 MB. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/photos/uploads \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "content_type": "image/jpeg",
    "size": 482133
  }'
```

### Response: 200 OK

```json
{
  "photo_id": "64122769-d048-43f3-ae7a-5db8b7b9f076",
  "method": "",
  "url": "https://cdn.reeflip.com/p/oak-chair.jpg",
  "headers": {},
  "expires_at": "2026-12-02T09:30:00Z"
}
```

Other errors: `photo_too_large`, `photo_type_not_allowed`

## Add an uploaded photo

`POST /photos`

Step 2 of an upload. Adds the photo you sent with the link from Start uploading a photo. Until the file has arrived you get `photo_not_uploaded`.

The type is read from the file itself: a file that isn't a JPEG, PNG, WebP, AVIF or HEIC photo is deleted and refused with `photo_type_not_allowed`, whatever its name. With `product_id`, the photo also joins that product after its last photo, which needs write access to Products. When the product already has as many photos as your plan allows, the photo is not added, its file is deleted, and the answer is `plan_limit`. Adding the same photo again gives the same answer.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `photo_id` | id | Yes | From Start uploading a photo. |
| `filename` | text | No | The file's name on your computer, to recognise it by. |
| `product_id` | id | No | A product the photo joins, after its last photo. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/photos \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "photo_id": "4972af8e-9835-4df3-adca-b6f961ae71f5",
    "product_id": "6f1c2a90-3b7e-4d15-9a0c-81e4f2b6d7a3"
  }'
```

### Response: 201 Created

```json
{
  "id": "fbaa4951-a9dd-4ad3-a05a-c240889485c8",
  "filename": "oak-chair.jpg",
  "content_type": "image/jpeg",
  "size_bytes": 482133,
  "status": "ready",
  "created_at": "2026-12-02T09:30:00Z",
  "width": 1600,
  "height": 1200,
  "placeholder": "",
  "jpeg_width": 1600,
  "webp_widths": [
    480,
    960,
    1600
  ],
  "avif_widths": [
    480,
    960,
    1600
  ],
  "url": "https://cdn.reeflip.com/p/oak-chair.jpg"
}
```

Other errors: `product_not_found`, `photo_not_uploaded`, `photo_too_large`, `photo_type_not_allowed`, `plan_limit`

## Add a photo from a web address

`POST /photos/from-url`

Fetches a photo from a public web address and adds it to your business: JPEG, PNG, WebP, AVIF or HEIC, up to 25 MB. With `product_id`, the photo also joins that product after its last photo, which needs write access to Products. A product has as many photos as your plan allows; one more gets `plan_limit`.

Its sizes are made in the background: `status` is `uploaded`, then `ready`. Only public http or https addresses are fetched, with at most three redirects; anything else gets `photo_url_refused`. An address that doesn't answer with a photo gets `photo_url_unreachable`, `photo_type_not_allowed` or `photo_too_large`.

### Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | text | No | A public http or https address of the photo. |
| `product_id` | id | No | A product the photo joins, after its last photo. |

### Example

```sh
curl -X POST https://app.reeflip.com/api/v1/photos/from-url \
  -H "Authorization: Bearer $REEFLIP_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://northwood.example/photos/oak-chair.jpg",
    "product_id": "6f1c2a90-3b7e-4d15-9a0c-81e4f2b6d7a3"
  }'
```

### Response: 201 Created

```json
{
  "id": "fbaa4951-a9dd-4ad3-a05a-c240889485c8",
  "filename": "oak-chair.jpg",
  "content_type": "image/jpeg",
  "size_bytes": 482133,
  "status": "ready",
  "created_at": "2026-12-02T09:30:00Z",
  "width": 1600,
  "height": 1200,
  "placeholder": "",
  "jpeg_width": 1600,
  "webp_widths": [
    480,
    960,
    1600
  ],
  "avif_widths": [
    480,
    960,
    1600
  ],
  "url": "https://cdn.reeflip.com/p/oak-chair.jpg"
}
```

Other errors: `product_not_found`, `photo_url_refused`, `photo_url_unreachable`, `photo_type_not_allowed`, `photo_too_large`, `plan_limit`

## Get a photo

`GET /photos/{photo_id}`

One of your photos. Its sizes are made after it is added: `status` is `uploaded` until they are, then `ready`, or `failed` if the file couldn't be read as a photo.

### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `photo_id` | id | Yes | The photo's id. |

### Example

```sh
curl https://app.reeflip.com/api/v1/photos/b4e75e23-7a18-49a2-a673-22c36eca0f63 \
  -H "Authorization: Bearer $REEFLIP_KEY"
```

### Response: 200 OK

```json
{
  "id": "fbaa4951-a9dd-4ad3-a05a-c240889485c8",
  "filename": "oak-chair.jpg",
  "content_type": "image/jpeg",
  "size_bytes": 482133,
  "status": "ready",
  "created_at": "2026-12-02T09:30:00Z",
  "width": 1600,
  "height": 1200,
  "placeholder": "",
  "jpeg_width": 1600,
  "webp_widths": [
    480,
    960,
    1600
  ],
  "avif_widths": [
    480,
    960,
    1600
  ],
  "url": "https://cdn.reeflip.com/p/oak-chair.jpg"
}
```

Other errors: `photo_not_found`
