You are here: Communications Cloud API v1 > Resources > Bulletins > Create a Draft Bulletin

Create a Draft Bulletin

POST to /api/account/ACCOUNT_CODE/bulletins.xml

Example Input
<bulletin>
    <header>ENTER HEADER</header>
    <from_address_id>####</from_address_id>
    <subject>ENTER SUBJECT</subject>
    <body><![CDATA[<p>ENTER BODY in <b>cdata tag</b></p>]]></body>
    <footer>ENTER FOOTER</footer>
    <sms_body nil='true'></sms_body>
    <publish_rss type='boolean'>false</publish_rss>
    <open_tracking type='boolean'>true</open_tracking>
    <click_tracking type='boolean'>true</click_tracking>
    <share_content_enabled type='boolean'>true</share_content_enabled>
    <topics type='array'>
      <topic>
        <code>####</code>
      </topic>
      <topic>
        <code>####</code>
      </topic>
    </topics>
    <categories type='array' />
  </bulletin>
Bulletin Content

Specify the content for your bulletin in the <header>, <footer>, and <body> elements. You can specify HTML formatting by using CDATA blocks. Text inside a CDATA section is not parsed, and this allows you to include characters necessary for HTML, like "<" and ">" without generating an XML error.

If you do not include these elements in the payload, the content will come from whatever template is used. For bulletins sent for one topic, that's the topic bulletin template. For bulletins sent for more than one topic or for a category, it's the general bulletin template. Both templates are configured in the administrative interface. Learn more about Bulletin Templates.

Attachments

If you want to attach a file to the bulletin, your input must be a multipart form. If you use XML for your input, you must create the bulletin using this method first, and then add an attachment to it using a multipart form with the Add a Bulletin Attachment method. See the first input example for Create and Send a Bulletin to get an idea of how to use a multipart form for this call.

When using the multipart input form, attachments are included as links to files hosted on our servers by default. If you'd like actually include the attachment as a file with the bulletin, you can use the following attributes.

Elements
Example Output
<?xml version="1.0" encoding="UTF-8"?>
  <bulletin>
    <to-param>BULLETIN_ID</to-param>
    <link rel="self" href="/api/account/ACCOUNT_CODE/bulletins/BULLETIN_ID" />
    <link rel="send_now" href="/api/account/ACCOUNT_CODE/bulletins/BULLETIN_ID/send_now" />
  </bulletin>
Troubleshooting

If you enter any invalid topic or category codes, these are discarded. If you have multiple topics or categories entered for this bulletin, only the valid ones will be applied. If no valid codes are provided in the payload, then the API will return an error.

Reference bulletin error codes

 

Was this page helpful? Can't find what you need? Let us know