API Definition

Publishing Newsletters

The Publishing APIs allow you to create and share a newsletter via email. Newsletter content may originate from previously saved searches, stories added to folders, text and content marked up with HTML, or any combination of the three. Upload and add images to brand your newsletter with Art APIs. Then publish the newsletter by request or configure a schedule to deliver the newsletter to a list of email addresses.

The list of available APIs is established for each user by the Acquire Media Administrator. (Some documented API may not be available for your use.)

Creating a Newsletter
Previewing your Newsletter
Adding Artwork
Managing Newsletter Recipients.
Sending your Newsletter
Add a Schedule to a Newsletter
Managing Newsletters

Creating a Newsletter

The basic steps to create the newsletter and set up its elements are:

  1. Create the newsletter using newsletter/create
  2. Customize basic newsletter formatting
  3. Add content as separate newsletter sections
  4. Set up email list
  5. Optionally, add art to brand your newsletter
Initial Newsletter Set-up
Setting up Newsletter Sections
Initial Newsletter Set-up
  1. Create the newsletter.

    The newsletter/create API request includes the required parameters name and title. The name is for reference only, whereas the title appears at the beginning of your newsletter and is shown in the email subject line.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/create?session=935DA0B364E9E130F0EC3827FC3CCC9C&name=Industry+Update&title=Pharmaceutical+Industry+Update

    Response
    <opens-api>
      <status>OK</status>
      <newsletter>2104</newsletter>
    </opens-api>
  2. Modify the newsletter date format and its location.

    When the newsletter is published, the current date is shown in the email. A number of different options are available to customize the newsletter date, from where the date is displayed, to how the date is formatted.

    By default, the date appears on the same line as the newsletter title, aligned at the right margin, and formatted as YYYYMMDD, e.g. 20190208. In this example, by using the optional parameter dateLocation with the newsletter/update API, the date is set to appear on the line following the title. Appending a second optional parameter dateFormat, set the date format value with necessary punctuation, e.g. forward slash (/), pipe-delimiter (|), hyphen (-), or comma (,), to modify the format of the date. In this example, the date will be changed to display as February 8, 2019.

    <%a> - Day of the week written in short form, e.g. Mon, Tue, Wed, etc.

    <%A> - Day of the week written in long form, e.g. Monday, Tuesday, Wednesday, etc.

    <%_m> - Month expressed in single digit numeric form, e.g. 1 for January, 2 for February, ..., through to 12 for December.

    <%m> - Month expressed in double digit numeric form, e.g. 01 for January, 02 for February, ..., through to 12 for December.

    <%b> - Month written in short form, e.g. Jan, Feb, Mar, etc.

    <%B> - Month written in long form, e.g. January, February, March, etc.

    <%e> - Day of month expressed in single digit numeric form, e.g. 1, 2, 3, ..., 30, 31.

    <%d> - Day of month expressed in double digits numeric form, e.g. 01, 02, 03, ..., 30, 31.

    <%ord> - Include ordinal after the day of month, e.g. st after the 1st, nd after the 2nd, etc.

    <%y> - Year in double digit numeric form, e.g. 18 for 2018, 19 for 2019, etc.

    <%Y> - Year in four digit numeric form, e.g. 2018, 2019, etc.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&dateLocation=FOLLOW&dateFormat=<%B>%20<%e>,%20<%Y>

    Response
    <opens-api>
      <status>OK</status>
      <newsletter>2104</newsletter>
    </opens-api>
  3. Retrieve newsletter details to confirm changes.

    At any time, use the newsletter/info request, with the newsletter parameter and the newsletter identifier returned from the newsletter/create request, to review the set up of your newsletter.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="HEADLINE" storyFormat="BRIEF" level="USER" permission="WRITE"> 
        <topArt id="" name="" link=""/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction/>
        <tocComment/>
        <lastExecTime/>
        <sections count="0"></sections>
        <schedules count="0"></schedules>
        <bottomArt id="" name="" link=""/>
        <footer/>
      </newsletter>
    </opens-api>
  4. Add an introduction.

    A brief introduction at the beginning of the newsletter can be used to highlight important articles, add an announcement, or provide your contact information to readers. The introduction text may be up to 2,500 characters long and should be URL encoded.

    In this example, use the newsletter/update with the optional parameter introduction to add the introductory text.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827F&newsletter=2104&introduction=%3Cp%3EIn+the+newsletter+today+are+some+top+stories+about+our+competitors+and+their+new+products+at+this+year%27s+annual+trade+show.+%3C%2Fp%3E%0D%0A%0D%0A%3Cp%3EIf+you+have+any+news+to+share+with+the+rest+of+the+company%2C+please+forward+your+items+to+Jane+Doe%2C+%3Ca+href%3D%22mailto%3Ajdoe%40mycompany.com%3Fsubject%3DPharmaceutical%2520News%2520Update%22%3Ejdoe%40mycompany.com%3C%2Fa%3E.%3C%2Fp%3E

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  5. Formatting the Table of Contents and newsletter contents.
    When the newsletter is initially created, the Table of Contents is set to show section names with headlines and newsletter section content as headline plus summary. In this example, using newsletter/update again, the Table of Contents will be modified to include only the section names by appending the optional parameter tocFormat, and the newsletter body, to show only headlines by appending the optional parameter storyFormat.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827F&newsletter=2104&tocFormat=SECTION&storyFormat=HEADLINE

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  6. Retrieve newsletter details to confirm changes.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
      <topArt id="" name="" link=""/>
      <title>Pharmaceutical Industry Update</title>
      <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p>
        <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime/>
        <sections count="0"></sections>
        <schedules count="0"></schedules>
        <bottomArt id="" name="" link=""/>
        <footer/>
      </newsletter>
    </opens-api>
