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

# Import Motion

> Create a reusable Motion from a Viggle template.

Imports an asynchronous Motion asset from a template.

## Request parameters

Send a JSON body.

| Parameter       | Type   | Required | Default | Description                                                           |
| --------------- | ------ | :------: | ------- | --------------------------------------------------------------------- |
| `template_id`   | string |  One of  | —       | Template ID copied from Viggle. Preferred field for new integrations. |
| `template_uuid` | string |  One of  | —       | Backward-compatible alias for `template_id`.                          |
| `name`          | string |    No    | `""`    | Optional label for the imported Motion.                               |

Send `template_id` in new integrations. If both template fields are supplied, `template_id` takes precedence.

## Response parameters

Returns `200 OK` with a Motion object: `id` (public `mot_` ID), `status`, `name`, `progress`, `capabilities`, `created_at`, `completed_at`, and `error`. See [Create Motion](/v1/api-reference/motions/create) for the field-by-field definition.

```json theme={null}
{"id":"mot_550e8400-e29b-41d4-a716-446655440000","status":"queued","name":"Campaign dance","progress":0,"capabilities":[],"created_at":"2026-07-21T10:00:00Z","completed_at":null,"error":null}
```

## Examples

<CodeGroup>
  ```go Go theme={null}
  payload := strings.NewReader(`{"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"}`)
  req, _ := http.NewRequest("POST", "https://apis.viggle.ai/v1/motions/import", payload)
  req.Header.Set("Authorization", "Bearer "+os.Getenv("VIGGLE_API_KEY")); req.Header.Set("Content-Type", "application/json")
  resp, err := http.DefaultClient.Do(req); if err != nil { panic(err) }; defer resp.Body.Close()
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://apis.viggle.ai/v1/motions/import", {method:"POST", headers:{Authorization:`Bearer ${process.env.VIGGLE_API_KEY}`,"Content-Type":"application/json"}, body:JSON.stringify({template_id:"YOUR_TEMPLATE_ID",name:"Campaign dance"})});
  const motion = await response.json();
  ```

  ```python Python theme={null}
  import os, requests
  response = requests.post("https://apis.viggle.ai/v1/motions/import", headers={"Authorization":f"Bearer {os.environ['VIGGLE_API_KEY']}"}, json={"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"})
  response.raise_for_status(); motion = response.json()
  ```

  ```bash cURL theme={null}
  curl -X POST "https://apis.viggle.ai/v1/motions/import" -H "Authorization: Bearer $VIGGLE_API_KEY" -H "Content-Type: application/json" -d '{"template_id":"YOUR_TEMPLATE_ID","name":"Campaign dance"}'
  ```
</CodeGroup>


## OpenAPI

````yaml POST /v1/motions/import
openapi: 3.0.3
info:
  title: Viggle API
  description: Generate AI-powered character animation videos
  version: 2.0.0
  contact:
    name: Viggle Support
    url: https://viggle.ai
servers:
  - url: https://apis.viggle.ai
    description: Production server
security: []
paths:
  /v1/motions/import:
    post:
      summary: Import Motion
      operationId: v1ImportMotion
      responses:
        '200':
          description: Motion

````