Skip to main content
Version: Latest

6.4 WhatsAppNoteController

Route: api/v{version:apiVersion}/whatsapp/notes · Class attributes: [Authorize] · 4 endpoints — internal agent notes on a conversation, never visible to the customer.


GET GetNotes/{conversationId}

Purpose: list internal notes for a conversation, newest first. Permission: WhatsAppInbox.Note · Request: route conversationId:Guid Response data: [{ "id": "n1...", "conversationId": "c1...", "body": "Customer confirmed refund by bank transfer.", "createdByUserName": "Sara Al-Harbi", "createdOn": "2026-07-05T10:20:00Z", "updatedByUserName": null, "updatedOn": null }] Backend: WhatsAppNoteService.GetNotesAsync. Calls Meta API: No. Angular/Flutter: the "Notes" tab of the conversation side panel.


POST AddNote/{conversationId}

Purpose: add an internal note. Permission: WhatsAppInbox.Note Request (WhatsAppConversationNoteEditDto): { "body": "Escalated to billing team" } Response: Result<Guid>. Side effects: logs a NoteAdded timeline event (see §7 Timeline). Backend: WhatsAppNoteService.AddNoteAsync. Calls Meta API: No.


PUT UpdateNote/{noteId}

Purpose: edit an existing note. Permission: WhatsAppInbox.Note Request: same WhatsAppConversationNoteEditDto shape, with Id set. Response: Result<Guid>. Error cases: editing another agent's note → 403, enforced service-side (author-only). Backend: WhatsAppNoteService.UpdateNoteAsync. Calls Meta API: No.


DELETE DeleteNote/{noteId}

Purpose: soft-delete a note (Is_Deleted/DeletedOn/DeletedBy). Permission: WhatsAppInbox.Note Request: route noteId:Guid. Response: Result<Guid>. Backend: WhatsAppNoteService.DeleteNoteAsync. Calls Meta API: No.