Setting up Newsletter Sections

Each section of the newsletter can be populated by any one of these three different source types:

  1. Saved search - Use the savedsearch/list API to retrieve available saved searches and identify the desired search ID. With the newsletter/addsection request, use the required parameter dataSourceType with value SEARCH and include the optional parameter search along with the search ID value.
  2. Story folder - Use the storyfolder/list API to retrieve available folders and identify the ID for the desired folder. Then with the newsletter/addsection, use required parameter dataSourceType with value FOLDER and append the optional parameter folder with the folder ID.
  3. HTML - use HTML mark-up to add content to the section. An HTML based section can be left empty, or use the optional parameter html to define the HTML mark-up. With the newsletter/addsection required parameter dataSourceType, submit the value HTML.

The first two source types populates a newsletter section with headline contents. The HTML option allows you to add informational content, such as an announcement, information and links to industry resources that may be of interest to your readers, etc.

In the following examples, three newsletter sections will be added. The first section will link to stories resulting from a saved search. The second section will link to stories saved to a folder. Finally, in the last section, the section will be used to display a message for the newsletter readers.

  1. Determining the saved search for the newsletter section.

    Submit a request with the savedsearch/list API to retrieve available saved searches.


    Request
    https://secure.newsedge.com/opensapi/20/savedsearch/list?session=935DA0B364E9E130F0EC3827FC3CCC9C

    Response
    <opens-api>
      <status>OK</status>
      <savedsearches>
        <savedsearch ss="13819" owner="API User" level="PERSONAL" name="Drug Trials" permission="WRITE"/>
        <savedsearch ss="13821" owner="API User" level="PERSONAL" name="Patent and Market News" permission="WRITE"/>
        <savedsearch ss="13822" owner="API User" level="PERSONAL" name="Weekly Pfizer Report" permission="WRITE"/>
        . . .
      </savedsearches>
    </opens-api>
  2. Creating a section.

    To add a newsletter section, use the newsletter/addsection along with parameters to name the section, define the dataSourceType as one of the three content options, and the requisite optional parameter based on the data type. In this example, the first section in our newsletter will get its content from a saved search.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&name=Recent%20Patent%20News&dataSourceType=SEARCH&search=13821

    Response
    <opens-api>
      <status>OK</status>
      <sectionID>3455</sectionID>
    </opens-api>
  3. Customizing the section.

    Once the section is created and content linked, consider other section configurations, e.g. the number of headlines to display defaults to 10, should there be more or fewer headlines? When there are no results from the search, the newsletter omits the section, should the section be included even when no results are found? Do you want to add a section comment. Review the optional parameters for newsletter/updatesection to determine whether to customize further.

    In this example, the number of headlines will be changed to 15 by using the newsletter/updatesection API and the optional parameter storyLimit.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3455&storyLimit=15

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  4. Reviewing the section configuration.

    Use the newsletter/getsection API to review the section details.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3455

    Response
    <opens-api>
      <status>OK</status>
      <section id="3455" order="1" name="Recent Patent News" storyLimit="15" dataSourceType="SEARCH" storyfolder="" savedsearch="13821" sectionHtml="" comment="" storeOnSend="FALSE" dataSourceName="Patent and Market News" sendEmptySection="FALSE" emptySectionMessage=""/>
    </opens-api>
  5. Selecting a folder for the next section.

    For the next section of the newsletter, the content will come from a story folder. Use the storyfolder/list API to retrieve the list of folders.


    Request
    https://secure.newsedge.com/opensapi/20/storyfolder/list?session=935DA0B364E9E130F0EC3827FC3CCC9C

    Response
    <opens-api>
      <status>OK</status>
      <storyfolders count="4">
        <storyfolder id="17786" order="3" count="0" sharing="" name="Industry News" description="Industry News" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="RANK"/>
        <storyfolder id="17791" order="2" count="0" sharing="" name="My Stories" description="Stories for my homepage" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="PUBDATE"/>
        <storyfolder id="17785" order="1" count="0" sharing="" name="My Stories manual fill TEST" description="" owner="API User" level="USER" permission="READ|WRITE|MANAGE" orderBy="DATEADDED"/>
      </storyfolders>
    </opens-api>
  6. Adding section linked to a folder.

    From the folder results above, the new section will be linked to the Industry News folder contents, ID 17786. Using the newsletter/addsection API, include parameters dataSourceType with value FOLDER and this time, add the optional parameter folder with the ID value.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=9E10D3DB0DE88EB80530C8578EF261AF&newsletter=2104&name=Industry%20News&dataSourceType=FOLDER&folder=17786

    Response
    <opens-api>
      <status>OK</status>
      <sectionID>3456</sectionID>
    </opens-api>
  7. Customizing folder-linked section.

    Folders contain selected stories and only the stories with a status of ACTIVE will be published in the newsletter. To avoid publishing the same folder articles in the next edition, use the optional parameter storeOnSend with the newsletter/updatesection API to change the story status to STORED after publication.

    To learn more about story status, see the storyfolder/updatestory API optional parameter status.

    In this example, the section will display up to 15 ACTIVE stories from the folder and after the newsletter is published, the status for published stories will be changed to STORED.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3456&storeOnSend=TRUE&storyLimit=15

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>          
            
  8. Reviewing the section configuration.

    Use the newsletter/getsection API to review the section details.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3456

    Response
    <opens-api>
      <status>OK</status>
      <section id="3456" order="2" name="Industry News" storyLimit="15" dataSourceType="FOLDER" storyfolder="17778" savedsearch="" sectionHtml="" comment="" storeOnSend="TRUE" dataSourceName="Industry News" sendEmptySection="FALSE" emptySectionMessage=""/>
    </opens-api>
  9. Sorting sections.
    As each section is added to the newsletter the section is assigned an order value one integer greater than the previous section. The first "Patent News" section has order value "1" and is shown first in the newsletter. The second "Industry News" section has order value "2" and it will appear following the Patent News. Here, in this example, the order of the sections will be changed to have Industry News stories appearing before Patent News. Use the newsletter/updatesection with the optional parameter order.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3456&order=1

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>          
            
  10. Review the newsletter.
    Use the newsletter/info request to retrieve the newsletter configuration and sections.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
        <topArt id="" name="" link=""/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction>
          <p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p>
    
          <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p>
        </introduction>
        <tocComment/>
        <lastExecTime/>
        <sections count="2">
          <section id="3456"/>
          <section id="3455"/>
        </sections>
        <schedules count="0"></schedules>
        <bottomArt id="" name="" link=""/>
        <footer/>
      </newsletter>
    </opens-api>          
            
  11. Add a section with content formatted as HTML.
    Aside from displaying news results in a section, you may create a section composed of a message formatted in HTML. (Remember to URL-encode the HTML.) In this example, the new section will use HTML as its dateSourceType. The HTML can be included in this newsletter/addsection request or can be defined later using the newsletter/updatesection API.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&name=What's%20New%20at%20Our%20Company&dataSourceType=HTML

    Response
    <opens-api>
      <status>OK</status>
      <sectionID>3467</sectionID>
    </opens-api>
  12. Updating section HTML.
    Using the newsletter/updatesection API with the following parameters newsletter, section, dataSourceType and html, where the html value is a message marked up as HTML and it is url-encoded.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3467&dataSourceType=html&html=%3Ctable%20width%3D%22100%25%22%20bgcolor%3D%22%23cccccc%22%20style%3D%22font-family%3Aarial%3B%20font-size%3A12px%22%3E%3Ctr%3E%3Ctd%20colspan%3D%222%22%3E%3Cb%3EJoin%20us%20at%20the%20following%20trade%20shows%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3Ctr%3E%3Ctd%20width%3D%2225%25%22%3EMay%201%2C%202019%2C%20Miami%2C%20FL%3C%2Ftd%3E%3Ctd%20width%3D%2275%25%22%3E%3Cb%3EBiotech%20Industry%20Show%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3Ctr%3E%3Ctd%20width%3D%2225%25%22%3EMay%2015%2C%202019%2C%20London%2C%20UK%3C%2Ftd%3E%3Ctd%20width%3D%2275%25%22%3E%3Cb%3EPharma%20CI%20Show%3C%2FBI%3E%3C%2Ftd%3E%3C%2Ftr%3E%20%3C%2Ftable%3E
            

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  13. Reviewing the section configuration.
    In the results, note the dataSourceType is HTML and the sectionHTML is the message marked up as an HTML table.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getsection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3467

    Response
    <opens-api>
      <status>OK</status>
      <section id="3467" order="4" name="What's New at Our Company" storyLimit="10"   dataSourceType="HTML" storyfolder="" savedsearch="" sectionHtml="<table width="100%" bgcolor="#cccccc" style="font-family:arial; font-size:12px"><tr><td colspan="2"><b>Join us at the following trade shows</b></td></tr> <tr><td width="25%">May 1, 2019, Miami, FL</td><td width="75%"><b>Biotech Industry Show</b></td></tr> <tr><td width="25%">May 15, 2019, London, UK</td><td width="75%"><b>Pharma CI Show</b></td></tr> </table>" comment="" storeOnSend="FALSE" dataSourceName="" sendEmptySection="FALSE" emptySectionMessage=""/>
    </opens-api>
  14. Reordering the HTML section.
    Adjust the sections so the HTML section appears after the first news section and before the second news section, using the order parameter with the newsletter and section parameters.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/updatesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3467&order=2

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  15. Review the newsletter configuration.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
        <topArt id="" name="" link=""/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p>
    <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime/>
        <sections count="4">
          <section id="3456"/>
          <section id="3467"/>
          <section id="3455"/>
          <section id="3458"/>
        </sections>
        <schedules count="0"></schedules>
        <bottomArt id="" name="" link=""/>
        <footer/>
      </newsletter>
    </opens-api>
  16. Deleting a section.
    The newsletter/delete API is used along with the newsletter and section parameters to permanentlyy delete a section of the newsletter.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/deletesection?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&section=3458

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>

