Skip to main content
GET
/
api
/
v1
/
labels
curl -X GET "https://api.jasni.ai/api/v1/labels" \
  -H "Authorization: Bearer jsk_your_api_key"
{
  "success": true,
  "data": {
    "labels": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Important",
        "color": "#ef4444",
        "description": "High priority emails",
        "created_at": "2024-01-15T10:30:00Z"
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "name": "Follow Up",
        "color": "#f59e0b",
        "description": null,
        "created_at": "2024-01-15T10:35:00Z"
      }
    ],
    "total": 2
  }
}

Request

include_count
boolean
default:"false"
Include email count per label

Response

success
boolean
Indicates if the request was successful
data
object
curl -X GET "https://api.jasni.ai/api/v1/labels" \
  -H "Authorization: Bearer jsk_your_api_key"
{
  "success": true,
  "data": {
    "labels": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Important",
        "color": "#ef4444",
        "description": "High priority emails",
        "created_at": "2024-01-15T10:30:00Z"
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "name": "Follow Up",
        "color": "#f59e0b",
        "description": null,
        "created_at": "2024-01-15T10:35:00Z"
      }
    ],
    "total": 2
  }
}

Notes

  • Labels are returned sorted by name in ascending order
  • The email_count field is only included when include_count=true
  • Each label has a unique UUID identifier