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?
Best answer by Support EngineeringView original
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?