Previewing your Newsletter
The newsletter/preview API is used in conjunction with the newsletter/checkpreview API to obtain a URL that displays the newsletter as it would look when emailed.
  1. Get key to preview the newsletter.
    With the newsletter/preview API, a key is returned and will be used in the next step to check whether the newsletter is ready for preview.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/preview?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
        <opens-api>
          <status>PENDING</status>
          <key>32966_20190501154206</key>
        </opens-api>
  2. Check if the preview is ready.

    Use the newsletter/checkpreview API with the key from the previous response to obtain a URL. The URL returns an HTML preview of your newsletter as it would look when emailed to your newsletter recipients.

    After previewing the newsletter, you may decide to modify the newsletter using newsletter/update or newsletter/updatesection. If you wish to add some images to the top of the newsletter, or at the end, you will want to continue to the next set of examples for adding artwork. If you do not wish to add any artwork, skip to the example further down to learn how to add newsletter recipients.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/checkpreview?session=935DA0B364E9E130F0EC3827FC3CCC9C&key=32966_20190501154206

    Response
    <opens-api>
      <status>OK</status>
      <url>https://secure.newsedge.com/newsletterpreview/newsletter_32966_20190501154206.html</url>
    </opens-api>

Adding Artwork

Add visual interest to your newsletter by including an image at the beginning or end of the newsletter, as part of the introduction or footer, or include an image with the HTML-defined sections. The Art APIs allow you to upload, manage and delete images. Once the art is uploaded, use the newsletter/addtopart or newsletter/addbottomart to include images as the newsletter masthead or at the end of your newsletter. Or use the optional parameters with the newsletter/update and newsletter/updatesection APIs to link the images with the introduction, footer or section(s).

