# Create an instance

`POST /v1/outputs/{id}/instances`

Prepares an instance of a component on an output, so it's ready to take with `in`. It shows in the control room straight away.

## Path parameters

- `id` (string, required): The output's id.

## Body

- `componentId` (string, required): A component in the version the output plays.
- `name` (string, required): What operators see, up to 120 characters.
- `data` (object): Values by field key. Defaults to none, so the component's defaults show.

## Response

The new instance, with the `id` to send as `instance` on [in](https://docs.airframe.tv/api/commands#in).

## Example request

```sh
curl -X POST https://api.airframe.tv/v1/outputs/OUTPUT_ID/instances \
  -H "Authorization: Bearer $AIRFRAME_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "componentId": "lower-third",
  "name": "Jane Doe, head coach",
  "data": {
    "name": "Jane Doe",
    "title": "Head coach"
  }
}'
```

### 201 Created

```json
{
  "id": "4c1d…",
  "componentId": "lower-third",
  "name": "Jane Doe, head coach",
  "data": {
    "name": "Jane Doe",
    "title": "Head coach"
  }
}
```

### 404 Not found

```json
{
  "error": "No component lower-thrid in the active version",
  "code": "not_found"
}
```
