# Annotation Layers

## Create Annotation Layer

<mark style="color:green;">`POST`</mark> `https://api.annolab.ai/v1/layer/create`

Create a new annotation layer for your project&#x20;

#### Headers

| Name          | Type   | Description                                                                                                                                                             |
| ------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authorization | string | <p>Where you put your api key. Creating a project requires a key with "Write" permissions.<br><br><code>{"Authorization": "Api-key XXXXXXX-XXXXXXX-XXXXXXX"}</code></p> |

#### Request Body

| Name              | Type    | Description                                                                                                                                                            |
| ----------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| layerName         | string  | Name of the layer that will be created                                                                                                                                 |
| projectIdentifier | string  | Identifier of the project containing the layer. Either the id or the unique name.                                                                                      |
| isGold            | boolean | boolean for whether the layer being created is a "Gold Set" i.e. a layer with data that will be considered truth when compared against annotation or experiment layers |
| description       | string  | Name of the project you wish to create. Must be unique for your group                                                                                                  |

{% tabs %}
{% tab title="201 Project was successfully created" %}

```
{
    "projectName": "New NER Project",
    "projectId": 1,
    "layerName": "NER Gold",
    "id": 5,
    "isGold": true,
    "description": 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}
```

{% endtab %}

{% tab title="400 Project creation failed" %}

```
{
    "message": "Information about why creation failed"
}
```

{% endtab %}
{% endtabs %}

Examples of how to make a layer create request

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

```python
import requests

ANNO_LAB_API_KEY = 'XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX'

layer = {
  'projectIdentifier': 'New NER Project',
  'layerName': 'NER Gold'
  'isGold': True,
  'description': 'Use the NER Schema for this layer. Only "approved" annotations should be kept in this layer'
}

headers = {
  'Authorization': 'Api-Key '+ANNO_LAB_API_KEY,
}

url = 'https://api.annolab.ai/v1/layer/create'

response = requests.post(url, headers=headers, json=layer)

print(response.json())
```

{% endtab %}
{% endtabs %}