Uploading, managing and deleting art
Adding art to a Newsletter
Uploading, managing and deleting art
  1. Upload an image.

    Use the art/upload API with the parameter name to create a named image and to upload the image for use with your newsletter. You will want to use an HTTP Post command to upload the image.

    The returned results is a unique identifier artId that is to be used with other newsletter API calls link the image to the newsletter. The artLink URL can be used to preview the image and is embedded in the newsletter as the image source.


    Request
    https://secure.newsedge.com/opensapi/20/art/upload?session=935DA0B364E9E130F0EC3827FC3CCC9C&name=Globe%20with%20dotted%20overlay

    Response
    <?xml version="1.0" encoding="UTF-8"?>
    <opens-api>
    <status>OK</status>
    <artId>868</artId>
    <artLink>https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg</artLink>
    </opens-api>
  2. Get list of uploaded images.

    Request
    https://secure.newsedge.com/opensapi/20/art/list?session=935DA0B364E9E130F0EC3827FC3CCC9C

    Response
    <opens-api>
      <status>OK</status>
      <artList>
        <art id="868" name="Globe with dotted overlay" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg" desc="Sample" createdBy="API User" modifiedBy="API User" modifiedOn="20190506T114013-0400"/>
        <art id="867" name="Newscycle" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091310642.png" desc="Logo with keyboard image" createdBy="API User" modifiedBy="API User" modifiedOn="20190129T091058-0500"/>
        <art id="876" name="NewsEdge light" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png" desc="midnight NewsEdge cream" createdBy="API User" modifiedBy="API User" modifiedOn="20190520T134301-0400"/>
      </artList>
    </opens-api>
  3. Delete an image.

    With the art id value returned from the art/upload or art/list response, make a request to delete the image.


    Request
    https://secure.newsedge.com/opensapi/20/art/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&art=867

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
Adding art to a Newsletter
Now that the images have been uploaded to the system, use the artwork as the banner at the top or end of your newsletter, or as part of the comment fields, like the newsletter introduction, section comments or footer.
  1. Get a list of available art.
    Use the art/list API to retrieve the images and note the id for the image to be used for your newsletter.

    Request
    https://secure.newsedge.com/opensapi/20/art/list?session=935DA0B364E9E130F0EC3827FC3CCC9C

    Response
    <opens-api>
      <status>OK</status>
      <artList>
        <art id="868" name="Globe with dotted overlay" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg" desc="Sample" createdBy="API User" modifiedBy="API User" modifiedOn="20190506T114013-0400"/>
        <art id="876" name="NewsEdge light" level="USER" permission="WRITE" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png" desc="midnight NewsEdge cream" createdBy="API User" modifiedBy="API User" modifiedOn="20190520T134301-0400"/>
      </artList>
    </opens-api>
  2. Add the image to your newsletter.
    The newsletter/addtopart and newsletter/addbottomart APIs are used to add the image to the top or end of your newsletter, respectively. If you like, the image can be added at the top and the end, by submitting a request with each API using the same art id. In this example, the art will be added as the opening image for your newsletter. If necessary, use the newsletter/list API to obtain the newsletter id.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addtopart?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&art=868

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  3. Add image at the end of the newsletter

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addbottomart?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&art=876

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  4. Get key to preview the newsletter.
    The newsletter/preview API is used in conjunction with the newsletter/checkpreview API to obtain a URL for an HTML version of the newsletter. In this example, get the key to generate the URL.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/preview?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>PENDING</status>
      <key>32966_20190520135840</key>
    </opens-api>
  5. Get newsletter preview URL.
    With the preview, you can check the size of the images used at the top or end of the newsletter for size, whether it is too small or too large. NewsEdge does not resize the uploaded images, so to change the size of the image, delete and upload a new image.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/checkpreview?session=935DA0B364E9E130F0EC3827FC3CCC9C&key=32966_20190520135840

    Response
    <opens-api>
      <status>OK</status>
      <url>https://secure.newsedge.com/newsletterpreview/newsletter_32966_20190520135840.html</url>
    </opens-api>
  6. Get newsletter info.
    Another way to check that the art has been added to the newsletter is to request the newsletter/info results. The image URL for top art and bottom art will be returned when images are linked to the newsletter. Note: reviewing the newsletter with the newsletter/info API does not show the size of the image relative to the newsletter. The best way to confirm the image size is to preview the newsletter, as described by the previous two examples.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
        <topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction>
          <p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p> 
          <p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime/>
        <sections count="3">
          <section id="3456"/>
          <section id="3467"/>
          <section id="3455"/>
        </sections>
        <schedules count="0"></schedules>
        <bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
        <footer/>
      </newsletter>
    </opens-api>

