---
title: "Update a sequence"
method: PATCH
path: "/v1/sequences/{id}"
tags: ["Sequences"]
---

# Update a sequence

`PATCH /v1/sequences/{id}`

## Request

- Base URL: `https://api.sprixen.com`
- URL: `https://api.sprixen.com/v1/sequences/{id}`
- Auth: `bearer` (a scheme the document does not define)

All fields are optional. Providing clips triggers full replacement of clipsJson and recomputes durationMs. Each clip's animationId is re-validated against the sprite.

## Path parameters

- `id` string, required

## Request body

- UpdateSequenceDto
  - `name` string: New name for the sequence
  - `loopMode` 'forever' | 'once' | 'pingpong': How the sequence loops: forever, once, or pingpong
  - `clips` SequenceClipDto[]: Full replacement of clips array. If provided, all existing clips are replaced.
    - `id` string, required: Local clip ID — stable across reorders (drag-drop key)
    - `animationId` string, required: ID of the Animation record this clip references
    - `repeat` number, required: How many times to repeat this clip. Use -1 for terminal infinite loop.
    - `speedMultiplier` number: Speed multiplier for this clip. Default 1.0.
    - `transitionOut` TransitionOutDto
      - `type` 'cut' | 'hold' | 'crossfade', required: Transition type: cut (instant), hold (freeze a frame), crossfade (opacity blend)
      - `durationMs` number: Duration in ms — required for hold and crossfade, ignored for cut
      - `holdFrameIndex` number: For hold: which frame index to freeze (default: last frame)
  - `metadata` object: Free-form metadata (tags, notes, etc.)

## Response `200`

Sequence updated

## Other responses

- `400`: Invalid input
- `403`: Access denied
- `404`: Sequence not found

---

[API](https://skmtc.dev/sprixen/apis/sprixen-api.md) · [All operations](https://skmtc.dev/sprixen/apis/sprixen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sprixen/apis/sprixen-api/revisions/6c0c57f6da58?raw)
