Compose API

It is possible to generate a new message in the SEDNA composer prefilled with content. This is done by leveraging a URL endpoint with query parameters. This will result in a link to SEDNA that, once clicked, will take a user to either the SEDNA login page, for them to fill in their login credentials, or directly into the composer view with the information pre-filled for their default team.

Details

The following parameters can be included to generate a URL that another user can follow directly to SEDNA.

https://{customerSednaUrl}/launch/compose/message/new?{[to]&[cc]&[bcc]&[subject]&[bodyHtml]|[emlUrl]&[addressSeparator]}

Query Parameter

Description

Example

customerSednaUrl

The URL of the customer's SEDNA tenant.

sedna.sednanetwork.com

to

Prefills the "to" field of the message

Note: cannot be used with emlUrl or addressSeparator.

https://sedna.sednanetwork.com/launch/compose/message/[email protected]

cc

Prefills the "cc" field of the message.

Note: cannot be used with emlUrl or addressSeparator.

https://sedna.sednanetwork.com/launch/compose/message/[email protected],[email protected]

bcc

Prefills the "bcc" field of the message.

Note: cannot be used with emlUrl or addressSeparator.

https://sedna.sednanetwork.com/launch/compose/message/[email protected],[email protected]

subject

Prefills the "subject" field of the message.

Note: cannot be used with emlUrl or addressSeparator.

https://sedna.sednanetwork.com/launch/compose/message/new?subject=This%20is%20a%20subject

bodyHtml

Prefills the "bodyHtml" field of the message.

This expects HTML content.

Note: cannot be used with emlUrl or addressSeparator.

https://sedna.sednanetwork.com/launch/compose/message/new?bodyHtml=%3Ch1%20style%3D%22color%3A%20%235e9ca0%3B%22%3EYou%20can%20edit%20%3Cspan%20style%3D%22color%3A%20%232b2301%3B%22%3ESEDNA%3C%2Fspan%3E%20text!%3C%2Fh1%3E

emlUrl

Prefills the message with data from an eml file. This includes: to, cc, bcc, subject, body, attachments. See EmlUrl below for details.

https://sedna.sednanetwork.com/launch/compose/message/new?emlUrl=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Ftest-eml-upload%2Fattachments.eml

addressSeparator

The separator character to use in the address lists in the eml files. Possible values are: SEMICOLON and COMMA. Default is SEMICOLON however, the default may change in the future so we recommend passing this parameter explicitly.

Note: can only be used with the emlUrl parameter.

https://sedna.sednanetwork.com/launch/compose/message/new?emlUrl=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Ftest-eml-upload%2Fattachments.eml&addressSeparator=COMMA

EmlUrl

The emlUrl parameter is a url pointing to an eml file which can be downloaded by the browser. This eml file is then passed to SEDNA to be parsed and allow the message to be populated.

Use Cases

The emlUrl parameter of the Compose API allows any system which generates eml files to import messages into SEDNA.

Flow diagram of the API calls.Flow diagram of the API calls.

Flow diagram of the API calls.

CORS Configuration

Since the eml file is being downloaded by the user’s browser, the url hosting the eml file must be configured to serve the file through CORS. This means that the SEDNA domain will have to be whitelisted to access the resource. When working with S3 for example, a CORS configuration needs to be added to the bucket.

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<CORSRule>
    <AllowedOrigin>*.sednanetwork.com</AllowedOrigin>
    <AllowedMethod>GET</AllowedMethod>
    <AllowedMethod>HEAD</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>

More documentation for configuring CORS with S3 can be found here.

Other Limitations

The eml file must be 20 megabytes or smaller in order to be used in the Compose API.

The eml file must be encoded according to RFC822. The only exception to this is the address separator. For compatibility with Microsoft Outlook, the SEDNA Compose API accepts eml files with addresses which are separated by semicolons as well as the standard commas. The separator which is used is controlled by the “addressSeparator” parameter. For compatibility, we recommend passing this parameter explicitly.

Please note that the ‘addressSeperator’ parameter only applies to the address lists in the eml file: to, cc, bcc. The only accepted values are “COMMA” and “SEMICOLON”.

Semicolon Delimited ("SEMICOLON")

Cc: [email protected];[email protected]
Bcc: <[email protected]>;[email protected]

Comma Delimited ("COMMA")

Cc: [email protected],[email protected]
Bcc: <[email protected]>,[email protected]

Examples

to and bodyHtml

https://sedna.sednanetwork.com/launch/compose/message/[email protected]&bodyHtml=%3Ch1%20style%3D%22color%3A%20%235e9ca0%3B%22%3EYou%20can%20edit%20%3Cspan%20style%3D%22color%3A%20%232b2301%3B%22%3ESEDNA%3C%2Fspan%3E%20text!%3C%2Fh1%3E

The result in SEDNA of using the `to` and `bodyHtml` parameters.The result in SEDNA of using the `to` and `bodyHtml` parameters.

The result in SEDNA of using the to and bodyHtml parameters.

emlUrl and addressSeparator

https://sedna.sednanetwork.com/launch/compose/message/new?emlUrl=https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Ftest-eml-upload%2Fattachments.eml&addressSeparator=COMMA

With the URL above, an eml file will be downloaded from the provided ‘emlUrl’ parameter and parsed according to the ‘addressSeparator’ parameter.

The result in SEDNA of using the `emlUrl` and `addressSeparator` parameters.The result in SEDNA of using the `emlUrl` and `addressSeparator` parameters.

The result in SEDNA of using the emlUrl and addressSeparator parameters.

Notes and Limitations

There are a few caveats to consider when developing to ensure success:

  • A user must have a valid SEDNA login in order to access the compose window.
  • The compose message will be generated under the user’s default team.
  • There is a hard limit of 2,083 characters in the URL on Chrome browsers.