API
Get mailing lists
This example displays an overview of all mailing lists created in MailCamp, in an XML with the data found.
Parameters
| Field | Type | Description | Required / Optional |
|---|---|---|---|
username | string | The username used to log in to MailCamp. | Required |
usertoken | string | The unique token assigned to the user named above. | Required |
requesttype | string | The name of the relevant API file. | Required |
requestmethod | string | The name of the function being called. | Required |
responsetype | string | The format of the response. This can be 'xml' or 'json'. | Optional |
details | See the fields below. | Required | |
lists | int | Comma-separated list IDs of the lists you want to retrieve information about | Required |
sortinfo | int | See the fields below. | Optional |
sortinfo.SortBy | string | The order in which the lists in the array must be sorted (Name, CreateDate, subscribecount, unsubscribecount, fullname). | Optional |
sortinfo.Direction | string | Whether sorting must be from low to high or the other way around (asc or desc). | Optional |
countonly | string | Whether only the count must be returned. Default: false. | Optional |
confirmedonly | string | Whether only the confirmed lists must be returned. Default: true. | Optional |
start | int | Enter the number from which point the result must be returned. Default: 0 (first result). | Required |
perpage | int | The number of lists to return per result. Choose 'all' for all lists. Default: 10 | Required |
status | tinyint | Whether only the active lists must be returned. Default: 1. | Required |
Successful response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field is returned as “SUCCESS” on a successful response. |
status.listid | int | The ID of the mailing list. |
status.name | string | The name of the mailing list. |
status.createdate | int | The creation date (unix_timestamp) of the mailing list. |
status.updated | int | The date of the last change (unix_timestamp) of the mailing list. |
status.deleted | int | If the list has been deleted, a date (unix_timestamp) of the moment of deletion. |
status.status | tinyint | Status of the mailing list |
status.subscribecount | int | The total number of active and confirmed contacts on the mailing list. |
status.unsubscribecount | int | The total number of unsubscribed contacts on the mailing list. |
status.ownerid | int | The user ID of the owner of the mailing list. |
status.ownername | string | The name of the owner of the mailing list. |
status.owneremail | string | The sender address of the mailing list. |
status.bounceemail | string | The bounce address of the mailing list. |
status.replytoemail | string | The reply-to address of the mailing list. |
status.listconfirmed | tinyint | Status of the mailing list (confirmed or unconfirmed) |
status.spf | tinyint | Whether a valid SPF record was found |
status.dkim | tinyint | Whether a valid DKIM record was found |
status.autonewsletterid | int | The ID of the newsletter that must be sent after subscribing to a mailing list. Default: 0 |
status.username | string | The username of the owner of the mailing list |
status.fullname | string | The full name of the owner of the mailing list |
status.smtpserver | string | The SMTP settings of the owner of the mailing list |
Error response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field will be “FAILED”. |
errormessage | string | A text message explaining why the request failed. |
<xmlrequest>
<username>admin</username>
<usertoken>0123456789abcdef0123456789abcdef01234567</usertoken>
<requesttype>lists</requesttype>
<requestmethod>GetLists</requestmethod>
<responsetype>xml</responsetype>
<details>
<lists />
<countonly>false</countonly>
<confirmedonly>true</confirmedonly>
<sortinfo>
<SortBy>createdate</SortBy>
<Direction>asc</Direction>
</sortinfo>
<start>0</start>
<perpage>all</perpage>
</details>
</xmlrequest>