diff --git a/cmd/handlers.go b/cmd/handlers.go index c75b3c1e..443f43f7 100644 --- a/cmd/handlers.go +++ b/cmd/handlers.go @@ -66,6 +66,10 @@ func initHandlers(g *fastglue.Fastglue, hub *ws.Hub) { g.POST("/api/v1/conversations", perm(handleCreateConversation, "conversations:write")) g.PUT("/api/v1/conversations/{uuid}/custom-attributes", auth(handleUpdateConversationCustomAttributes)) g.PUT("/api/v1/conversations/{uuid}/contacts/custom-attributes", auth(handleUpdateContactCustomAttributes)) + // Draft endpoints + g.POST("/api/v1/conversations/{uuid}/draft", auth(handleUpsertConversationDraft)) + g.GET("/api/v1/conversations/{uuid}/draft", auth(handleGetConversationDraft)) + g.DELETE("/api/v1/conversations/{uuid}/draft", auth(handleDeleteConversationDraft)) // Search. g.GET("/api/v1/conversations/search", perm(handleSearchConversations, "conversations:read"))