Discard Email Draft by Id via REST API not working

Anonymous
Not applicable

I am trying to use the delete email api call​. That is currently returns :

Screen Shot 2016-05-06 at 12.01.19 PM.png\

When I look up the email's status I get this:

Screen Shot 2016-05-06 at 11.56.48 AM.png

Any help would be great.

5 REPLIES 5
Grégoire_Miche2
Level 10

Hi Aaron,

Are you sure the mail has a draft ?

You should may be start with a "Get email by ID" with a draft status.

-Greg

Anonymous
Not applicable

Yes, if you look at the second image the email is in draft status.

Grégoire_Miche2
Level 10

In the UI, the "discard draft" works only for approved emails with a draft, not for draft emails. May be this is the cause here as well.

-Greg

Anonymous
Not applicable

In the UI if you try to delete an approved email u get this response:Screen Shot 2016-05-06 at 12.31.41 PM.png

Grégoire_Miche2
Level 10

Indeed, but that's an approved email you are trying to delete.

  1. Not approved email (first darft in the life of this email) --> can be deleted, but the draft cannot be discarded
  2. Approved email without draft -> need to be unapproved, then can be deleted (as in 1). Discard draft does not apply
  3. Approved email with draft -> the draft can be discarded OR the email can be unapproved and deleted.

I suspect you are in case 1 or 2.

-Greg