> For the complete documentation index, see [llms.txt](https://developer.singular.live/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.singular.live/rest-api/api-reference/send-data-to-a-control-app/update-a-control-apps-animation-state.md).

# Update a control app's animation state

## Update control app animation state

<mark style="color:purple;">`PATCH`</mark> `https://app.singular.live/apiv2/controlapps/:appToken/control`

Animates an overlay to its In or Out state.

#### Path Parameters

| Name                                       | Type   | Description                                                                                                                                                                                                                         |
| ------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| appToken<mark style="color:red;">\*</mark> | String | The shared app token for the app. This is a unique token for this app instance. [How to find the shared app token](/singular-basics/managing-overlays-in-the-dashboard/how-to-find-an-apps-shared-app-token-and-shared-api-url.md). |

#### Request Body

| Name                                                 | Type   | Description                                                                                                                                                                                                                                                                |
| ---------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| subCompositionId<mark style="color:red;">\*</mark>   | String | The sub-composition ID. Either the `subCompositionID` or the `subCompositionName` must be included in the request. Get them from the payload of the [Get control app model](/rest-api/api-reference/get-control-app-details/get-a-control-apps-model.md) request.          |
| state<mark style="color:red;">\*</mark>              | String | <p>Animates an overlay to its In or Out state.</p><p>Supported values: <code>In</code>, <code>Out1</code>, <code>Out2</code></p>                                                                                                                                           |
| subCompositionName<mark style="color:red;">\*</mark> | String | The name of the sub-composition. Either the `subCompositionID` or the `subCompositionName` must be included in the request. Get them from the payload of the [Get control app model](/rest-api/api-reference/get-control-app-details/get-a-control-apps-model.md) request. |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "success": true
}
```

{% endtab %}
{% endtabs %}

### Example request bodies by sub-composition name or ID

{% tabs %}
{% tab title="Subcomposition Name" %}

```json
[
    {
        "subCompositionName": "<subCompositionName>",
        "state": "<toState>"
    }
]
```

{% endtab %}

{% tab title="Subcomposition Id" %}

```json
[
    {
        "subCompositionId": "< string >",
        "state": "< toState >"
    },
    {
        "subCompositionId": "<...>",
        "state": "<...>"
    }
]
```

{% endtab %}
{% endtabs %}

### Animation state

<table><thead><tr><th width="174"> Animation state</th><th>Description</th></tr></thead><tbody><tr><td>In</td><td>Sends an overlay to its <code>In</code> state.</td></tr><tr><td>Out</td><td>Sends an overlay to its <code>Out</code> state. This is the default <code>Out</code> animation.</td></tr><tr><td>Out1</td><td>When there are multiple timelines, <code>Out1</code> animates an overlay <code>Out</code> in reverse of the <code>In</code> animation.</td></tr><tr><td>Out2</td><td>When there are multiple timelines, <code>Out2</code> defines an independent <code>Out</code> animation.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.singular.live/rest-api/api-reference/send-data-to-a-control-app/update-a-control-apps-animation-state.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
