# Leboncoin: List conversations

`leboncoin/conversations/list` · version 1.0.0 · pilot · 1 credits a call

A connected Leboncoin account's inbox, page after page: each conversation with its listing, the person on the other side, the last message and its date, and its count of unseen messages.

Categories: Cars, Real estate, E-commerce

## When to use

You buy or sell on Leboncoin with a connected account and need its inbox: the conversations about the listings you wrote to (`role: buyer`) and about your own listings (`role: seller`), or both (the default), the most recent first, each with its listing (id, title, status, category, photo, its seller's id and whether a pro), the person on the other side (name, id), the last message as written and when, its count of messages not seen, and its link. Keep only the conversations with unseen messages (`unread`), like Leboncoin's Non lus tab. A conversation's messages are leboncoin/messages/list's: give it the conversation's `id`. Private and pro accounts alike.

## Call

```bash
curl https://api.lobstr.io/v2/run \
  -H "Authorization: Bearer $LOBSTR_API_KEY" \
  -H "content-type: application/json" \
  -d '{"source": "leboncoin", "operation": "conversations/list", "options": {"unread": true}}'
```

It answers:

```json
{"object": "run", "status": "succeeded", "count": 50, "has_more": true, "next": {"source": "leboncoin", "operation": "conversations/list", "options": {...}},
 "cost": {"credits": 1}, "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 |
|---|---|---|---|---|
| `role` | `all`, `buyer`, `seller` |  | `"all"` | Which conversations: `buyer`, those about listings the account wrote to (Leboncoin's Achats tab); `seller`, those about the account's own listings (Ventes); `all`, both. |
| `unread` | boolean |  | `false` | Only the conversations with messages the account has not seen (Leboncoin's Non lus tab). |
| `account` | string |  |  | The connected Leboncoin account whose inbox to read (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 inbox and filters 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` | `"conversation"` |  |
| `id` | string | The conversation's id on Leboncoin: leboncoin/messages/list reads its messages. |
| `position` | integer | Its rank in the inbox, across pages (51 is the first of page 2); a filter leaves gaps. |
| `role` | `buyer`, `seller` | buyer: the account wrote about someone else's listing; seller: about the account's own. |
| `url` | string (uri) | The conversation on leboncoin.fr (www.leboncoin.fr/messages/id/<id>). |
| `listing` | object | null | The listing the conversation is about. |
| `listing.id` | string | null | leboncoin/listings/get reads it whole. |
| `listing.title` | string | null |  |
| `listing.status` | string | null | As Leboncoin says it: active, deleted (no longer online). |
| `listing.category_id` | string | null | Leboncoin's category number: 2 for cars, 9 for flats and houses for sale. |
| `listing.photo_url` | string | null |  |
| `listing.owner_id` | string | null | Its seller's id: the account's own when `role` is seller. |
| `listing.owner_type` | string | null | professional or private; null once the listing is deleted. |
| `other` | object | null | The person on the other side: the seller when the account buys, the buyer when it sells. |
| `other.id` | string | null |  |
| `other.name` | string | null | As Leboncoin shows it: a pseudonym, or a pro store name (RENAULT ETAMPES). |
| `last_message` | object | null |  |
| `last_message.text` | string | null | Its preview, as written. |
| `last_message.sent_at` | string | null (date-time) |  |
| `last_message.attachments_count` | integer | null | How many photos or files it carries. |
| `unread_count` | integer | null | How many messages the account has not seen. |
| `account` | string | null | The connected account it was read with, when one was named. |
| `source_url` | string (uri) | The inbox on leboncoin.fr. |
| `observed_at` | string (date-time) |  |

Example:

```json
{
  "object": "conversation",
  "id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "position": 1,
  "role": "buyer",
  "url": "https://www.leboncoin.fr/messages/id/0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
  "listing": {
    "id": "3000000001",
    "title": "Renault Clio V 1.0 TCe 90 Evolution",
    "status": "active",
    "category_id": "2",
    "photo_url": "https://img.leboncoin.fr/api/v1/lbcpb1/images/00/00/00/0000000000000000000000000000000000000000.jpg?rule=ad-thumb",
    "owner_id": "11111111-2222-4333-8444-555555555555",
    "owner_type": "professional"
  },
  "other": {
    "id": "11111111-2222-4333-8444-555555555555",
    "name": "GARAGE DU CENTRE"
  },
  "last_message": {
    "text": "Bonjour, oui le véhicule est toujours disponible",
    "sent_at": "2026-11-30T10:56:52Z",
    "attachments_count": 0
  },
  "unread_count": 1,
  "account": null,
  "source_url": "https://www.leboncoin.fr/messages",
  "observed_at": "2026-12-01T12:00:00Z"
}
```

## Price

1 credit a page of up to 50 conversations. An empty page, a busy account and a failed call are free.

## Errors

| Code | Status | Retry | Message |
|---|---|---|---|
| `invalid_options` | 422 | no | `role` is all, buyer or seller; `unread` is true or false. |
| `invalid_cursor` | 422 | no | This cursor was not given by an answer; send `next` from the last answer as it is. |
| `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: a connected Leboncoin account's inbox, private or pro, 50 conversations a page, each with its listing, the person on the other side, the last message, its unseen count and its link; as a buyer, a seller or both, and only the unread ones.

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