> ## Documentation Index
> Fetch the complete documentation index at: https://docs.motion.so/llms.txt
> Use this file to discover all available pages before exploring further.

# API versions

> How Motion versions REST and MCP contracts, how API keys pin versions, how to upgrade a key, and full version history.

Motion uses immutable, date-based API version identifiers (such as `2026-11-19`) so your integrations stay stable as the API evolves.

## How version selection works

Every authenticated REST and MCP request resolves its API version in this exact order:

1. **Per-request header override (`Motion-API-Version`):** If you include `Motion-API-Version` on a request, Motion uses that version for **that request only**—it never changes your key's saved version.
2. **Your credential's pinned API version (default when header is omitted):** If you omit `Motion-API-Version`, Motion automatically uses the API version pinned to the API key or OAuth connection that authenticated the request.
   * **New API keys** default to the current version (`2026-11-19`), or you can choose an earlier version when creating the key.
   * **Existing API keys & OAuth connections** stay pinned to their version until you choose to upgrade them—releases never silently break running integrations.

```bash theme={null}
# Omit Motion-API-Version to use your key's pinned version:
curl https://api.motion.so/api/motion/templates \
  -H "Authorization: Bearer $MOTION_API_KEY"

# Or override per request to test a different version safely:
curl https://api.motion.so/api/motion/templates \
  -H "Authorization: Bearer $MOTION_API_KEY" \
  -H "Motion-API-Version: 2026-11-19"
```

Every authenticated REST and MCP response echoes the resolved version in the `Motion-API-Version` response header.

## Change an API key's version

You can change an existing key's default API version in place without rotating secrets:

1. Open **Settings → Integrations → API keys** in Motion and select the key's workspace.
2. Click the **API `<version>`** selector next to the key you want to update.
3. Choose the target version and confirm.

> [!NOTE]
>
> Switching a key's version takes effect immediately for all requests using that key that **omit** `Motion-API-Version`. Requests that send an explicit `Motion-API-Version` header are unaffected. To test safely before switching a production key, send `Motion-API-Version: 2026-11-19` on staging requests first.

## Version history

**2026-11-19**

Current

**Project-focused API runtime & saved templates catalog**

* **Project execution:** `POST /projects` and `POST /projects/{id}/messages` optimize directly for producing finalized video and image compositions, with strict fail-closed validation and structured `error` details on failed turns.
* **Saved templates on `GET /templates`:** `GET /templates` and MCP `list_templates` return your workspace's saved reusable templates with cursor pagination (requires `motion:templates:read`).
* **Turn history, turn-scoped messages & idempotency:** `GET /projects/{id}` returns `latest_turn_id`, `GET /projects/{id}/turns` lists turns newest-first (with optional `created_after` / `created_before` date filters and linked `generation_id` / `export_ids`), `GET /projects/{id}/messages` supports `turn_id` filtering, and `POST /brand-kits` and `POST /templates` support `Idempotency-Key`.
* **Canonical `snake_case` responses & generation-first social posts:** Standardizes REST and full-MCP response field names on `snake_case` (such as `upload_url`, `media_url`, `account_name`, and `asset_id`) and removes `revision` from social post payloads.
* **Project scopes:** Standardized on `motion:projects:read` and `motion:projects:write` (`motion:sessions:*` remains supported as an alias).

[Browse `2026-11-19` API Reference](https://docs.motion.so/api) · [OpenAPI JSON](https://docs.motion.so/openapi.json)

**2026-10-22**

Legacy

**Initial Motion API & MCP release**

* **`GET /templates` & MCP `list_templates`:** Returns the built-in template catalog (`engine` + `templates`). Saved templates remain accessible via `GET /templates/list` and MCP `list_saved_templates`.
* **Original response field shapes:** Preserves the initial camelCase response fields for social uploads (`uploadUrl`, `mediaUrl`), social accounts (`accountName`, `agentEnabled`), social posts (including `revision`), brand kit section assets (`assetId`), and automations.
* **Projects & `/sessions`:** Runs `/projects` through the API video-production runtime while keeping deprecated single-video `/sessions` routes available for existing integrations.

[Browse `2026-10-22` API Reference](https://docs.motion.so/api/2026-10-22/list-templates) · [`2026-10-22` OpenAPI JSON](https://docs.motion.so/2026-10-22/openapi.json)

## Upgrading from `2026-10-22` to `2026-11-19`

1. Test your integration by sending the `Motion-API-Version: 2026-11-19` header on requests without changing your key yet.
2. If you call `GET /templates` or MCP `list_templates`, update your client for cursor-paginated saved templates and ensure your credential includes `motion:templates:read`.
3. Switch your existing key to `2026-11-19` in **Settings → Integrations → API keys** (or create a new key, which defaults to `2026-11-19`).

## Migrating from deprecated `/sessions` endpoints

Previously released `/sessions` endpoints and single-video MCP tools remain callable for existing integrations, but new integrations should use `/projects`:

| Deprecated surface (`2026-10-22`) | Current replacement (`2026-11-19`) |
| - | - |
| `POST /sessions` (`create_video`) | `POST /projects` (`create_project`) |
| `POST /sessions/{id}/followups` (`create_followup`) | `POST /projects/{id}/messages` (`send_project_message`) |
| `GET /sessions/{id}` (`get_session_status`) | `GET /projects/{id}` (`get_project`) |
| URL-based `attachments: [{ url }]` | Library uploads (`POST /uploads` → `attachments: [{ asset_id }]`) or URLs in `prompt` |
| `GET /templates/list` (`list_saved_templates`) | `GET /templates` (`list_templates`) |
| `motion:sessions:read` / `write` | `motion:projects:read` / `write` *(aliases remain valid)* |
| `engine` / `mode` / `aspect_ratio` / `duration` fields | Describe format, length, and style in `prompt`; optionally set `effort` on creation |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.