Connector protocol
All traffic between FormVigilant and the connector is signed. The only unsigned call is the one-time pairing request made from wp-admin. This page documents the protocol for security reviews and for developers writing custom adapters.
Pairing
- FormVigilant issues a pairing code with a 10-minute lifetime.
- In wp-admin the connector calls
POST /v1/connector/pairwith the code, the site URL and the WordPress, PHP and plugin versions. - FormVigilant returns a
site_idand a per-site secret. The connector stores the secret encrypted inwp_options.
Signed requests
Every other request, in both directions, carries three headers:
| Header | Value |
|---|---|
X-FV-Timestamp | Unix time in whole seconds |
X-FV-Nonce | 32 random hex characters, single use |
X-FV-Signature | Lowercase hex HMAC-SHA256 of the canonical string, keyed with the site secret |
The canonical string is:
timestamp.nonce.METHOD.path.sha256hex(body)
path is the request target as sent, including any query string; an empty body hashes the empty string. The receiver rejects the request when the timestamp is more than 300 seconds from its own clock, when the signature does not match (compared in constant time), or when the nonce was already seen in the last 10 minutes.
Connector endpoints
Under /wp-json/formvigilant/v1/, all signed:
| Endpoint | Purpose |
|---|---|
GET discover | Forms from every active adapter with fields, recipients and capabilities, plus SMTP plugin and versions |
POST submit | Submit a synthetic test: adapter, form_id, marker, optional payload_overrides. Returns L1 and L2 results |
GET entry | Look up the test entry by adapter, form_id and marker |
POST entry/delete | Delete a test entry by id; only entries that carry a marker can be deleted |
GET diagnostics | SMTP setup, recent wp_mail failures, cron status, DNS hint |
GET heartbeat | Versions, active adapters, cron status |
Calls from the connector
POST /v1/connector/heartbeatevery 15 minutes.POST /v1/connector/mail-eventwhenwp_mail_succeededorwp_mail_failedfires for a message containing an active marker (L3 evidence).
Marker scoping
A marker such as fv_9k2m7xq4ab is created per run. The connector's wp_mail filter only adds the catch recipient, and its mail hooks only report events, for messages that contain an active marker. Every other email on the site passes through untouched.