put
https://api.marketcircle.net/v1/emails//body
Upload an email body
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Uploads the body of an email. The body is HTML: you can send a full <html> document as found in the original email, including <style> blocks, tables, links and quoted replies. Send the raw UTF-8 HTML as the request body with Content-Type: text/html; charset=utf-8. Send the decoded HTML part of the email, not the whole MIME message, and don't wrap it in JSON. Use the location returned when you created the email, plus /body. To try it on this page, paste the HTML into the Body Params box below.
From the command line, with the HTML saved in body.html:
curl -X PUT "https://api.marketcircle.net/v1/emails/4005/body" \
-H "Authorization: Bearer <access token>" \
-H "Content-Type: text/html; charset=utf-8" \
--data-binary @body.htmlA body can only be set once:
- The first upload returns
201 Createdwith{"result":"ok"}. - Uploading the same body again returns
200 OK. - Uploading a different body returns
400with{"error":"editing_email_bodies_not_allowed"}. - An empty request returns
400with{"error":"body_was_empty"}.
Other errors:
403with{"error":"access_denied"}if the token lacks thedaylite:writescope or the user can't edit the email.404with{"error":"email_not_found"}if the email doesn't exist.503with{"error":"service_temporarily_unavailable"}or{"error":"transient_datastore_error"}if the body couldn't be stored. The email record is unaffected; try the upload again later.