Managing Newsletter Recipients.
Newsletters are sent via email to one or more email addresses. Use the Email List APIs to manage your newsletter recipients.
  1. Adding an email recipient.
    Submit a newsletter/addemail request with the emailAddress parameter to associate one email address as a recipient. Make additional requests to add more email recipients.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addemail?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&emailAddress=msmith@mycompany.com

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  2. Retrieve the list of newsletter recipients.

    Use the newsletter/getemaillist API to request all email addresses configured as recipients for the newsletter.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getemaillist?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <emailList name="Destination list for Industry Update (2104)" desc="">
        <email firstName="" lastName="" email="msmith@mycompany.com" status="ACTIVE"/>
        <email firstName="" lastName="" email="alee@mcompany.com" status="ACTIVE"/>
      </emailList>
    </opens-api>
  3. Delete an email recipient.
    To remove an email address from the recipients list use newsletter/deleteemail API with the parameter emailAddress. If an email address is misspelled, delete the email address and re-add the correct email using another newsletter/addemail request.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/deleteemail?session=F807924B89CBEA15C12589D14A9E263D&newsletter=2104&emailAddress=alee@mcompany.com

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>

Sending your Newsletter
Use the newsletter/send API to assemble the newsletter elements (artwork, title, date, formatting, sections, stories, footer etc.) and to publish the entire newsletter to the associated email addresses. The returned result is a key element which may be used with newsletter/checksend to confirm if the newsletter has been sent. If the status of the newsletter/checksend is PENDING, and you wish to cancel this action, use the newsletter/cancelsend API.
  1. Requesting the newsletter send key.
    In this example, the newsletter/send API will return a numeric key for use with the subsequent newsletter/checksend API.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/send?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>PENDING</status>
      <key>32966_20190520151155</key>
    </opens-api>
  2. Check if newsletter has been sent.
    Use the newsletter/checksend API with the key returned in the previous response. When the status is OK, this means the newsletter has been sent. If the status is PENDING, it means NewsEdge is still preparing the newsletter. If the status is ERROR, a descriptive error message will be presented for further action.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/checksend?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&key=32966_20190520151155

    Response
    <opens-api>
      <status>OK</status>
      <email-status>OK</email-status>
    </opens-api>
  3. Cancel sending newsletter.
    If the status returned with newsletter/send and newsletter/checksend is PENDING, you may use the newsletter/cancelsend API with the key value to stop NewsEdge from publishing the newsletter to your email recipients.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/cancelsend?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&key=32966_20190520155534

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>

