Events / Webhooks

Send POST requests to external systems when events occur in the API Hub.

Events and webhooks allow you to set up integrations with external systems. Any time an event in RapidAPI is triggered, an HTTP POST payload is sent to the webhook URLs provided during the event configuration. Webhooks can be used for a variety of reasons, for example:

  • Integration to your AR/AP platform
  • Trigger API updates in your gateway
  • Sync your CRM software to new subscriptions made in your Enterprise Hub
  • Send a Slack message
  • Integrate your internal approvals workflows system with RapidAPI
  • Deploy to your production server

Use them however it you want!

How does it work?

When a specific action is triggered in your Enterprise Hub, RapidAPI sends out HTTP requests to the webhook URLs that you have configured.

For example, when an API is created in your Enterprise Hub, the following webhooks will be called - API Created, API Updated, API Version Created, Billing Plan Created, Subscription Created and other events depending on what was configured for the API (for example, Target Group Created if a base URL was added). For a list of events that will trigger, see below .

Configuring events

To configure events and webhooks, navigate to the Events tab of the Admin Panel. Enable events by sliding the Enable event triggers toggle to the right.

Under Callback URL (up to 5), click Add a URL and add the URL to the external system that will receive the HTTP payload. Click Save after adding your webhook(s). You can add up to five URLs. Each one of these URLs will receive the events.

๐Ÿ“˜

You must add a callback URL to begin seeing events

To begin seeing events in the event logs, you must enter a callback URL, even if it is temporary (for example, example.com).

In every webhook request, the RapidAPI Enterprise Hub includes secret key passed in the x-rapidapi-webhook-secret header. The purpose of the secret key is to ensure that the request is coming from your RapidAPI Enterprise Hub. You can use the Generate new button to create a new key if necessary.

Testing events

To ensure that the events are being triggered and for you to obtain a proper sample request, you can send test events. Click the Test event link next to the event that you would like to test (see the screenshot above). A dialog will open with a Test URL dropdown, a Request area (including a Test event button), and a Response area.

2698

The event/webhook should be triggered for you, showing the response received from the POST event. To test other webhook URLs that you have configured above, you can change the dropdown to a different Test URL and click Test event.

Event logs

The purpose of the Event logs tab is to help you keep track and search for any events/webhooks that have been sent. The Event logs tab will begin populating with entries once you have enabled event triggers and added at least one callback URL.

In the screenshot below, you can see the events that are triggered when an API is created. You can also see the the response status indicating if your Enterprise Hub received a successful response from the webhook URL. Click Details associated with an event to see the event's request and response details.

List of events

Event TypeEvents Triggered
API CreatedAPI Created, API Updated, API Version Created, Billing Plan Created, Subscription Created (others depending on the API)
API UpdatedAPI Updated, API Version Updated
API DeletedAPI Deleted, Billing Plan Deleted
Subscription CreatedSubscription Created, Subscription Updated
Subscription UpdatedSubscription Created, Subscription Updated
Subscription DeletedSubscription Updated
Billing Plan CreatedAPI Updated, API Version Updated, Billing Plan Created
Billing Plan UpdatedAPI Updated, API Version Updated, Billing Plan Updated
Billing Plan DeletedBilling Plan Updated
API Version CreatedAPI Version Created, Billing Plan Updated
API Version UpdatedAPI Updated, API Version Updated
API Version Deletednone
User CreatedApp Created, App Key Created, User Created
User UpdatedUser Updated
User DeletedDelete User
Team CreatedApp Created, App Key Created, Team Created
Team UpdatedTeam Updated
Team DeletedApp Deleted, App Key Deleted, Team Deleted
App CreatedApp Created, App Keys Created
App UpdatedApp Updated
App DeletedApp Deleted
App Key CreatedApp Key Created
App Key UpdatedApp Key Updated
App Key DeletedApp Key Deleted
Organization CreatedApp Created, App Key Created, Organization Created, Team Created, Subscription Created
Organization UpdatedOrganization Updated, Team Updated
Organization DeletedOrganization Deleted, Subscription Deleted, App Deleted, Team Deleted
API Endpoint CreatedAPI Endpoint Created
API Endpoint UpdatedAPI Endpoint Updated
API Endpoint DeletedAPI Endpoint Deleted
Base URL CreatedTarget Group Created
Base URL UpdatedTarget Group Updated
Base URL DeletedTarget Group Deleted
Documentation CreatedDocumentation Created
Documentation UpdatedDocumentation Updated
Documentation DeletedDOCUMENTATION.DELETED
Billing Plan CreatedBILLINGPLAN.CREATED
Billing Plan UpdatedBILLINGPLAN.UPDATED
Billing Plan DeletedBILLINGPLAN.DELETED
Approval CreatedWORKFLOW.CREATED
Announcement CreatedANNOUNCEMENT.CREATED
Discussion CreatedDISCUSSION.CREATED
Message CreatedMESSAGE.CREATED
Discussion Comment CreatedDISCUSSION_COMMENT.CREATED