# Runnable examples

> Copy-paste calls that run against the live service, with real answers.  
> Last verified: 2026-09-30 · Hub: https://www.synapseconnexion.com/ia/index.md · Changelog: https://www.synapseconnexion.com/ia/changements.md

All examples hit the live service and count toward the free quota (except `/autotest` and `/verifier`).

```bash
# Is a page online?
curl -s "https://www.synapseconnexion.com/ia/confirme/page?url=https://example.com"

# Domain facts
curl -s "https://www.synapseconnexion.com/ia/confirme/domaine?domaine=example.com"

# Can this address receive?
curl -s "https://www.synapseconnexion.com/ia/confirme/courriel?courriel=someone@example.com"

# Heartbeat at the END of a successful run (pick a secret key, 8-80 chars)
curl -s -X POST "https://www.synapseconnexion.com/ia/confirme/battement" -H "Content-Type: application/json" -d '{"cle":"my-nightly-report-9f3k","note":"report sent"}'

# Did it run in the last 24 h?
curl -s "https://www.synapseconnexion.com/ia/confirme/tache?cle=my-nightly-report-9f3k&depuis=86400"

# Verify any receipt (always free)
curl -s -X POST "https://www.synapseconnexion.com/ia/verifier" -H "Content-Type: application/json" -d @recu.json

# Self-test: a signed receipt over a fixed payload, verify it yourself
curl -s "https://www.synapseconnexion.com/ia/autotest"
```

```json
// MCP over HTTP: initialize, then list, then call
POST https://www.synapseconnexion.com/ia/mcp
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"you","version":"1"}}}
{"jsonrpc":"2.0","id":2,"method":"tools/list"}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"confirme_page","arguments":{"url":"https://example.com"}}}
```

## A real answer (abridged, `confirme.page` on coolbox.ca, 2026-09-30)

```json
{
    "ok": true,
    "service": "confirme.page",
    "resultat": {
        "en_ligne": true,
        "code_http": 200,
        "url_finale": "https://coolbox.ca/",
        "redirections": 0,
        "temps_ms": 3135,
        "titre": "Coolbox - Hôtellerie de plein air - Coolbox",
        "tls": {
            "present": true,
            "valide_jusqu_au": "2026-11-08",
            "jours_restants": 39
        },
        "observe_le": "2026-09-30T01:48:21+00:00"
    },
    "recu": {
        "id": "7c227b4bd8e8efe3",
        "horodatage": "2026-09-30T01:48:21.402Z",
        "service": "confirme.page",
        "demande_sha256": "…",
        "resultat_sha256": "…",
        "signature_base64": "…",
        "cle_id": "synapse-ia-2026-d5c611"
    },
    "quota": {
        "utilises": 1,
        "gratuits": 1000,
        "restants": 999
    }
}
```

## Pattern: prove your own scheduled task

1. At the end of each successful run: `POST /confirme/battement {cle}` and store the returned `recu` with your run log.
2. Once a day, from anywhere: `GET /confirme/tache?cle=…&depuis=90000`. If `a_tourne` is false, alert your human — silence is the alarm.
3. If anyone doubts you later, hand them the receipts: `POST /verifier` returns `valide: true`.
