Sources
Add a new source
Create a new source.
A source created using API is automatically visible on all MailUp lists and to all the users who have access to the Content area on the web application
HTTP Method
SourceName is the text displayed on the web application. It does not have to be unique and you can change it later
IsEnabled should be set to false if you want to avoid automatic campaigns to be triggered when this source is updated
Code Block |
---|
{
"SourceName": "mySource02",
"IsEnabled": true
} |
An error is returned if you set a null or empty SourceName.
Keep the returned IdSource value to manage this source or to push content in it.
Code Block |
---|
{
"CreationDate": "2018-08-17 08:06:35Z",
"IdSource": 902,
"IsEnabled": true,
"SourceName": "mySource02",
"SourceType": 2,
"UpdateDate": "2018-08-17 08:06:35Z"
} |
Get all available sources
At the moment there is not a method to filter by source name. You need to retrieve a list of items and parse it
HTTP Method
Content sources
Add a new source
Description | Create a new source. A source created using API is automatically visible on all MailUp lists and to all the users who have access to the Content area on the web application | ||||||
---|---|---|---|---|---|---|---|
HTTP Method | POST | ||||||
URL | |||||||
JSON request (example) | none | JSON response (example) | Expand | isEnabled = true means that this source can trigger an automated campaign SourceType = 2 means that content can be pushed from files or API, while SourceType =1 means that content is pulled from an external URL (e.g. a RSS feed) . Code Block | SourceName is the text displayed on the web application. It does not have to be unique and you can change it later IsEnabled should be set to false if you want to avoid automatic campaigns to be triggered when this source is updated
| ||
JSON response (example) | An error is returned if you set a null or empty SourceName. Save the returned IdSource value to manage this source or to push content in it. | ||||||
Description | Update a source by changing its name or its status | ||||||
HTTP Method | PUT | ||||||
URL | |||||||
JSON request (example) | SourceName has to be unique. An error is returned if you leave it null or empty
| ||||||
JSON response (example) |
| ||||||
Paging and filtering (example) | Pagination GET /Console/ContentProvider/Sources?pageSize={max_items} to limit the number of returned items. Default value is 20. GET /Console/ContentProvider/Sources?pageSize=1&pageNumber=0&orderby="UpdateDate ASC" to get the last modified item Sorting You can sort only by 'IdSource', 'UpdateDate', 'SourceName' (e.g. GET /Console/ContentProvider/Sources?orderby="idSource DESC" ) |
| |
Paging and filtering (example) |
|
---|
Get all available sources
Description | Read all the available sources At the moment there is not a method to filter by source name. You need to retrieve a list of items and parse it | ||||
---|---|---|---|---|---|
HTTP Method | GET | ||||
URL | |||||
JSON request (example) | none | ||||
JSON response (example) |
| ||||
Paging and filtering (example) |
Remove a source
Description | Delete a source |
---|---|
HTTP Method | DELETE |
URL | https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc Pagination GET /Console/ContentProvider/Sources?pageSize={max_items} to limit the number of returned items. Default value is 20. GET /Console/ContentProvider/Sources /{source_id} |
JSON request (example) | none |
JSON response (example) | Paging and filtering (example) |
Content
Upload content
HTTP Method
Expand | ||
---|---|---|
Use UploadMode = 2 (incremental) Please note that "Items" is an array of comma separated values. With a single API call you can upload more content items. In case of bulk upload, any automated campaign related to the source is triggered once at the end of the whole process. ContentKey is a mandatory tag that informs MailUp if you are providing a new content or if you want to upload an existing one. Refer to the collapsed table on the top of this page for a list of all supported tags.
|
Get content list
Description | Retrieve a list of content related to a source |
---|---|
HTTP Method | GET |
URL | https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc ?pageSize=1&pageNumber=0&orderby="UpdateDate ASC" to get the last modified item Sorting You can sort only by 'IdSource', 'UpdateDate', 'SourceName' (e.g. GET /Console/ContentProvider/Sources?orderby="idSource DESC" ) |
Update a source
Description | Update a source by changing its name or its status | ||
---|---|---|---|
HTTP Method | PUT | ||
URL | |||
JSON request (example) | It is recommended you specify only the fields you want to change. "SourceName" cannot be empty or whitespace.
| ||
JSON response (example) | |||
Paging and filtering (example) |
|
Remove a source
Description | Delete a source |
---|---|
HTTP Method | DELETE |
URL | |
JSON request (example) | none |
JSON response (example) | |
Paging and filtering (example) |
|
Content
Upload content
Description | Upload one or more content items | ||||
---|---|---|---|---|---|
HTTP Method | POST | ||||
URL | |||||
JSON request (example) |
| ||||
JSON response (example) | When successful, a task ID is returned. Please note that content upload is an asynchronous task, hence a successful response does not guarantee that the upload is completed, especially for large content lists.
| ||||
Paging and filtering (example) |
|
Get content list
Description | Retrieve a list of content items related to a source | ||||
---|---|---|---|---|---|
HTTP Method | GET | ||||
URL | |||||
JSON request (example) | none | ||||
JSON response (example) |
| ||||
Paging and filtering (example) | Paging Default page size is 20, page numbers start with zero (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content | ||||
JSON request (example) | none | ||||
JSON response (example) | Paging and filtering (example) |
Remove content
Description | Delete content |
---|---|
HTTP Method | DELETE |
URL | Paging and filtering (example)https://services.mailup.com/API/v1.1/Rest/ConsoleService.svc ?pageSize=100&pagenumber=0) Sorting You can sort only by 'ContentKey', 'ContentLoadingDate', 'ContentDate', 'Title' (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content?orderBy="ContentDate DESC" ) Filtering Search for items that match the provided input (e.g. GET /Console/ContentProvider/Sources/{source_id}/Content /{{CONTENT_KEY}} |
JSON request (example) | none |
JSON response (example) | |
?searchBy="ContentKey"&searchText="1229c6d6" to get all the items whose ContentKey contains "1229c6d6" Concatenated conditions Use '&' to link together a series of conditions |