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

# Create a Tag

> This API creates a new tag, where the name/content of the tag is part of the body parameters.<br>Select the desired type of tag (Optional. If no type is entered, regular Tag will be created) <br>Tag = 1 <br>  Goal = 2 <br> Miss = 3 <br><br> If you want this new tag to be part of a group of tags, you’ll need to place the group Id in the TagGroupId field. <br> Enter 0 to have a free-standing tag.<br><br> Tags can be attached to a conversation (object), to a customer (user), or to a specific comment or a reply (child). Set the tag’s attachment options in the boolean parameters (true/false)<br><br>The API returns Tag Id.

## OpenAPI

````json POST /tags
{
  "openapi": "3.0.3",
  "info": {
    "title": "CommBox API",
    "x-logo": {
      "url": "https://www.commbox.io/logo/commbox_logo_large.png"
    },
    "version": "2.07",
    "termsOfService": "https://www.commbox.io/end-user-license-agreement-eula/",
    "contact": {
      "name": "commbox",
      "url": "https://www.commbox.io",
      "email": "contactus@commbox.io"
    }
  },
  "servers": [
    {
      "url": "https://api.commbox.io/",
      "description": "Production server"
    }
  ],
  "paths": {
    "/tags": {
      "post": {
        "tags": [
          "Tags"
        ],
        "summary": "Create a Tag",
        "description": "This API creates a new tag, where the name/content of the tag is part of the body parameters.<br>Select the desired type of tag (Optional. If no type is entered, regular Tag will be created) <br>Tag = 1 <br>  Goal = 2 <br> Miss = 3 <br><br> If you want this new tag to be part of a group of tags, you’ll need to place the group Id in the TagGroupId field. <br> Enter 0 to have a free-standing tag.<br><br> Tags can be attached to a conversation (object), to a customer (user), or to a specific comment or a reply (child). Set the tag’s attachment options in the boolean parameters (true/false)<br><br>The API returns Tag Id.",
        "operationId": "Create_tag",
        "requestBody": {
          "description": "Optional description for new mail object in  *Markdown*",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "data": {
                    "type": "object",
                    "properties": {
                      "Name": {
                        "type": "string",
                        "example": "My new Miss tag"
                      },
                      "Type": {
                        "type": "integer",
                        "format": "int64",
                        "example": "3"
                      },
                      "TagGroupId": {
                        "type": "integer",
                        "format": "int64",
                        "example": "0"
                      },
                      "ObjectTag": {
                        "type": "boolean",
                        "example": true
                      },
                      "UserTag": {
                        "type": "boolean",
                        "example": false
                      },
                      "ChildTag": {
                        "type": "boolean",
                        "example": false
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": 200
                    },
                    "description": {
                      "type": "string",
                      "example": "Operation successful"
                    },
                    "response_time": {
                      "type": "string",
                      "example": "2025-08-06T07:51:52.2581942Z"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "example": 21221
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request could not be understood by the server. Incoming parameters might not be valid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 400
                    },
                    "description": {
                      "type": "string",
                      "example": "Bad Request"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - The supplied credentials, if any, are not sufficient to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 401
                    },
                    "description": {
                      "type": "string",
                      "example": "Unauthorized"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not found - The requested resource is not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 404
                    },
                    "description": {
                      "type": "string",
                      "example": "Not Found"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Too many requests have been made in a short period of time (Throttling)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 429
                    },
                    "description": {
                      "type": "string",
                      "example": "Too Many Requests"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server Error - The server could not return the representation due to an internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 500
                    },
                    "description": {
                      "type": "string",
                      "example": "Internal Server Error"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2025-02-06T07:51:52.2581942Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
````

