# Mark leads contacted

> Record leads contacted outside SignalVan (sends nothing)

`POST https://api.signalvan.com/v1/searches/{search_id}/leads/contacted`

Needs `leads:write` · Uses no credits · Idempotency-Key supported · 60 a minute · Web page: https://www.signalvan.com/developers/reference/mark-leads-contacted

**After step 8: record leads contacted outside SignalVan.**

Records that the person contacted these leads themselves, outside SignalVan: by email,
LinkedIn, phone or another way, after you drafted the messages or exported the list. SignalVan sends nothing here. Call
it once the person says they sent the messages, with the `lead_key` of each lead they contacted (1 to 200 a call) and
the `channel`.

From then on SignalVan warns before contacting them twice: its campaign builder shows them as contacted and leaves them
unticked (the person can still pick them), and the leads answers carry `outreach.contacted` (`{channel, via, app, at,
note}`). Marking a lead again on the same channel updates the mark. `unknown_lead_keys` lists keys that are not in
this lead search (nothing is recorded for them).

**Credits:** none.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `search_id` | `string` | Yes | A lead search id (GET /searches) Example: `3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35`. |

## Query parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `website_id` | `string` | No | The website to act on (GET /websites). Left out: the key's default website, else its only one; a key that opens several websites and has no default must send it Example: `6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14`. |

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Authorization` | `string` | Yes | Bearer and your API key. Keys are made in SignalVan: Account, API keys. Example: `Bearer sv_live_...`. |
| `Content-Type` | `string` | Yes | The body is JSON. Example: `application/json`. |
| `X-Website-Id` | `string` | No | The same as website_id, as a header (the query parameter wins when both are sent) Example: `6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14`. |
| `Idempotency-Key` | `string` | No | Send the same key to retry safely: the first answer comes back (24 hours) Example: `plan-2026-11-20-leeds-01`. |

## Body (application/json)

- `lead_keys` (string[], required): The leads contacted (lead_key from the leads list), 1 to 200
- `channel` (string): How they were contacted One of: `email`, `linkedin`, `phone`, `other`.
- `note` (string | null): A short note kept with it (what was sent), up to 300 characters

## Response · 200 (application/json)

- `ok` (boolean, required): Always true on success
- `saved` (integer, required): The leads recorded (a lead marked again on the same channel is updated, not added twice)
- `search_id` (string, required): The lead search
- `channel` (string, required): How they were contacted One of: `email`, `linkedin`, `phone`, `other`.
- `unknown_lead_keys` (string[], required): The lead_keys sent that are not in this lead search (nothing was recorded for them)

## Responses

- `200`: The leads recorded as contacted
- `400` `invalid`: A field is not valid (the detail names it)
- `401` `unauthorized`: No API key, or the key is not valid
- `403` `scope_missing`: The key lacks the permission (scope_missing)
- `404` `not_found`: Not found, or not yours
- `409` `not_finished`: plan_expired, busy or idempotency_conflict (spending routes)
- `429` `rate_limited`: Too many requests: wait Retry-After seconds
- `503` `unavailable`: Temporarily unavailable: retry with backoff

## Request

Every request below is complete and runs as copied (set SIGNALVAN_API_KEY first). website_id is needed when your key opens several websites; it takes the website's id or its domain.

### Every field

cURL:

```bash
curl -X POST "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "lead_keys": [
      "l:sarah-whitfield-4a2b91"
    ],
    "channel": "linkedin",
    "note": "Sent a connection note about 5 day crowns"
  }'
```

Python:

```python
import os, uuid, requests

r = requests.post(
    "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNALVAN_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "lead_keys": ["l:sarah-whitfield-4a2b91"],
        "channel": "linkedin",
        "note": "Sent a connection note about 5 day crowns"
    },
    timeout=70,
)
r.raise_for_status()
print(r.json())
```

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "lead_keys": [
      "l:sarah-whitfield-4a2b91"
    ],
    "channel": "linkedin",
    "note": "Sent a connection note about 5 day crowns"
  }),
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

### Two leads emailed from the AI app

cURL:

```bash
curl -X POST "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14" \
  -H "Authorization: Bearer $SIGNALVAN_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "lead_keys": [
      "l:sarah-whitfield-4a2b91",
      "l:mark-oduya-77c1e0"
    ],
    "channel": "email"
  }'
```

Python:

```python
import os, uuid, requests

r = requests.post(
    "https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNALVAN_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "lead_keys": ["l:sarah-whitfield-4a2b91", "l:mark-oduya-77c1e0"],
        "channel": "email"
    },
    timeout=70,
)
r.raise_for_status()
print(r.json())
```

Node.js:

```javascript
const r = await fetch("https://api.signalvan.com/v1/searches/3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35/leads/contacted?website_id=6f1c2b9e-4d3a-4b8e-9c21-7a5e0d3f8b14", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SIGNALVAN_API_KEY}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({
    "lead_keys": [
      "l:sarah-whitfield-4a2b91",
      "l:mark-oduya-77c1e0"
    ],
    "channel": "email"
  }),
})
if (!r.ok) throw new Error((await r.json()).detail)
console.log(await r.json())
```

## Response example · 200

```json
{
  "ok": true,
  "saved": 2,
  "search_id": "3f6d2a8e-9b1c-4e57-8a20-6c4b1d9e7f35",
  "channel": "email",
  "unknown_lead_keys": []
}
```
