Appearance
Recipe: WordPress
Use WordPress as a form host; keep the API key in server-side PHP (options / env), never in page HTML or JS.
Pattern
- Contact Form 7 / Gravity Forms / custom form posts to admin-ajax or a custom REST route on your WP site.
- PHP handler calls Appraiser Flow Public API with
AF_API_KEYfromwp-config.phpor server env. - Map form fields → quote JSON.
- Store returned
quote_idin a custom post meta or CRM plugin.
wp-config.php
php
define('AF_API_BASE', 'https://api.appraiserflow.ai/public/v1');
define('AF_API_KEY', 'af_test_••••'); // or af_live_ from the same production app
// A key created in staging uses https://staging-api.appraiserflow.ai/public/v1 instead.Handler sketch
php
$response = wp_remote_post(AF_API_BASE . '/quotes', [
'headers' => [
'Authorization' => 'Bearer ' . AF_API_KEY,
'Content-Type' => 'application/json',
'Idempotency-Key' => $submission_id,
],
'body' => wp_json_encode($payload),
'timeout' => 20,
]);A WordPress form should create quotes, not import the whole client database. Database and CRM loads belong on a server job: CRM sync recipe.
Tips
- Prefer a small custom plugin over putting keys in the theme.
- Use staging key until the mapping is solid.
- For no-code-only shops, Zapier or
orders@{slug}.appraiserflow.aiemail forward may be enough.