Skip to content

Webhooks and Custom Fields

Webhooks and custom field definitions are managed through the REST API and code - there is no settings screen for either yet. Turn webhooks on first under Advanced settings (Enable webhooks).

POST /wp-json/roadmap/v1/webhooks

Body:

{
"url": "https://example.com/hooks/roadmap",
"secret": "a-shared-secret",
"events": ["status_changed", "vote_submitted"]
}

Valid events values: status_changed, vote_submitted, comment_submitted, suggestion_submitted, guest_suggestion_submitted.

Each event is POSTed to your URL as JSON, with these headers:

Header Description
X-Roadmap-Event The event name, e.g. status_changed
X-Roadmap-Signature-256 sha256=<hmac> - HMAC-SHA256 of the request body, keyed with the webhook’s secret
X-Roadmap-Delivery A unique UUID per delivery attempt

Verify the signature on your endpoint before trusting the payload, using the same secret you registered.

Event Payload fields
status_changed item_id, item_title, item_url, new_status, old_status, changed_at
vote_submitted item_id, item_title, item_url, user_id, user_name, vote_value, total_votes, submitted_at
comment_submitted comment_id, item_id, item_title, item_url, user_id, user_name, comment_content, submitted_at
suggestion_submitted post_id, title, content, url, user_id, user_name
guest_suggestion_submitted Guest submission details, including the guest’s name and email
GET /wp-json/roadmap/v1/webhooks
DELETE /wp-json/roadmap/v1/webhooks/{index}
POST /wp-json/roadmap/v1/webhooks/test

All webhook routes require manage_options.

Custom fields add extra metadata inputs to the roadmap item edit screen. Field definitions are stored in the roadmap_pro_custom_fields option and rendered as a meta box on the item editor once defined - there is no admin UI to author the definitions themselves yet.

POST /wp-json/roadmap/v1/custom-fields

Requires manage_options. Or set the option directly:

update_option( 'roadmap_pro_custom_fields', [
[
'key' => 'effort_estimate',
'label' => 'Effort Estimate',
'type' => 'text',
],
] );
GET /wp-json/roadmap/v1/custom-fields

Public. Returns the current field definitions. Custom field values are included in the standard item REST response via the roadmap_api_format_item filter.