Add a Schedule to a Newsletter

As an alternative to sending a newsletter by issuing the newsletter/send request, the OPENS API offers the option for a newsletter to be scheduled and automatically published on a predetermined day(s) of the week at a set time(s) of day or at intervals throughout the day.

Newsletter Schedule at a Specified Time
Add a Periodic Schedule to a Newsletter
Newsletter Schedule at a Specified Time
With this example, the newsletter will be set to publish at a set time.
  1. Add a schedule.

    In this example, the newsletter will be configured to automatically publish on Monday and Thursdays at 8:00 AM.

    With the newsletter/addschedule API, use the following required parameters:

    • type - with the value settime.
    • days - with the values for the days of the week.
    • setTime - with the time of day entered as hhmmss. This time is set per the timezone assigned to your OPENS API account. To modify the default timezone, contact the Acquire Media Administrator.

    For the days values, each day can be represented by a numeric value, e.g. 1 for Monday, 2 for Tuesday, through to 7 for Sunday, or alternatively, spell out the day(s) of the week in full. Use a comma to separate values when setting the schedule to publish on multiple days of the week. Use weekdays as a value if setting the newsletter to auto-publish from Monday through to Friday. And use all as the value if the newsletter is to publish every day of the week.

    The returned result is a schedule ID used to retrieve the schedule details with the newsletter/getschedule API.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&days=1,4&type=settime&setTime=080000

    Response
    <opens-api>
      <status>OK</status>
      <scheduleID>400</scheduleID>
    </opens-api>
  2. Review the newsletter details.
    In the newsletter/info returned results, there is one schedule associated to this newsletter. If you would like to publish this newsletter at a different time on other days of the week, a second schedule can be added by submitting another newsletter/addschedule API request.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
        <topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime>20190520T160927-0400</lastExecTime>
        <sections count="3">
          <section id="3456"/>
          <section id="3467"/>
          <section id="3455"/>
        </sections>
        <schedules count="1">
          <schedule id="400"/>
        </schedules>
        <bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
        <footer/>
      </newsletter>
    </opens-api>
  3. Get schedule details.
    In this example, use the newsletter/getschedule API with the schedule ID returned in the newsletter/addschedule or newsletter/info results to retrieve the details.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=400

    Response
    <opens-api>
      <status>OK</status>
      <schedule id="400 ">
        <dayOfWeek number="1,4">
          <setTime>T080000-0500</setTime>
        </dayOfWeek>
      </schedule>
    </opens-api>
  4. Activate the newsletter.

    Once the newsletter schedule is configured, you may begin the delivery by using the newsletter/update API with the parameter enableAutoPublish set to TRUE.

    At the designated time, the system will gather the stories for each newsletter section, depending on the section configurations, it will check for new search results since the last time the newsletter was published or look for ACTIVE stories in the story folders, and send the newsletter to the associated email recipients.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=TRUE

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  5. Confirm the newsletter is set to auto-publish.
    In the newsletter/info returned results, note that the newsletter element has its attribute enableAutoPublish set to TRUE.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="TRUE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE">
        <topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime>20190520T160927-0400</lastExecTime>
        <sections count="3">
          <section id="3456"/>
          <section id="3467"/>
          <section id="3455"/>
        </sections>
        <schedules count="1">
          <schedule id="400"/>
        </schedules>
        <bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
        <footer/>
      </newsletter>
    </opens-api>
  6. Pause the auto-publishing.
    To place a hold on automatically publishing the newsletter, use the newsletter/update API with the enableAutoPublish with the value as FALSE.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=FALSE

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  7. Delete a schedule.
    To permanently remove the schedule from the newsletter configuration, with the newsletter ID and schedule ID, submit a newsletter/deleteschedule request.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/deleteschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=400

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
Add a Periodic Schedule to a Newsletter
An alternative to setting specific times for the newsletter to publish is set a newsletter to publish at regular time intervals, e.g. every 15, 30 or 60 minutes.
  1. Add a periodic schedule.

    In contrast to the newsletter/addschedule example above, the newsletter/addschedule request here uses the following required parameters:

    • type - with the value periodic.
    • days - with the values for the days of the week separated by commas. The value for Monday through Friday is weekdays. The value for 7-days a week is all.
    • startTime - the time of day when the schedule will take effect, and with value submitted as hhmmss. This time is set per the timezone assigned to your OPENS API account. To modify the default timezone, contact the Acquire Media Administrator.
    • endTime - the time of day the newsletter will cease automatically publishing and value submitted as hhmmss.
    • periodInSeconds - time interval specified in seconds. e.g. 1800 would schedule the newsletter to send every 30 minutes.

    In this example, the newsletter will be configured to automatically publish on Mondays and Thursdays, every 30 minutes beginning at 8:00 AM and ending at 5:00PM. Remember, the default timezone is Eastern Time. Please contact the Acquire Media Administrator for assistance to modify the default timezone.

    The returned result is a schedule ID used to retrieve the schedule details with the newsletter/getschedule API.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/addschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&days=1,4&type=periodic&startTime=080000&endTime=170000&periodInSeconds=1800

    Response
    <opens-api>
      <status>OK</status>
      <scheduleID>402</scheduleID>
      </opens-api>
  2. Review the newsletter is set with the new schedule.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/info?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104

    Response
    <opens-api>
      <status>OK</status>
      <newsletter id="2104" name="Industry Update" desc="" enableAutoPublish="FALSE" enableHighlighting="TRUE" tocFormat="SECTION" storyFormat="HEADLINE" level="USER" permission="WRITE"><topArt id="868" name="Globe with dotted overlay" link="https://secure.newsedge.com/art/32966_USER_20190129091338004.jpg"/>
        <title>Pharmaceutical Industry Update</title>
        <dateFormat location="FOLLOW"><%B> <%e>, <%Y></dateFormat>
        <includePagetop>TRUE</includePagetop>
        <dateSubject>TRUE</dateSubject>
        <introduction><p>In the newsletter today are some top stories about our competitors and their new products at this year's annual trade show. </p><p>If you have any news to share with the rest of the company, please forward your items to Jane Doe, <a href="mailto:jdoe@mycompany.com?subject=Pharmaceutical%20News%20Update">jdoe@mycompany.com</a>.</p></introduction>
        <tocComment/>
        <lastExecTime>20190520T160927-0400</lastExecTime>
        <sections count="3"><section id="3456"/>
          <section id="3467"/>
          <section id="3455"/>
        </sections>
        <schedules count="1">
          <schedule id="402"/>
        </schedules>
        <bottomArt id="876" name="NewsEdge light" link="https://secure.newsedge.com/art/32966_USER_20190520134258415.png"/>
        <footer/>
      </newsletter>
    </opens-api>
  3. Get the schedule.
    With the schedule ID, request the newsletter/getschedule results to confirm the set up is for delivery on Mondays and Thursdays, every 30 minutes beginning at 8AM throughout the day until 5PM.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/getschedule?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&schedule=402

    Response
    <opens-api>
      <status>OK</status>
      <schedule id="402 ">
        <dayOfWeek number="1,4">
          <startTime>T080000-0500</startTime>
          <endTime>T170000-0500</endTime>
          <period>PT30M</period>
        </dayOfWeek>
      </schedule>
    </opens-api>
  4. Activate the newsletter to publish every 30 minutes.
    Use the newsletter/update API and the parameter enableAutoPublish with value TRUE.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/update?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2104&enableAutoPublish=TRUE

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>

