Solved

Adding a tag to a custom message using the API (+ resource aliases)

  • 7 December 2022
  • 2 replies
  • 66 views

Badge +2

How can I add a tag to a message that was created via the Receive custom messages endpoint?

 

https://dev.frontapp.com/reference/post_channels-channel-id-incoming-messages

 

There's documentation for how to attach a tag to a Conversation but my understanding is that these two are different primitives. See here:

https://dev.frontapp.com/reference/post_conversations-conversation-id-tags

icon

Best answer by Javier - Developer Relations 7 December 2022, 21:50

View original

2 replies

Userlevel 5
Badge +8

Maybe this documentation page will help clear things up a little. 

 

Once the incoming message has been created at POST

https://api2.frontapp.com/channels/{channel_id}/incoming_messages, you will then need to query the "Get Message" endpoint by using the message_uid as a resource alias.

 

An example request might look like this: 
https://api2.frontapp.com/messages/alt:uid:abcd1234

Then once you have retrieved the message, you can use the conversation ID from that to then add the tag. 

 

🏷️ Tags can only be added at the conversation level, rather than the message level. 

 

--Molly

Badge +2

Thanks for the help.

 

My query kept failing because I was doing messages/message_id

I didn't know about the alt:uid: prefix.

 

Reply