# Update Settings

Configure Leboncoin Auto Message Sender settings and message template

Configure your Leboncoin Auto Message Sender settings including the message template with dynamic variables that are replaced with listing-specific values.

## Headers

<ParamField header="Authorization" type="string" required>
  Your API authentication token. Value: `Token YOUR_API_KEY`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Request body format. Value: `application/json`
</ParamField>

## Message Parameters

Configure the message content and targeting:

| Parameter | Type | Default | Description |
| --- | --- | --- | --- |
| **message** | string | — | Template for the message sent to sellers. Supports dynamic variables (see below) |
| **one_message_per_seller** | boolean | false | Send at most one message per seller in this squid: a listing is skipped when this squid already messaged its seller on another listing, for example a listing the seller deleted and posted again. Matched on the seller's Leboncoin account (`owner_id` in the results), not the pseudo. Skipped listings are not billed, do not count toward `max_results` and are left out of the results (the run log lists them) |
| **fetch_since** | string | null | Stop scraping when items older than this threshold are reached (based on `last_publication_date`). Use a relative duration (24h, 7d, 2w) or an absolute date (YYYY-MM-DD HH:MM:SS) |
| **fetch_since_timezone** | string | null | Timezone for interpreting an absolute `fetch_since` date (e.g. `Europe/Paris`). Only applies when `fetch_since` is an absolute date — ignored for relative values like `24h` or `7d`. See [supported timezones](https://staging.docs.lobstr.io/docs/timezones). |
| **max_results** | integer | null | Maximum number of listings to process before stopping |
| **max_unique_results_per_run** | integer | null | Maximum unique results across all tasks in a single run |

## Message Template Variables

The message parameter supports dynamic variables that are replaced with listing-specific values:

| Variable | Description |
| --- | --- |
| **#title#** | The listing title (e.g., "Appartement 3 pièces 88 m²") |
| **#pseudo#** | The seller's display name/pseudonym |

## Squid Settings

Configure general squid settings:

| Setting | Type | Description |
| --- | --- | --- |
| **name** | string | Display name for your squid configuration |
| **concurrency** | integer | Number of parallel message sending threads (default: 1) |
| **export_unique_results** | boolean | Export only unique results (deduplicated) |
| **to_complete** | boolean | Run until all tasks complete |
| **no_line_breaks** | boolean | Remove line breaks from results |

<Tip>
  Example message template: "Hello #pseudo#,\n\nI am interested in your listing: #title#.\n\nPlease contact me via Leboncoin messaging.\n\nThank you!"
</Tip>

<Warning>
  Keep concurrency low (1-2) to avoid rate limiting from Leboncoin.
</Warning>

<Note>
  A squid never messages the same listing twice, even after you edit the message template. Set `one_message_per_seller` to `true` to also skip the other listings of a seller this squid already messaged. Both checks are per squid: two squids can message the same seller. Messages sent before October 2026 were stored without the seller's `owner_id`, so for those only the per-listing check applies.
</Note>

## Code Examples

<CodeGroup>
```bash cURL
curl -X POST "https://api.lobstr.io/v1/squids/YOUR_SQUID_HASH" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Leboncoin Auto Message Sender (4)",
    "concurrency": 1,
    "export_unique_results": true,
    "to_complete": false,
    "no_line_breaks": true,
    "params": {
      "message": "Hello #pseudo#,\n\nI want to enquire about #title#.",
      "one_message_per_seller": true,
      "fetch_since": 1,
      "max_results": 3,
      "max_unique_results_per_run": 10
    }
  }'
```

```python Python
import requests

API_KEY = "YOUR_API_KEY"
BASE_URL = "https://api.lobstr.io/v1"
headers = {"Authorization": f"Token {API_KEY}"}

squid_id = "YOUR_SQUID_HASH"

# Configure message template and settings
response = requests.post(f"{BASE_URL}/squids/{squid_id}",
    headers=headers,
    json={
        "name": "Leboncoin Auto Message Sender (4)",
        "concurrency": 1,
        "export_unique_results": True,
        "to_complete": False,
        "no_line_breaks": True,
        "params": {
            # Message template with dynamic variables
            "message": "Hello #pseudo#,\n\nI want to enquire about #title#.",
            "one_message_per_seller": True,  # Skip sellers this squid already messaged
            "fetch_since": 1,           # Only listings from last hour
            "max_results": 3,          # Process max 3 listings
            "max_unique_results_per_run": 10  # Max 10 per run
        }
    }
)

print(response.json())
```
</CodeGroup>

## Response

```json 201
{
  "name": "Leboncoin Auto Message Sender (4)",
  "concurrency": 1,
  "export_unique_results": true,
  "to_complete": false,
  "no_line_breaks": true,
  "params": {
    "message": "Hello #pseudo#,\n\nI want to enquire about #title#.",
    "one_message_per_seller": true,
    "max_unique_results_per_run": 20,
    "fetch_since": 1,
    "max_results": 3
  }
}
```
