---
title: "Save a motion sequence"
method: POST
path: "/motion-sequence"
---

# Save a motion sequence

`POST /motion-sequence`

## Request

- Base URL: `https://embed-api.postnitro.ai`
- URL: `https://embed-api.postnitro.ai/motion-sequence`
- Auth: API key in header `embed-api-key`

Saves a sequence for the workspace, from a video's slide (designId and slide) or from steps by element name. It's the same as Your sequences in the video editor. Reading is open to every key; saving, changing and deleting need an active paid plan, a cancelled one counting until it ends (402 otherwise). A video keeps its own copy of the motion it was given, so changing or deleting one never changes a video already made. Docs: https://postnitro.ai/docs/embed/api/motion-sequences.md

## Headers

- `Idempotency-Key` string

## Request body

- object: A name, and the animations one way: designId with slide, or steps
  - `name` string, required
  - `designId` string: A video in the workspace; with slide
  - `slide` integer: The slide whose animations are saved, counted from 1
  - `steps` MotionStep[]: The steps by element name, as per-slide motion writes them
    - `element` 'title' | 'subtitle' | 'description' | 'cta' | 'image' | 'backgroundImage' | 'infographics' | 'infographicHeader' | 'infographicAndGridTitle' | 'infographicAndGridDescription' | 'avatar' | 'name' | 'handle' | 'slideCount' | 'swipeIndicator' | 'bookmark' | 'backgroundPattern', required: What moves. title is the heading, subtitle the sub_heading, cta the cta_button and backgroundImage the background_image; avatar, name and handle are the brand's
    - `preset` 'fade' | 'rise' | 'slide' | 'zoom' | 'pop' | 'bounce' | 'spring' | 'blur' | 'rotate' | 'flash' | 'split' | 'glitch' | 'shimmer' | 'typewriter' | 'wave' | 'jump' | 'wipe' | 'sweep' | 'count' | 'pulse' | 'float' | 'wiggle' | 'kenburns', required: How it moves. pulse, float and wiggle are emphases, which loop until the slide ends unless repeat says otherwise; kenburns, a slow zoom and drift of a picture or background, plays once over the rest of its slide; sweep draws a text's highlighted words in, like a marker; count counts a text's numbers up from zero; the others bring an element in or take it out
    - `kind` 'enter' | 'emphasis' | 'exit': enter (the default) brings the element in, emphasis (the default for pulse, float, wiggle and kenburns) plays while it stays, and exit takes it out, playing the preset backwards
    - `together` boolean: Start with the previous step instead of after it
    - `delay` number: Seconds to wait before it starts
    - `seconds` number: How long it plays; for text played by line, word or letter, how long each part plays. Omit for the preset's own pace
    - `split` 'line' | 'word' | 'letter': Text only: play it by line, word or letter
    - `direction` 'left' | 'right' | 'up' | 'down': The direction of travel
    - `repeat` union: Emphasis only: how many times it plays, or until the slide ends, the default
      - integer
      - 'until-end'

## Response `200`

OK

- object
  - `success` boolean
  - `message` string
  - `data` object
    - `sequence` MotionTemplateItem: A motion style or sequence. Built-in styles have only id, name, builtIn and summary
      - `id` string: For a style, the value of videoSettings.motionStyle: a built-in style's name or a saved style's id. For a sequence, the value of videoSettings.sequenceId
      - `name` string: As the editor shows it. Saved names needn't be unique
      - `builtIn` boolean: true for PostNitro's styles, which can't be changed or deleted
      - `summary` string: What it does, in a line, e.g. 'Starting slide: Typewriter · Body slides: Clean · Ending slide: Bold' or 'title typewriter/letter → description fade'
      - `motion` object: The stored motion, as the editor keeps it. Saved ones only: when one is read, saved or changed, not in a list
      - `createdAt` string, date-time
      - `updatedAt` string, date-time

## Other responses

- `400`: Motion that can't be used, with the reason: a design that isn't a video, an unknown slide type or style, a step that can't be used and where
- `402`: Saving, changing or deleting without an active paid plan (a cancelled plan counts until it ends)
- `404`: No such id in the workspace (of this kind), or a designId that isn't the workspace's
- `409`: The workspace already keeps 100 of this kind
- `422`: The body's shape: a missing name, motion given no way or more than one, an unknown field

---

[API](https://skmtc.dev/postnitro/apis/postnitro-embed-api.md) - [All operations](https://skmtc.dev/postnitro/apis/postnitro-embed-api/llms.txt) - [OpenAPI document](https://skmtc.dev/postnitro/apis/postnitro-embed-api/revisions/428cb3ea3f6a?raw)
