Actions

The Actions endpoint allows you to request Bugpilot reports from your end users.

Prerequisites

To successfully execute a Bugpilot action:

  1. You need to set up user identification and send either a user ID or an email to Bugpilot.

  2. In Bugpilot API Settings, make sure the Always connect Action WebSockets, is selected. It is not selected by default.

  3. The end-user needs to be online on one of your pages at the time you call the API. If the user is not online, the requests will fail with an USER_NOT_CONNECTED error.

Available actions

This table lists the operations that can be performed using this API endpoint.

Endpoints

Executes an action on the end-users

POST https://widget-api.bugpilot.io/api/v1/action

See Available Actions for the list of actions you can perform with this endpoint.

Headers

Request Body

The response contains ok: true if it is successful. In any case, a sessionInfoUrl property is included. Refer to the Session Info API reference for further information.

{
    "ok": true,
    "message": "The request has been sent to the client",
    "ts": 1669738581021,
    "sessionInfoUrl": "https://widget-api.bugpilot.io/api/v1/session-info/*****/*****"
}

Example

curl \
  -X POST \
  -H "Content-Type: application/json" \
  -H "User-Agent: Bugpilot API Client/1.0" \
  -H "X-Bugpilot-Api-Key: <ID FROM BUGPILOT API SETTINGS>" \
  -d '{
    "workspaceId": "<WORKSPACE ID FROM BUGPILOT API SETTINGS>",
    "userId": "end-user-id",
    "action": "upload-session"
  }' \
  https://widget-api.bugpilot.io/api/v1/action

Last updated