# Leboncoin: List a conversation's messages

`leboncoin/messages/list` · version 1.0.0 · pilot · 3 credits a call

The messages of one of a connected Leboncoin account's conversations, oldest first, page after page: who wrote, what, when, whether each side has read it, and Leboncoin's ready-made messages told apart.

Categories: Cars, Real estate, E-commerce

## When to use

You buy or sell on Leboncoin with a connected account and need what was said in a conversation, not only its last message: each message's text as written, whether the account or the person on the other side wrote it, when, whether the account has read it and whether the other side has read the account's, its attachments, and whether it is one of Leboncoin's ready-made messages (`kind: template`, with its template's id: "Is it still available?" and its answers). Give the conversation's id or its link, as leboncoin/conversations/list returns them. Reading leaves the conversation as it was: its messages stay unseen for the account's owner.

## Call

```bash
curl https://api.lobstr.io/v2/run \
  -H "Authorization: Bearer $LOBSTR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"source": "leboncoin", "operation": "messages/list", "options": {"conversation": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d"}}'
```

It answers:

```json
{"object": "run", "status": "succeeded", "count": 50, "has_more": true, "next": {"source": "leboncoin", "operation": "messages/list", "options": {...}},
 "cost": {"credits": 3}, "balance": {"credits": 9990}, "results": [...]}
```

`cost` and `balance` are objects: a call's credits are `cost.credits`. `results` holds the records (below). `next` is the whole call for the following page: send it as it is; `null` on the last page.

Beside `options`, the call takes:

| Parameter | Type | Description |
|---|---|---|
| `fields` | array of string | The record fields to keep, by path (`title`, `address.city`); `object`, `id` and `position` always come. Left out: every field. |
| `limit` | integer | Only the first N records of this call (1 to 1000), in the call's order; the call costs the same, and `next` keeps the limit. Left out: every record. |

## Options

| Option | Type | Required | Default | Description |
|---|---|---|---|---|
| `conversation` | string | yes |  | The conversation: its id, or its link (https://www.leboncoin.fr/messages/id/<id>), as leboncoin/conversations/list gives them (`id`, `url`). |
| `account` | string |  |  | The connected Leboncoin account the conversation is in (GET /v2/accounts). Left out, the platform takes the first of your Leboncoin accounts with a free slot. |
| `cursor` | string |  |  | Where to continue, from `next` in an answer, as it is: opaque, and only for the conversation it was given with (otherwise `invalid_cursor`). |

## Record

Each item of `results`. Every field is always present, `null` when the site gives nothing.

| Field | Type | Description |
|---|---|---|
| `object` | `"message"` |  |
| `id` | string | The message's id on Leboncoin. |
| `position` | integer | Its rank from the first message written: 1 opened the conversation. |
| `conversation_id` | string | The conversation's id, as conversations/list's `id`. |
| `text` | string | null | As written, a ready-made message as its writer left it. |
| `kind` | string | null | text, or template: one of the ready-made messages Leboncoin offers. |
| `template` | object | null | A ready-made message: which one, and whether its writer changed its words. |
| `template.id` | string | null | Leboncoin's name for it: vehicles_availability (is the car still available?), consumergoods_availability, seller_availability_1 (a seller's answer). |
| `template.modified` | boolean | null | Whether its writer changed its words before sending it. |
| `sent_at` | string | null (date-time) |  |
| `from_account` | boolean | null | Whether the connected account wrote it; false: the person on the other side did. |
| `read` | boolean | null | Whether the account has read it. |
| `read_by_other` | boolean | null | Whether the person on the other side has read the account's messages up to this one. |
| `attachments` | array | Its photos and files, as Leboncoin gives them. |
| `source_url` | string (uri) | The conversation on leboncoin.fr. |
| `observed_at` | string (date-time) |  |

Example:

