Overview
Webhooks allow your WordPress site to receive real-time updates from Loxo when jobs are created, updated, or deleted. Instead of relying solely on scheduled synchronization, webhooks push changes to your site instantly.
Supported Events
- job.create — Triggered when a new job is published in Loxo. The plugin automatically imports the job into WordPress.
- job.update — Triggered when a job is modified in Loxo. The plugin updates the corresponding WordPress post with the latest data.
- job.destroy — Triggered when a job is deleted in Loxo. The plugin removes the corresponding WordPress post.
Setting Up Webhooks
Navigate to Loxo Jobs → Settings in your WordPress admin. If your API credentials are configured, you will see a Webhooks section. Click the Register Webhooks button to register all three webhook events with Loxo.
The plugin registers a callback URL at /wp-json/loxo/v1/loxo-event on your site. Loxo sends POST requests to this URL whenever a job event occurs.
Managing Webhooks
From the settings page you can:
- Check Status — View which webhooks are registered and detect any missing ones.
- Delete Webhooks — Remove all registered webhooks from Loxo if you no longer want real-time updates.
Requirements
- Your site must be publicly accessible (not localhost) for Loxo to reach the callback URL.
- API credentials (Agency Slug and API Token) must be configured in the plugin settings.
- The WordPress REST API must be enabled and accessible.
Webhooks vs Auto Sync
You can use webhooks and auto sync together or independently:
- Webhooks only — Instant updates, but if a webhook delivery fails, the change won’t be retried automatically.
- Auto Sync only — Reliable but delayed. Jobs are synced on a schedule (default: every 300 minutes).
- Both (recommended) — Webhooks provide instant updates while auto sync acts as a safety net to catch anything missed.