Managing Newsletters
  1. List newsletters.

    To review the newsletters owned or shared with your OPENS API account use the newsletter/list API. From the returned results, the newsletter ID can be used with the other newsletter APIs to update and manage a particular newsletter, e.g. use the newsletter/info API to retrieve more details about the selected newsletter.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/list?session=935DA0B364E9E130F0EC3827FC3CCC9C

    Response
    <opens-api>
      <status>OK</status>
      <newsletters type="ALL">
        <newsletter id="2106" name="Market Update for Sales Group" owner="API Group" level="GROUP" permission="READ" schedule="NONE" enableAutoPublish="FALSE" enableHighlighting="" desc="" createdBy="API User" modifiedBy="Publishing Manager" modifiedOn="20190114T153416-0500"/>
        <newsletter id="2104" name="Industry Update" owner="OPENS API Trial User" level="USER" permission="WRITE" schedule="ACTIVE" enableAutoPublish="FALSE" enableHighlighting="TRUE" desc="" createdBy="API User" modifiedBy="API User" modifiedOn="20190521T135656-0400"/>
        <newsletter id="2115" name="Newsletter for Sales" owner="OPENS API Trial User" level="USER" permission="WRITE" schedule="ACTIVE" enableAutoPublish="FALSE" enableHighlighting="TRUE" desc="" createdBy="API User" modifiedBy="API User" modifiedOn="20190213T131136-0500"/>
      </newsletters>
    </opens-api>
  2. Delete a newsletter.
    Successfully delete a newsletter owned by the OPENS API user using the newsletter/delete API and the ID with the newsletter parameter. In this example, newsletter with ID 2115 will be deleted.

    Request
    https://secure.newsedge.com/opensapi/20/newsletter/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2115

    Response
    <opens-api>
      <status>OK</status>
    </opens-api>
  3. Delete a newsletter without proper rights.

    In this example, use the newsletter/delete API to delete the group level newsletter with ID 2106. An error is returned when the OPENS API user does not have the rights to delete a shared template.


    Request
    https://secure.newsedge.com/opensapi/20/newsletter/delete?session=935DA0B364E9E130F0EC3827FC3CCC9C&newsletter=2106

    Response
    <opens-api>
      <status>ERROR</status>
      <error>INVALID PUBLISHER LEVEL</error>
    </opens-api>