Email Body

Upload an email body

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.html

A body can only be set once:

  • The first upload returns 201 Created with {"result":"ok"}.
  • Uploading the same body again returns 200 OK.
  • Uploading a different body returns 400 with {"error":"editing_email_bodies_not_allowed"}.
  • An empty request returns 400 with {"error":"body_was_empty"}.

Other errors:

  • 403 with {"error":"access_denied"} if the token lacks the daylite:write scope or the user can't edit the email.
  • 404 with {"error":"email_not_found"} if the email doesn't exist.
  • 503 with {"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.
Path Params
int32
required

The email ID

Body Params

The email body as UTF-8 HTML, e.g. a full <html> document as found in the original email. Send the decoded HTML part, not the whole MIME message, and don't wrap it in JSON.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json