Skip to main content
Version: Latest

6.6 WhatsAppTagController

Route: api/v{version:apiVersion}/whatsapp/tags · Class attributes: [Authorize] · 7 endpoints — tenant-wide labels applied to conversations for categorization and filtering.


GET GetTags

Purpose: list every tag defined for the tenant. Permission: WhatsAppInbox.Tag Response data: [{ "id": "t1...", "name": "عميل مميز", "fName": "VIP", "color": "#FFD700", "isSystem": false, "isActive": true }] Backend: WhatsAppTagService.GetTagsAsync. Calls Meta API: No.

GET GetConversationTags/{conversationId}

Purpose: tags currently applied to one conversation. Permission: WhatsAppInbox.Tag Response: same DTO shape as above, filtered to one conversation. Backend: WhatsAppTagService.GetConversationTagsAsync. Calls Meta API: No.

POST CreateTag

Purpose: create a new tenant tag. Permission: WhatsAppInbox.Tag Request (WhatsAppConversationTagEditDto): { "name": "عميل مميز", "fName": "VIP", "color": "#FFD700", "isActive": true } Response: Result<Guid>. Backend: WhatsAppTagService.CreateTagAsync. Calls Meta API: No.

PUT UpdateTag/{tagId}

Purpose: update a tag. Permission: WhatsAppInbox.Tag Error cases: attempting to edit a system tag (IsSystem == true) → 400 ValidationException. Backend: WhatsAppTagService.UpdateTagAsync. Calls Meta API: No.

DELETE DeleteTag/{tagId}

Purpose: soft-delete a tag. Permission: WhatsAppInbox.Tag Error cases: deleting a system tag → 400 ValidationException. Backend: WhatsAppTagService.DeleteTagAsync. Calls Meta API: No.

POST AssignTag/{conversationId}

Purpose: apply a tag to a conversation. Permission: WhatsAppInbox.Tag Request (WhatsAppAssignTagDto): { "tagId": "t1..." } · Response: Result<Guid>. Side effects: logs a TagAdded timeline event. Backend: WhatsAppTagService.AssignTagAsync. Calls Meta API: No.

DELETE RemoveTag/{conversationId}/{tagId}

Purpose: remove a tag from a conversation. Permission: WhatsAppInbox.Tag Side effects: logs a TagRemoved timeline event. Backend: WhatsAppTagService.RemoveTagAsync. Calls Meta API: No.

Angular/Flutter (all endpoints): the conversation header's tag-picker chips, and a tag-management screen under Inbox settings.