Eventrigger Docs

Remote events,
made simple.

Eventrigger lets your application fire a remote event while a local listener waits for that event and performs the action you define.

How it works

Eventrigger uses a simple polling model. Your local machine does not need to expose a port to the internet. Instead, it periodically makes an outbound request to Eventrigger.

1. Create a trigger in your dashboard.
2. Start your local listener and give it the trigger ID.
3. Fire the trigger from your dashboard or another application.
4. The listener polls Eventrigger and receives the pending event.
5. The event is consumed and will not be returned again.

Triggers

A trigger is a persistent event destination. Each trigger has a unique ID that your listener uses when polling for events.

triggerId: "evtrg_7f3c...92ab"
name: "evtrg test"

Fire API

The Fire API allows another application to remotely fire an Eventrigger trigger. Requests are authenticated using an API key and require the trigger ID you want to fire. You can also include a JSON payload with custom data that will be delivered to the listener with the event.

Endpoint

POST https://api.evtrg.com/api/triggers/YOUR_TRIGGER_ID/fire

Authentication

Include your Eventrigger API key in the Authorization header using the Bearer authentication scheme. The API key must belong to the account that owns the trigger.

Authorization: Bearer YOUR_API_KEY

JSON payload

The Fire API accepts a JSON object as the event payload. Eventrigger stores the payload as provided and makes it available to the listener. You can use any fields your application needs.

Example payload
{
  "event": "fire",
  "username": "evtrg",
  "displayName": "eventrigger"
}

If no JSON body is sent, the event is created with an empty payload.

Example request

You can fire a trigger using any HTTP client. For example, with cURL:

curl -X POST   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{
    "event": "create_trigger",
    "username": "evtrg"
  }'   https://api.evtrg.com/api/triggers/YOUR_TRIGGER_ID/fire

Successful response

When the trigger is successfully fired, the API returns HTTP201and the ID of the newly created event.

Response
{
  "ok": true,
  "eventId": "evt_123456789"
}

Invalid payload

The payload must be valid JSON and must be a JSON object. Invalid JSON or another JSON value returns HTTP400.

{
  "error": "Invalid JSON payload"
}

Rate limit

Each trigger can only be fired once every 5 seconds. This limit applies to both dashboard requests and API-key requests. When a request is rate limited, the API returns HTTP429with the number of seconds to wait inretryAfterand in theRetry-AfterHTTP header.

Rate limit response
{
  "error": "Rate limit exceeded",
  "retryAfter": 4
}

Error responses

400
Invalid payload
The request body was invalid JSON or was not a JSON object.
401
Unauthorized
The API key is missing, invalid, or could not be authenticated.
404
Trigger not found
The supplied trigger ID does not exist or does not belong to the authenticated account.
429
Rate limit exceeded
The trigger was fired less than 5 seconds ago. Wait for the retryAfter period before trying again.

Listener API

The Listener API allows a local application to poll Eventrigger for events. Your application periodically sends a request using the trigger ID and your API key.

Endpoint

GET https://api.evtrg.com/api/listener/YOUR_TRIGGER_ID

Authentication

The Listener API requires an Eventrigger API key. Include the key in the Authorization header using Bearer authentication.

Authorization: Bearer YOUR_API_KEY

Example request

A listener can poll the endpoint using any HTTP client. For example, using cURL:

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://api.evtrg.com/api/listener/YOUR_TRIGGER_ID

Event available

When one or more events are waiting for the trigger, the API returns HTTP200with the pending events.

If exactly one event is waiting, the API returns that event directly. If multiple events are waiting, the API returns all of them inside aneventsarray.

Single event response
{
  "eventId": "evt_123456789",
  "triggerId": "evtrg_7f3c...92ab",
  "type": "trigger",
  "payload": {},
  "createdAt": "2026-08-12T19:00:00.000Z"
}
Multiple event response
{
  "events": [
    {
      "eventId": "evt_123456789",
      "triggerId": "evtrg_7f3c...92ab",
      "type": "trigger",
      "payload": {},
      "createdAt": "2026-08-12T19:00:00.000Z"
    },
    {
      "eventId": "evt_123456790",
      "triggerId": "evtrg_7f3c...92ab",
      "type": "trigger",
      "payload": {
        "action": "on"
      },
      "createdAt": "2026-08-12T19:01:00.000Z"
    }
  ]
}

Event consumption

Events are consumed when they are retrieved. When multiple events are waiting for the same trigger, all pending events are returned together in theeventsarray and are removed from the queue after being returned.

A listener should therefore support both response formats and process every event in theeventsarray before polling again.

Events are returned in creation order, with the oldest pending event first.

Polling interval

The Listener API allows one poll every 5 seconds per trigger. Polling more frequently will result in a429response.

Rate limit response
{
  "error": "Rate limit exceeded",
  "retryAfter": 4
}

Responses

Eventrigger uses standard HTTP status codes to indicate whether an API request was successful, rejected, or needs to be retried.

200
Event available
The listener successfully retrieved one or more events. A single event is returned directly, while multiple pending events are returned in the events array.
201
Event created
The Fire API successfully created a new event for the trigger.
204
Nothing pending
The trigger exists and the request was successful, but there are currently no events waiting.
401
Unauthorized
The API key is missing, empty, or invalid.
404
Trigger not found
The supplied trigger ID does not exist or does not belong to the account associated with the API key.
429
Rate limit exceeded
The request was made too soon after the previous request. Wait for the retryAfter value before polling or firing the trigger again.

204 response

A204response has no response body. Your listener should treat it as "nothing to do" and continue polling after the appropriate interval.

429 response

When a request is rate limited, Eventrigger returns the number of seconds to wait inretryAfterand also includes the same value in theRetry-AfterHTTP header.

Example
{
  "error": "Rate limit exceeded",
  "retryAfter": 4
}