Solved

Get ID of existing draft

  • 23 March 2023
  • 1 reply
  • 70 views

Badge

I’m developing a plugin with SDK, where I call external API to generate me a draft body and create or update a draft.

If there is no existing draft, I can call context.createDraft to crate draft. This method doesn’t seem to work if a draft already exists. I see from documentation there’s updateDraft method, which requires draft ID.

How can I get such ID, if the draft already exists in a conversation?

icon

Best answer by Support Engineering 24 March 2023, 15:06

View original

1 reply

Userlevel 1
Badge +5

Hello!

Thanks for your question! To find an existing draft ID, you’ll need to use the Core API to “List Drafts” in a specific conversation. You just need to pass through the conversation ID.

More info about this endpoint can be found here:  https://dev.frontapp.com/reference/get_conversations-conversation-id-drafts
 

Does this help solve your problem?

Reply