Leboncoin: Send a message
Sends a reply with a connected Leboncoin account in one of its conversations, as its messages page does, and answers the message as Leboncoin keeps it.
curl https://api.lobstr.io/v2/run \ -H "Authorization: Bearer $LOBSTR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "source": "leboncoin", "operation": "messages/send", "options": { "conversation": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "text": "Merci pour votre retour, je reviens vers vous rapidement." } }'
An example answer, from the contract. Run it on your own input with your API key.
{ "object": "run", "id": "run_r7jl5eeoa4752s7jgtxh5rvfma", "livemode": true, "source": "leboncoin", "operation": "messages/send", "version": "1.0.0", "schema_url": "https://api.lobstr.io/v2/catalog/leboncoin/messages/send", "options": { "conversation": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "text": "Merci pour votre retour, je reviens vers vous rapidement." }, "fields": null, "status": "succeeded", "count": 1, "has_more": false, "next": null, "cost": { "credits": 20 }, "results": [ { "object": "message", "id": "f8797b50-ed9f-11f1-8080-808080808080", "position": 1, "conversation_id": "0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "text": "Merci pour votre retour, je reviens vers vous rapidement.", "kind": "text", "template": null, "sent_at": "2026-12-01T15:57:54Z", "from_account": true, "read": true, "read_by_other": false, "attachments": [], "source_url": "https://www.leboncoin.fr/messages/id/0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d", "observed_at": "2026-12-01T15:57:55Z" } ] }
15 fields per message
Every call returns them for each record, in the results of its JSON answer.
Send a message
15 fields- object
- text
- message
- id
- id
- The message's id on Leboncoin.
f8797b50-ed9f-11f1-8080-808080808080- position
- number
- 1: the message just sent.
- 1
- conversation_id
- id
- The conversation's id, as conversations/list's `id`.
0a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d- text
- text
- As Leboncoin keeps it.
- Merci pour votre retour, je reviens vers vous rapidement.
What it costs
Billed by the call: 20 credits. Pick how many calls a month.
20 credits a call
Calls a month
100
Built to run
Every call counts; a day is green at 95% successful.
- Successful calls
- 100.00%
- Median call
- 5.4 s
A call fails when the site does not answer or we cannot read its answer; a wrong input is not counted.
Frequently asked questions
What people ask before calling leboncoin/messages/send.
Send a message
When do I use it?
You buy or sell on Leboncoin with a connected account and want to answer someone in a conversation the account already has: give conversation (its id or its link, as leboncoin/conversations/list returns them) and text. The answer is the message as leboncoin/messages/list reads it. Each message is sent once and never retried by lobstr.io: a call that fails sent nothing, except send_unconfirmed, after which you check the conversation with leboncoin/messages/list before sending again. An account sends at most 5 messages a day here, 20 to 40 seconds apart. A first message to a listing's seller is not offered yet.
What do I give it?
conversation(required): The conversation to reply in: its id, or its link (https://www.leboncoin.fr/messages/id/), as leboncoin/conversations/list gives them. text(required): The message, as the person reading it will see it: plain text, line breaks kept, 2,000 characters at most.account: The connected Leboncoin account that writes, the conversation's own (GET /v2/accounts). Left out, the platform takes the first of your Leboncoin accounts with a message left today and a free slot.
What does it return?
Sends a reply with a connected Leboncoin account in one of its conversations, as its messages page does, and answers the message as Leboncoin keeps it. Every record has the same fields, empty ones included: they are all listed above.
How do I get the next page?
Each answer ends with next: the following call, whole. Send it as it is; it is null after the last page. A page holds 1 records at most.
Pricing
What does a call cost?
20 credits a message sent. A message Leboncoin refuses, a call your account's pace or daily count holds back, and a failed call are free.
When is a call free?
- a call that fails
- message_refused
- conversationnotfound
- a call the account is too busy for (it answers with retry_after)
- a call past the account’s daily quota
- a call the site challenged
Errors
What can go wrong?
invalid_options(422): Passconversation(a conversation's id or its link, as leboncoin/conversations/list gives them) andtext(2,000 characters at most).conversation_not_found(404): 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).message_refused(409): Leboncoin refused the message: the conversation is closed or blocked, or the text is not allowed. Nothing was sent (not charged).send_unconfirmed(502): The message may have been sent, but Leboncoin's answer was lost on the way. Check the conversation with leboncoin/messages/list before sending it again (not charged).account_required(422): 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, retry): This Leboncoin account cannot send right now: it waits 20 to 40 seconds between two messages, sends 5 a day, and Leboncoin can slow it down.retry_aftersays when it can again, in seconds. Retrying before then gets this same answer: nothing is queued.account_quota_exceeded(429, retry): This Leboncoin account sent its messages for today;retry_aftersays when the day starts over (midnight UTC).account_unusable(409): 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, retry): 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, retry): Leboncoin did not answer properly; retry later (not charged).unexpected_answer(424): Leboncoin answered in a shape we do not read yet; we are told and fix it (not charged).
How long can a call take?
45 seconds at most by default, up to 60 with timeout_s. A call past it answers timeout (408), is not charged, and can be sent again.
API and agents
Can my AI agent run it?
Yes: connect the lobstr.io MCP server (https://api.lobstr.io/v2/mcp, your API key as a Bearer token); its run_operation tool runs leboncoin/messages/send. Its page for agents, in Markdown: leboncoin/messages/send.md.
Where is its full description?
The contract, as JSON: https://api.lobstr.io/v2/catalog/leboncoin/messages/send: every option, every field, the price and the errors. This page is drawn from it.
Ready to call it?
An API key in a minute, then the call above, from your code or your agent.