Skip to navigation

Trying out the API with Try it

On every endpoint page, you will find the ‘Try it’ button at the top right of the code example. This allows you to enter the parameters into a form and send the call directly from your browser. The response appears below it: the exact same JSON you would receive in your own code.

Entering your API key

At the top of the form, paste your API key into the ‘api_key’ field. There is no password field, because the API does not require a password. You can read why this is the case under Authentication with your API key.

Your key remains in your own browser and is not sent to the creators of this site. The request goes directly from your browser to api.laposta.nl, over https.

Please note: this is a real call

There is no separate test environment. If you enter a valid key and send a call that creates something, it will actually be created in your account.

Do not use a key from an account with a live subscriber base while you are testing things out. Also be careful if you are working on a shared computer: your key will remain saved in that browser until you clear it.

If you leave the field completely blank, nothing bad will happen. The call is sent without a key and the API responds with a 401, because without a key the API does not know which account is being accessed. This error message is explained under Authentication with your API key.

Testing safely with a separate list

You can test safely by creating a separate test list in your account. Create a single list, note down the list_id and direct all your test calls to it. Your live lists will then remain untouched, even if something goes wrong.

Creating a separate free test account is usually not an option; see One free account per organisation. If you are a developer and genuinely need an isolated environment, please contact the helpdesk at helpdesk@laposta.nl. It is possible to create multiple paid accounts, bundled in a management environment.

Endpoints without Try it

For a number of endpoints, the ‘Try it’ button has been left out on purpose, because those calls cannot be undone or will start running automatically:

EndpointWhy not
All delete endpointsthe object is permanently gone afterwards
Emptying a listdeletes all subscribers in the list
Synchronising a list (bulk)modifies up to 500,000 subscribers at once
Sending a campaignsends real emails to real recipients
Scheduling a campaignqueues a campaign to be sent at the scheduled time

The code examples are still provided on those pages, so you can see exactly what the call looks like.

Choosing a programming language

Above the code example, you can select the programming language. On the endpoint page itself, there are nine options, ranging from cURL and PHP to Python, Go and Swift. In the ‘Try it’ screen, there are three (cURL, JavaScript and Python), because this shows a preview of your current input rather than the full list.