Event Management in API Maker

Secrets Management

Automate workflows, react to system events, and trigger real-time updates

API Maker® supports, system events, custom events & N number of listeners

Event Management in API Maker allows you to automate workflows and respond to system activities in real time.
Whether it’s a user registration, a database update, or a third-party API response, you can create custom events and attach multiple listeners to handle the logic without writing repetitive code.

API Maker supports both:

  • System Events → Automatically triggered when predefined actions occur (e.g., API hits, database changes).

  • Custom Events → Defined by you, triggered from APIs, utility classes, or even chained from other events.

All event listeners run in a secure sandbox environment, ensuring safety while enabling unlimited possibilities like notifications, data synchronization, and real-time updates via WebSockets.


How It Works

Event Management in API Maker works through a clear flow:


event-content-banner.webp


  1. Trigger an Event

    • Events can be triggered automatically as system events, or manually as custom events.
  2. Attach Listeners

    • Each event can have any number of listeners that perform actions such as sending notifications, updating records, or calling APIs.
  3. Execute Actions

    • Listeners run inside a secure sandbox, ensuring safe and isolated execution.
  4. Chain Events

    • One event can trigger another, and that can trigger the next, creating multi-step workflows without infinite loops.

Example: A User Registration event automatically opens an account, sends a welcome email, deposits credits, and more, all without repetitive coding.


Key Capabilities

API Maker’s Event Management comes with powerful features that let you automate and scale backend workflows with ease:

  • Custom Events
    Create events tailored to your application, attach unlimited listeners, and trigger them from Custom APIs or utility classes.

  • System Events
    Automatically listen to actions such as auto-generated API calls, custom API calls, system API calls, and third-party API calls.

  • WebSocket Notifications
    Subscribe to row or document changes like create, update, delete, or read and get real-time updates in web, Android, iOS, or any other application. For more details, see the WebSocket Docs

  • Dynamic Subscription
    Frontend and client applications can dynamically register or unregister for WebSocket events at runtime.

  • Event Chaining
    One event can trigger another, enabling deep workflows without creating infinite loops.

  • Secure Execution
    All event listeners run in a secure sandbox environment, ensuring reliability and isolation.
    For more details, see the Secure Sandbox page

If you’d like to dive deeper, check out the detailed Events Docs


Example Use Cases

Event Management in API Maker helps automate real-world workflows across applications. Some common scenarios include:

  • User Onboarding
    Trigger actions like sending a welcome email, creating a default profile, and crediting a bonus when a new user registers.

  • E-commerce Updates
    Notify customers in real time when an order status changes, and automatically update stock across multiple systems.

  • Cache Invalidation
    Clear or refresh cached data whenever a product, category, or record is updated in the database.

  • Third-Party Integrations
    Run event listeners that forward data to payment gateways, analytics tools, or external services when APIs are called.

  • Live Applications
    Power chat systems, notifications, or dashboards by pushing backend events to frontends via WebSockets.


Security & Sandbox Execution

Every event listener in API Maker runs inside a secure sandbox. This ensures:

  • Isolation
    Each listener executes independently, without interfering with other parts of the system.

  • Safety
    Malicious or faulty code inside a listener cannot affect the host environment.

  • Consistency
    Sandbox execution guarantees predictable behavior across all events and listeners.

  • Scalability
    Multiple listeners can run in parallel while still being safely contained.

By combining event automation with sandbox security, API Maker provides both flexibility and reliability for mission-critical workflows.


FAQ's

What is the difference between a system event and a custom event?

System events are triggered automatically by API Maker when predefined actions occur, such as API calls or database updates.
Custom events are created by developers and can be triggered from custom APIs, utility classes, or even chained from other events.

Can one event have multiple listeners?

Yes. Each event can have any number of listeners, and each listener can perform a different action.

How can frontend or mobile apps listen to backend events?

Apps can subscribe to backend events using WebSockets. They can also dynamically register or unregister at runtime, making it easy to control event flow in real-time applications.

Is there a risk of infinite loops when chaining events?

No. API Maker is designed to prevent infinite call cycles. Events can chain at unlimited depth while maintaining safety.

Where do event listeners run, and is it secure?

All listeners run inside API Maker’s secure sandbox environment. This ensures isolation, safety, and consistent execution.