---
updatedAt: 2025-09-09T20:29:31.000Z
agentTools:
  projectIndex: https://ablo.readme.io/llms.txt
---

# /templates/{templateId}/colors

Create template color

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "paths": {
    "/templates/{templateId}/colors": {
      "post": {
        "operationId": "TemplateColorController_create",
        "summary": "",
        "description": "Create template color",
        "parameters": [
          {
            "name": "templateId",
            "required": true,
            "in": "path",
            "description": "Template ID",
            "schema": {
              "example": "d1b3e4a0-1c5a-4f1a-8f1a-4f1a8f1a8f1a",
              "type": "string"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "required": true,
            "schema": {}
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateColorDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TemplateColor"
                }
              }
            }
          }
        },
        "tags": [
          "TemplateColors"
        ],
        "security": [
          {
            "x-api-key": []
          }
        ]
      }
    }
  },
  "info": {
    "title": "Ablo API",
    "description": "RESTful API Docs for Ablo",
    "version": "1.0",
    "contact": {}
  },
  "tags": [
    {
      "name": "TemplateColors",
      "description": ""
    }
  ],
  "servers": [
    {
      "url": "https://api.ablo.ai/"
    }
  ],
  "components": {
    "securitySchemes": {
      "x-api-key": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "TemplateColorSizeDto": {
        "type": "object",
        "properties": {
          "sizeId": {
            "type": "number",
            "example": 3
          },
          "manufacturingVariantId": {
            "type": "string",
            "example": "d1b3e4a0-1c5a-4f1a-8f1a-4f1a8f1a8f1a"
          },
          "storefrontVariantId": {
            "type": "string",
            "example": "d1b3e4a0-1c5a-4f1a-8f1a-4f1a8f1a8f1a"
          }
        },
        "required": [
          "sizeId"
        ]
      },
      "TemplateColor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "d1b3e4a0-1c5a-4f1a-8f1a-4f1a8f1a8f1a"
          },
          "name": {
            "type": "string",
            "example": "T-Shirt"
          },
          "hex": {
            "type": "string",
            "example": "#ff0000"
          },
          "stitchColor": {
            "type": "string",
            "example": "white"
          },
          "order": {
            "type": "number",
            "example": 4
          },
          "isDeleted": {
            "type": "boolean",
            "example": false
          },
          "createdAt": {
            "format": "date-time",
            "type": "string",
            "example": "2020-01-01T00:00:00.000Z"
          },
          "updatedAt": {
            "type": "string",
            "example": "2020-01-01T00:00:00.000Z"
          },
          "templateId": {
            "type": "string",
            "example": "d1b3e4a0-1c5a-4f1a-8f1a-4f1a8f1a8f1a"
          }
        },
        "required": [
          "id",
          "name",
          "hex",
          "stitchColor",
          "order",
          "isDeleted",
          "createdAt",
          "updatedAt",
          "templateId"
        ]
      },
      "CreateTemplateColorDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "red",
            "nullable": false
          },
          "hex": {
            "type": "string",
            "example": "#ff0000",
            "nullable": false
          },
          "stitchColor": {
            "type": "string",
            "example": "white"
          },
          "insideLabelImageUrl": {
            "type": "string",
            "example": "https://ablo.ai/images/1.jpg"
          },
          "sizes": {
            "example": [
              {
                "sizeId": 1
              }
            ],
            "nullable": true,
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateColorSizeDto"
            }
          },
          "order": {
            "type": "number",
            "example": 4
          }
        },
        "required": [
          "name",
          "hex",
          "sizes"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```