This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with Messages in ActiveCampaign
Overview
The following operations allow you to work with messages. Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with messages, see Sample configuration.
Operation | Description |
---|---|
Creates a new e-mail message in the system. | |
getMessageById | Retrieves a message. |
listMessages | Retrieves all messages. |
Operation details
This section provides further details on the operations related to messages.
Creating a plan
The createMessage
operation creates a new e-mail message in the system.
<activecampaign.createMessage> <format>{$ctx:format}</format> <subject>{$ctx:subject}</subject> <fromEmail>{$ctx:fromEmail}</fromEmail> <fromName>{$ctx:fromName}</fromName> <replyTo>{$ctx:replyTo}</replyTo> <priority>{$ctx:priority}</priority> <charset>{$ctx:charset}</charset> <encoding>{$ctx:encoding}</encoding> <htmlConstructor>{$ctx:htmlConstructor}</htmlConstructor> <html>{$ctx:html}</html> <htmlFetch>{$ctx:htmlFetch}</htmlFetch> <htmlFetchWhen>{$ctx:htmlFetchWhen}</htmlFetchWhen> <messageUploadHtml>{$ctx:messageUploadHtml}</messageUploadHtml> <textConstructor>{$ctx:textConstructor}</textConstructor> <text>{$ctx:text}</text> <textFetch>{$ctx:textFetch}</textFetch> <textFetchWhen>{$ctx:textFetchWhen}</textFetchWhen> <messageUploadText>{$ctx:messageUploadText}</messageUploadText> <attach>{$ctx:attach}</attach> <listIds>{$ctx:listIds}</listIds> </activecampaign.createMessage>
Properties
The format of the message.format:
The subject of the message.subject:
The e-mail address of the sender.fromEmail:
The name of the sender.fromName:
The e-mail address that recipients should reply to.replyTo:
The priority of the message.priority:
The character set used.charset:
The encoding type used.encoding:
Indicates whether to use "editor", "external" or "upload".htmlConstructor:
If htmlConstructor is "html", gives the content of your HTML e-mail address.html:
If htmlConstructor is "external", gives the URL to fetch the e-mail address from.htmlFetch:
If htmlConstructor is "external", informs when to fetch the e-mail address.htmlFetchWhen:
HTML version. Not supported yet: an ID of uploaded content.messageUploadHtml:
Indicates whether to use "editor", "external" or "upload".textConstructor:
If textConstructor is "editor", gives the content of your text only e-mail address.text:
If textConstructor is "external", gives the URL to fetch the body from.textFetch:
If textConstructor is "external", informs when to fetch the e-mail address.textFetchWhen:
Text version. Not supported yet: an ID of uploaded contentmessageUploadText:
Not supported yet: an ID of an uploaded file.attach:
The list of IDs.listIds:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.createMessage
{ "apiUrl":"http://anusoft.api-us1.com", "apiKey":"32dc630082287cb074342f151370929a8c36adaf80eacac7c1d3b03fdb0e8d8382aab80f", "apiOutput":"json", "format" : "text", "subject" : "testing from soapui 1", "fromEmail" : "anu.thushi@gmail.com", "fromName" : "Chamath", "replyTo" : "anu.thushi@gmail.com", "priority" : "1", "charset" : "utf-8", "encoding" : "quoted-printable", "htmlConstructor" : "editor", "html" : "chamath", "htmlFetch" : "", "htmlFetchWhen" : "", "textConstructor" : "editor", "text" : "https://www.google.lk", "textFetch" : "", "textFetchWhen" : "", "listIds" : { "p[1]":1, "p[2]":2 } }
Related ActiveCampaign documentation
http://www.activecampaign.com/api/example.php?call=message_add
Retrieving a message
The
operation retrieves a message by ID.getMessageById
<activecampaign.getMessageById> <id>{$ctx:id}</id> </activecampaign.getMessageById>
Properties
The ID of the message.id:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.getMessageById
{ "apiUrl":"http://anusoft.api-us1.com", "apiKey":"32dc630082287cb074342f151370929a8c36adaf80eacac7c1d3b03fdb0e8d8382aab80f", "apiOutput":"json", "id" : "" }
Related ActiveCampaign documentation
http://www.activecampaign.com/api/example.php?call=message_view
Retrieving all messages
The
operation retrieves all messages.listMessages
<activecampaign.listMessages> <ids>{$ctx:ids}</ids> <page>{$ctx:page}</page> </activecampaign.listMessages>
Properties
The IDs of the messages.ids:
The number of the page.page:
Sample request
Following is a sample REST/JSON request that can be handled by the
operation.listMessages
{ "apiUrl":"http://anusoft.api-us1.com", "apiKey":"32dc630082287cb074342f151370929a8c36adaf80eacac7c1d3b03fdb0e8d8382aab80f", "apiOutput":"json", "ids" : "all", "page" : "" }
Related ActiveCampaign documentation
http://www.activecampaign.com/api/example.php?call=message_list
Sample configuration
Following is a sample proxy service that illustrates how to connect to ActiveCampaign with the init
operation and use the
operation. The sample request for this proxy can be found in the createMessage sample request. You can use this sample as a template for using other operations in this category.createMessage
<proxy xmlns="http://ws.apache.org/ns/synapse" name="activecampaign_createMessage" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="apiUrl" expression="json-eval($.apiUrl)"/> <property name="apiKey" expression="json-eval($.apiKey)"/> <property name="apiOutput" expression="json-eval($.apiOutput)"/> <property name="format" expression="json-eval($.format)"/> <property name="subject" expression="json-eval($.subject)"/> <property name="fromEmail" expression="json-eval($.fromEmail)"/> <property name="fromName" expression="json-eval($.fromName)"/> <property name="replyTo" expression="json-eval($.replyTo)"/> <property name="priority" expression="json-eval($.priority)"/> <property name="charset" expression="json-eval($.charset)"/> <property name="encoding" expression="json-eval($.encoding)"/> <property name="htmlConstructor" expression="json-eval($.htmlConstructor)"/> <property name="html" expression="json-eval($.html)"/> <property name="htmlFetch" expression="json-eval($.htmlFetch)"/> <property name="htmlFetchWhen" expression="json-eval($.htmlFetchWhen)"/> <property name="textConstructor" expression="json-eval($.textConstructor)"/> <property name="text" expression="json-eval($.text)"/> <property name="textFetch" expression="json-eval($.textFetch)"/> <property name="textFetchWhen" expression="json-eval($.textFetchWhen)"/> <property name="listIds" expression="json-eval($.listIds)"/> <activecampaign.init> <apiUrl>{$ctx:apiUrl}</apiUrl> <apiKey>{$ctx:apiKey}</apiKey> <apiOutput>{$ctx:apiOutput}</apiOutput> </activecampaign.init> <activecampaign.createMessage> <format>{$ctx:format}</format> <subject>{$ctx:subject}</subject> <fromEmail>{$ctx:fromEmail}</fromEmail> <fromName>{$ctx:fromName}</fromName> <replyTo>{$ctx:replyTo}</replyTo> <priority>{$ctx:priority}</priority> <charset>{$ctx:charset}</charset> <encoding>{$ctx:encoding}</encoding> <htmlConstructor>{$ctx:htmlConstructor}</htmlConstructor> <html>{$ctx:html}</html> <htmlFetch>{$ctx:htmlFetch}</htmlFetch> <htmlFetchWhen>{$ctx:htmlFetchWhen}</htmlFetchWhen> <messageUploadHtml>{$ctx:messageUploadHtml}</messageUploadHtml> <textConstructor>{$ctx:textConstructor}</textConstructor> <text>{$ctx:text}</text> <textFetch>{$ctx:textFetch}</textFetch> <textFetchWhen>{$ctx:textFetchWhen}</textFetchWhen> <messageUploadText>{$ctx:messageUploadText}</messageUploadText> <attach>{$ctx:attach}</attach> <listIds>{$ctx:listIds}</listIds> </activecampaign.createMessage> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>