```json
{
  "object": "message",
  "id": "ac4b8090-ed4d-11f1-8080-808080808080",
  "position": 1,
  "conversation_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "text": "Bonjour GARAGE DU CENTRE,\n\nVotre annonce « Renault Clio V 1.0 TCe 90 Evolution » m'intéresse. Est-elle toujours disponible ?\n\nMerci d'avance !",
  "kind": "template",
  "template": {
    "id": "vehicles_availability",
    "modified": true
  },
  "sent_at": "2026-11-30T07:08:48Z",
  "from_account": true,
  "read": true,
  "read_by_other": true,
  "attachments": [],
  "source_url": "https://www.leboncoin.fr/messages/id/0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "observed_at": "2026-12-01T12:00:00Z"
}
```

## Price

3 credits a page of up to 50 messages. An empty page, a busy account and a failed call are free.

## Errors

| Code | Status | Retry | Message |
|---|---|---|---|
| `invalid_options` | 422 | no | Pass `conversation`: a conversation's id or its link (https://www.leboncoin.fr/messages/id/<id>), as leboncoin/conversations/list gives them. |
| `invalid_cursor` | 422 | no | This cursor was not given by an answer; send `next` from the last answer as it is. |
| `conversation_not_found` | 404 | no | This account has no such conversation: it is another account's, or it was deleted. List the account's own with leboncoin/conversations/list (not charged). |
| `account_required` | 422 | no | You have no connected Leboncoin account. Connect one with POST /v2/accounts {"site": "leboncoin", "cookies": ...}, the cookies of a browser where you are logged in to Leboncoin (https://docs.lobstr.io/accounts). |
| `account_rate_limited` | 429 | yes | This Leboncoin account cannot read right now: it pauses a few seconds between two calls, makes 600 a day across the messaging operations, and Leboncoin can slow it down. `retry_after` says when it can again, in seconds. Retrying before then gets this same answer: nothing is queued. |
| `account_quota_exceeded` | 429 | yes | This Leboncoin account reached its calls for today; `retry_after` says when the day starts over (midnight UTC). |
| `account_unusable` | 409 | no | Leboncoin logged this account out. Connect it again with POST /v2/accounts and fresh cookies from a browser where you are logged in (the same login keeps its id). |
| `site_challenge` | 503 | yes | Leboncoin asked this account to prove it is a person. Open leboncoin.fr in the browser the account syncs from, then retry (not charged). |
| `site_unavailable` | 503 | yes | Leboncoin did not answer properly; retry later (not charged). |
| `unexpected_answer` | 424 | no | Leboncoin answered in a shape we do not read yet; we are told and fix it (not charged). |
| `missing_api_key` | 401 | no | No API key: send it as `Authorization: Bearer <key>`. |
| `invalid_api_key` | 401 | no | The key is not valid, or not anymore. |
| `insufficient_credits` | 402 | no | The call costs more credits than are left. |
| `unknown_operation` | 404 | no | No such source and operation in the catalog. |
| `timeout` | 408 | yes | The call did not finish within its deadline (not charged). |
| `invalid_body` | 422 | no | The body is not a call: source, operation, options. |
| `invalid_options` | 422 | no | An option is missing or out of its contract; `param` names it. |
| `invalid_idempotency_key` | 400 | no | The Idempotency-Key header is not printable ASCII, or too long. |
| `concurrency_limit` | 429 | yes | The plan's calls at a time are all in progress (Free 1, Starter 2, Pro 10, Team 50); retry when one has finished (not charged, never queued). |
| `service_busy` | 503 | yes | Too many calls at once on the account; retry in a few seconds. |
| `balance_unavailable` | 503 | yes | The balance could not be read; retry in a few seconds. |

## Changelog

- **1.0.0** (2026-12-01): First version: the messages of a connected Leboncoin account's conversation, private or pro, oldest first, 50 a page, each with its text, its writer, its date, its read marks, its attachments and Leboncoin's ready-made messages told apart; read without marking them read.

Schema: https://api.lobstr.io/v2/catalog/leboncoin/messages/list · All operations: https://api.lobstr.io/v2/catalog.md
