# Create a tag

Source: https://www.jawsdeploy.net/rest-api/tags-create | Section: Tags

Create a new tag in a workspace.

`POST /api/tag`

Creates a tag the workspace can apply to deployment targets and variable values.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `workspaceId` | body | string | yes | ID of the workspace. |
| `tagName` | body | string | yes | Tag name. |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `workspaceId` or validation failure. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks the required role. |

Example request:

```
POST /api/tag

{ "workspaceId": "ws_abc", "tagName": "us-east" }
```

Example response:

```
{ "tagId": "tag_1" }
```

