Organize and segment email aliases into categorized folders, apply color tokens, manage sort hierarchies, and automate alias migrations.
Quick Reference #
Endpoint Method Required Scope Description /v1/categoriesGETcategories:readList all categories with live alias member counts and account quota limits. /v1/categoriesPOSTcategories:writeCreate a new category with automated slug generation and theme color. /v1/categories/:idGETcategories:readRetrieve single category details and metadata. /v1/categories/:idPATCHcategories:writeUpdate category name, color token, icon, sort order, or default designation. /v1/categories/:idDELETEcategories:writeDelete category and atomically migrate member aliases to the default category. /v1/categories/reorderPOSTcategories:writeReorder category display hierarchy in a single atomic request.
Data comparison table
Plan Quotas & Tier Limits #
Tier Maximum Categories (maxCategories) Behavior When Limit Reached Free 5 categories Returns HTTP 403 LIMIT_REACHED ("Maximum 5 categories allowed on your current plan."). Pro 15 categories Returns HTTP 403 LIMIT_REACHED ("Maximum 15 categories allowed on your current plan."). Business Unlimited (-1)Unrestricted category creation (maxCategories: -1).
Data comparison table
Category Taxonomy & Structure #
Categories allow organizing email aliases across departments, projects, clients, or security tiers:
flowchart TD A["User Account"] --> B["Category: Finance (#10b981)"] A --> C["Category: Security & DevOps (#6366f1)"] A --> D["Category: General (Default)"] B --> E["Alias: billing@..."] B --> F["Alias: invoices@..."] C --> G["Alias: alerts@..."] D --> H["Alias: support@..."]
Key Attributes #
Identifier Format : Standard RFC 4122 UUIDs (e.g. b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d).
Color Tokens : Standard hex color strings (e.g. #10b981, #6366f1, #f59e0b) used for UI badge accents.
Icon Tokens : Lucide icon names (e.g. folder, credit-card, shield, shopping-bag, terminal).
Default Category : Every account has exactly one default category (is_default: true). When an alias is created without an explicit category_id, it is assigned to the default category.
List Categories #
GET /v1/categories
Retrieves all organizational categories created for the authenticated account, ordered by ascending sort_order, along with live alias count metrics and plan allowances.
Scope: categories:read Rate Limit: 60 req/min Idempotent: Yes
Header Type Required Description AuthorizationstringOptional* Bearer afp_...x-api-keystringOptional* afp_... (*Provide either Authorization or x-api-key).AcceptstringYes application/json
Data comparison table
cURL Example #
curl -X GET "https://api.aliasfleet.com/v1/categories" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \ -H "Accept: application/json"
Response (200 OK) #
{ "categories" : [ { "id" : "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d" , "name" : "General" , "slug" : "general" , "color" : "#6366f1" , "icon" : "folder" , "is_default" : true , "alias_count" : 48 }, { "id" : "c2b3a4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e" , "name" : "Finance & Banking" , "slug" : "finance-banking" , "color" : "#10b981" , "icon" : "credit-card" , "is_default" : false , "alias_count" : 12 } ], "maxCategories" : 15 }
Response Fields #
Field Type Description categoriesarrayList of category objects belonging to the account. categories[].idstring (UUID)Unique category identifier. categories[].namestringDisplay name of the category. categories[].slugstringNormalized URL-safe slug. categories[].colorstringHex color code for UI rendering. categories[].iconstringIcon token identifier. categories[].is_defaultbooleanWhether this is the fallback category for new or unassigned aliases. categories[].alias_countintegerTotal count of active aliases currently assigned to this category. maxCategoriesintegerMaximum number of categories allowed under the current account plan (-1 indicates unlimited).
Data comparison table
Create Category #
POST /v1/categories
Provisions a new category folder, generates a normalized slug, validates account plan quotas, and appends the category to the end of the sort sequence.
Scope: categories:write Rate Limit: 30 req/min Idempotent: No
Request Body Schema #
Field Type Required Constraints Description namestringYes 1–50 characters Category display name (e.g. "Developer Tools"). colorstringOptional Valid hex color UI badge color (Default: "#6366f1"). iconstringOptional Icon token Lucide icon identifier (Default: "folder").
Data comparison table
cURL Example #
curl -X POST "https://api.aliasfleet.com/v1/categories" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \ -H "Content-Type: application/json" \ -d '{ "name": "Developer Tools", "color": "#8b5cf6", "icon": "terminal" }'
Response (201 Created) #
{ "success" : true , "category" : { "id" : "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a" , "name" : "Developer Tools" , "slug" : "developer-tools" , "color" : "#8b5cf6" , "icon" : "terminal" , "is_default" : false , "alias_count" : 0 } }
Error Responses #
Status Code Code Error Message Reason 400VALIDATION_ERROR"Invalid input"Name is missing or exceeds 50 characters. 403LIMIT_REACHED"Maximum 5 categories allowed on your current plan."Account plan category limit reached. 409DUPLICATE_CATEGORY"A category with this name already exists"A category with the same normalized slug already exists.
Data comparison table
Get Category by ID #
GET /v1/categories/:id
Retrieves detailed metadata for a specific category.
Scope: categories:read Rate Limit: 60 req/min Idempotent: Yes
Path Parameters #
Parameter Type Required Description idstring (UUID)Yes Unique category identifier.
Data comparison table
cURL Example #
curl -X GET "https://api.aliasfleet.com/v1/categories/b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \ -H "Accept: application/json"
Response (200 OK) #
{ "category" : { "id" : "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d" , "user_id" : "d3b07384-d113-4674-bc50-a88981298418" , "name" : "Finance & Banking" , "slug" : "finance-banking" , "color" : "#10b981" , "icon" : "credit-card" , "sort_order" : 1 , "is_default" : false , "created_at" : "2026-08-01T10:00:00.000Z" , "updated_at" : "2026-09-01T14:30:00.000Z" } }
Error Responses #
Status Code Code Error Message Reason 401UNAUTHORIZED"Unauthorized"Missing or invalid API key. 403INSUFFICIENT_SCOPES"Forbidden: Insufficient scopes"Token lacks categories:read. 404NOT_FOUND"Category not found"Category ID does not exist or belongs to another account.
Data comparison table
Update Category #
PATCH /v1/categories/:id
Modifies category properties. When is_default is set to true, the previous default category is automatically designated as non-default within an atomic transaction.
Scope: categories:write Rate Limit: 30 req/min Idempotent: Yes
Path Parameters #
Parameter Type Required Description idstring (UUID)Yes Unique category identifier.
Data comparison table
Request Body Schema #
Field Type Required Description namestringOptional Updated category display name (1–50 chars). Also updates the slug. colorstringOptional Updated hex color code. iconstringOptional Updated Lucide icon identifier. sort_orderintegerOptional Custom integer position for display ordering. is_defaultbooleanOptional Designate this category as the account default.
Data comparison table
cURL Example #
curl -X PATCH "https://api.aliasfleet.com/v1/categories/c2b3a4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \ -H "Content-Type: application/json" \ -d '{ "name": "Accounting & Treasury", "color": "#059669" }'
Response (200 OK) #
{ "category" : { "id" : "c2b3a4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e" , "user_id" : "d3b07384-d113-4674-bc50-a88981298418" , "name" : "Accounting & Treasury" , "slug" : "accounting-treasury" , "color" : "#059669" , "icon" : "credit-card" , "sort_order" : 1 , "is_default" : false , "created_at" : "2026-08-01T10:00:00.000Z" , "updated_at" : "2026-09-05T12:00:00.000Z" } }
Error Responses #
Status Code Code Error Message Reason 400NO_UPDATES"No fields to update"Request payload contains no recognized update fields. 404NOT_FOUND"Category not found"Target category ID does not exist. 409DUPLICATE_CATEGORY"A category with this name already exists"Updating the name creates a slug collision with another category.
Data comparison table
Delete Category #
DELETE /v1/categories/:id
Deletes an existing category. All aliases currently assigned to this category are automatically migrated to your account's default category.
Warning
Default Category Protection : The default category (is_default: true) cannot be deleted. If you attempt to delete it, the API will reject the request with HTTP 400 CANNOT_DELETE_DEFAULT. Set another category as default before deletion.
Scope: categories:write Rate Limit: 30 req/min Idempotent: Yes
Path Parameters #
Parameter Type Required Description idstring (UUID)Yes Unique category identifier.
Data comparison table
cURL Example #
curl -X DELETE "https://api.aliasfleet.com/v1/categories/c2b3a4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e"
Response (200 OK) #
{ "success" : true , "movedAliasesCount" : 12 }
Response Fields #
Field Type Description successbooleanConfirms successful removal of the category record. movedAliasesCountintegerTotal number of aliases migrated to your default category.
Data comparison table
Error Responses #
Status Code Code Error Message Reason 400CANNOT_DELETE_DEFAULT"Cannot delete the default category. Set another category as default first."Attempted deletion of the active default category. 404NOT_FOUND"Category not found"Target category ID does not exist. 500DEFAULT_CATEGORY_MISSING"Default category not found"System was unable to resolve a fallback default category.
Data comparison table
Reorder Categories #
POST /v1/categories/reorder
Atomically updates the sort sequence of all account categories based on the provided array of IDs.
Scope: categories:write Rate Limit: 30 req/min Idempotent: Yes
Request Body Schema #
Field Type Required Description categoryIdsstring[]Yes Array of category UUIDs in desired sequential order.
Data comparison table
cURL Example #
curl -X POST "https://api.aliasfleet.com/v1/categories/reorder" \ -H "Authorization: Bearer afp_4a8f9c1b2d3e4f5a6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e" \ -H "Content-Type: application/json" \ -d '{ "categoryIds": [ "d4e5f6a7-b8c9-0d1e-2f3a-4b5c6d7e8f9a", "b1a2c3d4-e5f6-7a8b-9c0d-1e2f3a4b5c6d", "c2b3a4e5-f6a7-8b9c-0d1e-2f3a4b5c6d7e" ] }'
Response (200 OK) #
Error Responses #
Status Code Code Error Message Reason 400INVALID_CATEGORY_IDS"Some category IDs are invalid or do not belong to you"One or more provided IDs do not belong to the authenticated account. 401UNAUTHORIZED"Unauthorized"Missing or invalid authentication. 403INSUFFICIENT_SCOPES"Forbidden: Insufficient scopes"Token lacks categories:write.
Data comparison table