Skip to content

Widget API

The Widget API is the set of HTTP endpoints that the Trackelio widget uses to communicate with the backend. All endpoints are served from https://api.trackelio.com and require the X-Project-Key header for authentication.

Every request must include the project key in the header:

X-Project-Key: YOUR_PROJECT_KEY

The project key is found in your workspace under Sites > Settings. It identifies which workspace and site the request belongs to.

EndpointMethodDescription
/v1/widget/configGETFetch widget configuration
/v1/widget/submitPOSTSubmit feedback
/v1/widget/uploadPOSTUpload screenshot or recording
/v1/widget/npsPOSTSubmit NPS response
/v1/widget/csatPOSTSubmit CSAT response
/v1/widget/surveyGETLoad survey definition
/v1/widget/survey/respondPOSTSubmit survey answers
/v1/widget/messenger/startPOSTStart a chat conversation
/v1/widget/messenger/messagePOSTSend a chat message
/v1/widget/messenger/historyGETLoad conversation history
/v1/widget/messenger/endPOSTEnd a conversation
/v1/widget/announcementsGETFetch announcements
GET /v1/widget/config?key=YOUR_PROJECT_KEY

Returns the full widget configuration for the given project key, including enabled modules, theming, targeting rules, and feature flags. The widget calls this on initialization to determine how to render.

POST /v1/widget/submit

Submits a new feedback post. The request payload includes the following fields:

  • title — The feedback title or summary.
  • description — The full feedback body text.
  • item_type — The type of feedback (e.g., bug, idea, question).
  • Submitter identity fields such as name, email, and user ID (if identified via the SDK).

Automatically captured metadata about the page where the feedback was submitted:

  • url — The full page URL.
  • path — The URL path.
  • title — The page title.
  • referrer — The referring URL.
  • Viewport dimensions (width and height).
  • Browser name, version, and platform information.
  • session_token — A token identifying the current user session.
  • attachment_ids — An array of IDs referencing previously uploaded screenshots or recordings (via /v1/widget/upload).
  • Element-specific data if the user marked a specific element on the page using the visual feedback tool.
  • console_logs — Captured browser console output.
  • network_logs — Captured network request data.
POST /v1/widget/upload

Uploads a screenshot or screen recording captured by the widget. Returns an attachment ID that can be included in the feedback submission payload.

POST /v1/widget/nps

Submits a Net Promoter Score response, including the numeric score (0—10) and optional feedback text.

POST /v1/widget/csat

Submits a Customer Satisfaction response, including the rating value and optional comment.

GET /v1/widget/survey

Loads the survey definition for the current site, including questions, answer types, and display configuration.

POST /v1/widget/survey/respond

Submits the user’s answers to the survey questions.

The messenger endpoints manage real-time chat conversations between users and your team.

POST /v1/widget/messenger/start

Starts a new conversation. Returns a conversation ID used in subsequent requests.

POST /v1/widget/messenger/message

Sends a message within an active conversation. Requires the conversation ID.

GET /v1/widget/messenger/history

Retrieves the message history for a conversation.

POST /v1/widget/messenger/end

Ends an active conversation and marks it as resolved.

GET /v1/widget/announcements

Fetches the list of active announcements configured for the site. The widget displays these to users based on targeting and scheduling rules.