# Create a live entity

## /v1/live-entities

<mark style="color:green;">`POST`</mark> `https://api.uiza.io/api-live/owner/v1/live-entities`

#### Request Body

| Name               | Type    | Description                                                                                                                                                  |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name               | string  | The entity's name.                                                                                                                                           |
| description        | string  | An arbitrary string attached to the object. Often useful for displaying to users.                                                                            |
| dvr                | boolean | Indicates whether Digital Video Record (DVR) is enabled for the live\_entity. Set as `true` to enable and as `false` to disable. The default value is false. |
| encoding\_template | string  | Indicates whether encoding mode is enabled for the live\_entity. Set as `sd, hd` or `fhd` to enable and as `none` to disable.                                |

{% tabs %}
{% tab title="200 " %}

```
{
  "data": {
    "id": "2b970a39-874a-4d2a-be8a-fd445646d74c",
    "name": "Test event without encoding",
    "description": "Event for Test",
    "region": "in-bangalore-1",
    "status": "init",
    "dvr": false,
    "encoding_template": "none",
    "ingest": null,
    "playback": null,
    "relay": [],
    "created_at": "2020-03-23T07:22:34Z",
    "updated_at": "2020-03-23T07:22:34Z"
  }
}
```

{% endtab %}

{% tab title="400 " %}
{% tabs %}
{% tab title="Missing name" %}

```
{
  "message": "Your request is missing name parameter. Please, verify and resubmit.",
  "error_type": "invalid_request_error"
}
```

{% endtab %}

{% tab title="Missing region" %}

```
{
  "message": "Your request is missing region parameter. Please, verify and resubmit.",
  "error_type": "invalid_request_error"
}
```

{% endtab %}

{% tab title="Invalid region" %}

```
{
  "message": "The requested region is invalid. See the list of available regions here: docs.uiza.io/getting-started/regions.",
  "error_type": "invalid_request_error"
}
```

{% endtab %}
{% endtabs %}
{% endtab %}

{% tab title="401 " %}

```
{
  "message": "You are unauthorized to access the requested resource. Please verify and resubmit.",
  "error_type": "invalid_request_error"
}5
```

{% endtab %}

{% tab title="500 " %}

```
{
  "message": "An unexpected error occurred on Uiza's end.",
  "error_type": "api_error"
}
```

{% endtab %}
{% endtabs %}

{% code title="Sample Request" %}

```
curl --location --request POST 'https://api.uiza.io/api-live/owner/v1/live-entities' \
--header 'Authorization: <token>' \
--header 'uiza-app-id: <your_app_id>' \
--data-raw '{
    "name": "Test event with encoding",
    "description": "Event for Test",
    "encoding_template": "sd"
}'
```

{% endcode %}
