> ## Documentation Index
> Fetch the complete documentation index at: https://developers.nutshell.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a tag

Create a tag. Tags are used to organize leads, contacts, and accounts into groups.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Nutshell API",
    "description": "The most powerful API in the world",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "app.nutshell.com/rest"
    }
  ],
  "paths": {
    "/tags": {
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Create a tag",
        "description": "Create a tag. Tags are used to organize leads, contacts, and accounts into groups.",
        "operationId": "88c135d662e0a79e2a0c5fdf337ba537",
        "requestBody": {
          "description": "Name and tagType are required.",
          "required": true,
          "content": {
            "json": {
              "schema": {
                "properties": {
                  "tags": {
                    "type": "array",
                    "items": {
                      "properties": {
                        "name": {
                          "type": "string",
                          "example": "Enterprise"
                        },
                        "colorType": {
                          "description": "Use '1' for default, '2' for grey, '3' for red, '4' for light red, '5' for orange, '6' for light orange, '7' for yellow, '8' for light yellow, '9' for blue, '10' for light blue, '11' for green, '12' for light green, '13' for purple, '14' for light purple",
                          "type": "string",
                          "enum": [
                            "1",
                            "2",
                            "3",
                            "4",
                            "5",
                            "6",
                            "7",
                            "8",
                            "9",
                            "10",
                            "11",
                            "12",
                            "13",
                            "14"
                          ]
                        },
                        "tagType": {
                          "description": "Use '1' for leads, '2' for contacts, '3' for accounts",
                          "type": "string",
                          "enum": [
                            "1",
                            "2",
                            "3"
                          ]
                        },
                        "links": {
                          "description": "Array of entity IDs to link the tag to",
                          "properties": {
                            "entities": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  }
                },
                "type": "object"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "tags": {
                      "description": "Contains the created tag",
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Tag"
                      }
                    }
                  },
                  "type": "object"
                }
              }
            }
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Tag": {
        "properties": {
          "id": {
            "description": "The API ID of this entity, formatted {integer}-{entityType}",
            "type": "string",
            "example": "3-contacts"
          },
          "name": {
            "type": "string",
            "example": "Enterprise"
          },
          "href": {
            "type": "string",
            "example": "https://app.nutshell.com/rest/tags/1-tags"
          },
          "modifiedTime": {
            "description": "Unix timestamp",
            "type": "integer",
            "format": "int32",
            "example": 31536000
          },
          "deletedTime": {
            "description": "Unix timestamp",
            "type": "integer",
            "format": "int32",
            "example": 31536000
          },
          "tagType": {
            "description": "The type of entity the tag corresponds to",
            "type": "string",
            "example": "leads"
          },
          "count": {
            "description": "The number of entities with this tag",
            "type": "integer",
            "format": "int32",
            "example": "1"
          },
          "colorType": {
            "description": "The color or the tag, returned as a string",
            "type": "string",
            "example": "COLOR_ORANGE"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "tags": [
    {
      "name": "Tags",
      "description": "Tags"
    }
  ]
}
```