Skip to main content
POST
/
api
/
v1
/
tags
curl -X POST "https://server.smartlead.ai/api/v1/tags?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Primary Senders", "color": "#4CAF50"}'
{
  "ok": true,
  "data": {
    "id": 42,
    "name": "Primary Senders",
    "color": "#4CAF50"
  }
}
Create tags to organize your email accounts into groups for easy filtering and management. Each tag can have a custom color for visual identification.

Overview

Creates a new tag that can be assigned to email accounts. Unlike the Update Tag endpoint, this does not require an existing tag ID — the system generates one automatically.

Query Parameters

api_key
string
required
Your SmartLead API key

Request Body

name
string
required
Display name for the tag
color
string
Hex color code for the tag (e.g., #FF5733). Must be a valid 6-character hex color with # prefix. If not provided, a default color will be assigned.
curl -X POST "https://server.smartlead.ai/api/v1/tags?api_key=YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Primary Senders", "color": "#4CAF50"}'

Response Codes

200
Success
Tag created successfully
401
Unauthorized
Invalid or missing API key
422
Validation Error
Request validation failed. Common issues:
  • Missing name field
  • Invalid hex color format (must match #RRGGBB)
500
Internal Server Error
Server error occurred
{
  "ok": true,
  "data": {
    "id": 42,
    "name": "Primary Senders",
    "color": "#4CAF50"
  }
}