Submit a email request
POST {{baseUrl}}/mra/v1/outbound/emails
Submitting a request to send an email requires use of pure JSON request body wherein the email metadata (recipient email address and user-specified options) and document's to be sent in email are part of the same JSON construct.
Request Body
{"destinations"=>[{"email"=>"example@org.com", "ref"=>"ref001", "inserts"=>[{"id"=>1, "value"=>"destination_insert_value"}, {"id"=>1, "value"=>"destination_insert_value"}], "display_to"=>"ad", "display_cc"=>"eu elit Lorem"}, {"email"=>"example@org.com", "ref"=>"ref001", "inserts"=>[{"id"=>1, "value"=>"destination_insert_value"}, {"id"=>1, "value"=>"destination_insert_value"}], "display_to"=>"ea occaecat est nisi", "display_cc"=>"m"}], "body"=>[{"type"=>"text", "data"=>"VGhpcyBpcyBzYW1wbGUgdGV4dCBkYXRh", "name"=>"temp.txt", "charset"=>"UTF-8"}, {"type"=>"text", "data"=>"VGhpcyBpcyBzYW1wbGUgdGV4dCBkYXRh", "name"=>"temp.txt", "charset"=>"UTF-8"}], "options"=>{"message_id"=>"temp_message_id", "billing_code"=>"temp_billing_code", "customer_reference"=>"temp_customer_reference", "email_options"=>{"subject"=>" Sample Email Subject", "from_display_name"=>"sample_display_name", "forward_reply"=>"abc@ot.com", "charset"=>"ISO-8859-1", "pull_password"=>"tem", "html_open_tracking"=>"top", "expiration_days"=>14, "display_to"=>"abc@ot.com,ex@ot.com", "display_cc"=>"abc@ot.com,ex@ot.com"}}, "reports"=>{"delivery_report"=>{"type"=>"exception", "report_destinations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "final_report"=>{"type"=>"pull", "report_destinations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}, "progress_report"=>{"type"=>"summary", "intervals"=>"50\\s10\\s58\\s3\\s3\\s39", "report_destinations"=>[{"value"=>"<Error: Too many levels of nesting to fake this schema>"}, {"value"=>"<Error: Too many levels of nesting to fake this schema>"}]}}, "attachments"=>[{"type"=>"text", "data"=>"VGhpcyBpcyBzYW1wbGUgdGV4dCBkYXRh", "name"=>":", "charset"=>"UTF-8", "pullfile_options"=>{"enabled"=>true, "autopull"=>true, "security"=>true, "password_needed"=>true}}, {"type"=>"text", "data"=>"VGhpcyBpcyBzYW1wbGUgdGV4dCBkYXRh", "name"=>"*<|/:::>", "charset"=>"UTF-8", "pullfile_options"=>{"enabled"=>true, "autopull"=>true, "security"=>true, "password_needed"=>true}}]}
HEADERS
| Key | Datatype | Required | Description |
|---|---|---|---|
X-MRA-SubmitId | string | Client supplied string to identify request. | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"job_id":"xsi-1234567"}