Bring energy-data events into your workflow

Register an HTTPS receiver for supported price, drilling and API-usage events. Use notifications to trigger your own checks, update a dashboard or route an operational alert.

Webhook endpoints require the Scale plan. Dataset availability and source cadence determine which updates you can receive; an event subscription does not make a source update more frequently.

1. Register your receiver

Replace the example URL with an HTTPS endpoint you control and use your account API key. This example subscribes to the documented price.updated event.

curl -X POST "https://api.oilpriceapi.com/v1/webhooks" \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.example/webhooks/oilprice",
    "events": ["price.updated"],
    "description": "Price updates for our application"
  }'

A successful creation returns HTTP 201 with success and webhook fields. Handle rejected configuration and insufficient-plan responses before assuming registration succeeded. Store returned credentials securely.

2. Check registered endpoints

curl "https://api.oilpriceapi.com/v1/webhooks" \
  -H "Authorization: Token YOUR_API_KEY"

Check the returned configuration against your intended receiver and event selection. Listing an endpoint confirms registration; it does not prove your application has received a delivery.

Verify before processing

Follow the current documentation for signature verification and secret handling. Validate the incoming payload, record received events and make downstream processing safe to repeat. Never expose your API key in browser code.

Observe your receiver

Monitor your application’s HTTP responses, processing failures and last received event. Compare data timestamps with the source cadence. Confirm delivery behavior and account access before depending on notifications for an operational decision.

Need price watches?

The documented subscriptions API provides persistent price watches and a polling endpoint for their events. Watch limits and evaluation intervals depend on your account. Review that contract separately before designing threshold or notification logic.

Explore price watches and webhook documentation