> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.laposta.org/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.laposta.org/_mcp/server.

# The Laposta API

> Connect Laposta to your own software: synchronise subscribers, send campaigns and receive events via webhooks.

This is a REST API for developers who want to connect their own environment to Laposta. From your own software, you can manage lists, fields, subscribers, segments, campaigns, results and webhooks. The API is most commonly used to place new sign-ups from an online shop or CRM directly into the right list.

All calls are made via `https://api.laposta.nl/v2`. The API returns responses in JSON and uses standard HTTP status codes. Authentication uses basic auth, with your API key as the username and an empty password. You can create an API key in your account under Connect. A library is not required, though libraries are available for PHP and .NET.

If you are looking for a ready-made integration that does not require any programming, take a look at [Connect](/koppelingen-overzicht).

## Start here

#### [First API call](/je-eerste-api-aanroep)

Retrieve your lists within five minutes, either from this site or from your own computer.

#### [Authentication with your API key](/api-authenticatie)

The Laposta API uses basic auth with your API key as the username and an empty password.

#### [Trying out the API with Try it](/api-uitproberen)

With the Try it button, you can make a live call straight away without installing anything.

## Guides

#### [Synchronising subscribers through the API](/relaties-synchroniseren-via-de-api)

Keep your list in Laposta in sync with your online shop or CRM: adding, updating, unsubscribing and handling errors neatly.

#### [Using webhooks for changes](/webhooks-gebruiken)

Have Laposta notify your system as soon as someone subscribes, unsubscribes or updates their details.

#### [Sending a campaign through the API](/campagne-versturen-via-de-api)

Create a campaign, populate it with your own HTML, send a testmail and schedule the delivery.

#### [Common mistakes with the API](/veelgemaakte-fouten-met-de-api)

What integrations often get stuck on in practice, which error message you get and how to solve it.

## API reference

The reference is structured in the same order as you build an integration: you start with a list, decide which data to store, add subscribers to it, and only then start sending.

[Lists Create, retrieve, empty and synchronise all at once. View](/lijsten/lijst-toevoegen)

[Fields Determine which details you store per subscriber, from text to multiple choice. View](/velden/veld-toevoegen)

[Subscribers Add, update, unsubscribe and retrieve the history. View](/relaties/relatie-toevoegen)

[Segments Selections within a list, saved as a definition using blocks and rules. View](/segmenten/segment-toevoegen)

[Campaigns Create, populate with your own HTML, test, schedule and send. View](/campagnes/campagne-aanmaken)

[Results Retrieve how many emails were delivered, opened and clicked. View](/resultaten/campagneresultaten-opvragen)

[Webhooks Have Laposta notify your system as soon as something changes. View](/webhooks/webhook-toevoegen)

## Libraries

You can call the API directly, but ready-made libraries are available for two languages to take care of the HTTP work for you: [PHP](https://github.com/laposta/laposta-api-php) and [.NET (C#)](https://github.com/laposta/laposta-api-dotnet), both with examples for each section.

**`PHP installeren`**

```bash title="PHP installeren"
composer require laposta/laposta-api-php
```

In the guides, you will find the PHP version alongside every curl example. In the code panel on the endpoint pages, you can choose the language yourself, from cURL to Python, Go and Swift. These are standard HTTP examples, without a library.

## The API with an AI assistant

You do not have to write the calls yourself. An AI assistant can use the same endpoints with your key, and there is a ready-made skill that already knows the entire reference above. What you can do with it, how to set it up safely and where its limits lie is explained in [Connect an AI assistant](/laposta-gebruiken-met-ai).