---
title: "Rotate a photo or video"
method: POST
path: "/v1/media/{id}/rotate"
tags: ["media"]
---

# Rotate a photo or video

`POST /v1/media/{id}/rotate`

## Request

- Base URL: `https://api.brixsignage.com`
- URL: `https://api.brixsignage.com/v1/media/{id}/rotate`
- Auth: HTTP bearer

Rotate a photo or video 90, 180, or 270 degrees clockwise. This rewrites the stored file rather than only changing how it is displayed, since playback devices cannot rotate video at display time. Images are rotated immediately; video rotation is queued, and the asset keeps playing its current version until the rotated file is ready.

**Notes.**
- Photos rotate now (`rotated`); videos are re-encoded in the background (`queued`).

## Path parameters

- `id` string, required

## Request body

- object
  - `degrees` union, required: Clockwise.
    - 90
    - 180
    - 270

## Response `200`

Success.

- object
  - `data` union, required
    - object
      - `ok` true, required
      - `outcome` 'rotated', required
      - `width` integer, nullable, required
      - `height` integer, nullable, required
      - `rotation` union, required
        - 0
        - 90
        - 180
        - 270
    - object
      - `ok` true, required
      - `outcome` 'queued', required
      - `rotation` union, required
        - 0
        - 90
        - 180
        - 270

## Other responses

- `400`: `degrees` is not 90, 180 or 270, or the item is not a photo or video.
- `401`: Missing, expired or revoked bearer token.
- `403`: The token lacks the permission this operation needs (see `x-brix-permission`).
- `404`: No media with this id, or its bytes are gone.
- `409`: A rotation is already running.
- `502`: The image service failed.
- `503`: Rotation is not available.
- `5XX`: Server error. The body carries a `requestId` to quote to support.

---

[API](https://skmtc.dev/brixsignage/apis/brix-api.md) · [All operations](https://skmtc.dev/brixsignage/apis/brix-api/llms.txt) · [OpenAPI document](https://skmtc.dev/brixsignage/apis/brix-api/revisions/02fd3665dc7d?raw)
