API
Create mailing list
This example shows how you can create a mailing list through the API.
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 | |
details.name | string | The name of the mailing list. | Required |
details.owneremail | string | The sender address of the mailing list. | Required |
details.ownername | string | The sender name of the mailing list. | Required |
details.bounceemail | string | The bounce address of the mailing list. | Required |
details.replytoemail | string | The reply-to address of the mailing list. | Required |
details.createdate | string | The creation date of the mailing list. | Required |
details.listconfirmed | tinyint | The confirmation status of a mailing list. 1 is confirmed. Default: 0. | Required |
details.notifyowner | tinyint | Notify the owner when someone subscribes or unsubscribes. Default: 1. | Required |
details.imapaccount | tinyint | The bounce address is an IMAP account. Default: 1. | Required |
details.bounceserver | string | The hostname of the bounce address. | Required |
details.bounceusername | string | The username of the bounce address. | Required |
details.bouncepassword | string | The password of the bounce address. | Required |
details.extramailsettings | string | Extra mail settings. Options: '/novalidate-cert', '/notls', '/nossl'. Default: '/notls' | Required |
details.companyname | string | Company name. This information goes into the vCard that can be linked to in the newsletter. | Optional |
details.companyaddress | string | Company address. This information goes into the vCard that can be linked to in the newsletter. | Optional |
details.companyphone | string | Phone number. This information goes into the vCard that can be linked to in the newsletter. | Optional |
details.ownerid | int | The user ID of the owner of the mailing list. | Required |
details.subscribecount | int | The total number of active and confirmed contacts on the mailing list. Default: 0 | Optional |
details.unsubscribecount | int | The total number of unsubscribed contacts on the mailing list. Default: 0 | Optional |
details.agreedelete | boolean | The bounced addresses found in the mailbox are deleted after processing. | Required |
details.agreedeleteall | boolean | All addresses are deleted from the mailbox after processing. | Required |
details.visiblefields | string | Comma-separated standard fields and IDs of custom fields that must be visible in the contacts overview. | Required |
details.customfields | string | Comma-separated IDs of custom fields that must be linked to the mailing list. | Required |
Successful response
| Field | Type | Description |
|---|---|---|
status | string | The value of the status field is returned as “SUCCESS” on a successful response. |
data | int | If the statistics are found, the object is returned. |
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>Create</requestmethod>
<responsetype>xml</responsetype>
<details>
<name>Mailinglijst</name>
<owneremail>info@mailcamp.nl</owneremail>
<ownername>MailCamp B.V.</ownername>
<bounceemail>bounce@mailcamp.nl</bounceemail>
<replytoemail>antwoord@mailcamp.nl</replytoemail>
<createdate>1483228800</createdate>
<listconfirmed>1</listconfirmed>
<notifyowner>1</notifyowner>
<imapaccount>1</imapaccount>
<bounceserver>mail.domein.nl:993</bounceserver>
<bounceusername>bounce@mailcamp.nl</bounceusername>
<bouncepassword>W@chtw00rd</bouncepassword>
<extramailsettings>/novalidate-cert/ssl</extramailsettings>
<companyname>MailCamp B.V.</companyname>
<companyaddress>Amsterdamsevaart 26</companyaddress>
<companyphone>020-7058500</companyphone>
<ownerid>99</ownerid>
<subscribecount>0</subscribecount>
<unsubscribecount>0</unsubscribecount>
<processbounce>1</processbounce>
<agreedelete>1</agreedelete>
<agreedeleteall>1</agreedeleteall>
<visiblefields>emailaddress,subscribedate,updated,status,confirmed,2,4</visiblefields>
<customfields>2,3,4,5</customfields>
</details>
</xmlrequest>