How-to

How to send data to Hubviz with a webhook

Create a webhook cube in Hubviz Studio, copy its URL and have your system POST the data as JSON, with no polling from Hubviz.

With a webhook, your system sends the data to Hubviz. You create the cube, copy its URL and set up the system to send JSON by POST whenever the data changes.

When to use it

  • The system can fire HTTP calls (an online store, a form, an automation in Zapier or Make), but has no API Hubviz can query.
  • You want data to arrive when something happens, not at a fixed time.

If the system has an API, prefer connecting the REST API. With an API, Hubviz fetches the data at the time you choose.

Create the cube

  1. In the project side menu, open Cubes and click the + button.

  2. Click Create Manually, pick the Webhook type and click Next.

  3. Click Create New Connection, fill in Connection Name and click Save. A webhook connection has no other fields: Hubviz generates a secret code for it when you save.

  4. Click Next. Hubviz tells you the URL becomes available after the cube is created.

  5. Name the cube in Cube Name and click Finish.

  6. The Webhook URL window opens with the cube URL. Click the copy icon, then Got it.

The cube opens on the Webhook tab. The URL is still there, in URL to send data, with the Copy to clipboard button.

The URL looks like https://webhook.hubcount.com.br/api/bi-studio/<code>/<cube number>. The code belongs to the connection and the number identifies the cube.

The Webhook tab

PanelWhat it shows
URL to send dataThe cube URL and the Copy to clipboard button.
Last webhook receivedReceived at, Size and Content-Type of the latest delivery.
Received filesEach delivery is kept as a file. Refresh list looks for new deliveries, View files opens the full list and Delete all clears the history.
Last payload JSONThe delivery JSON. Load last JSON loads the latest one and fills in the cube fields.

In the full list (Received files), each file has three actions: Use JSON (maps the fields from that delivery), Open and Delete.

Send the data

Set up your system to make a POST call to the URL, with a JSON body. Hubviz accepts three shapes:

ShapeHow Hubviz reads it
A list: [{...}, {...}]Each item becomes a row
An object with a list inside: {"orders": [{...}]}Uses the first list it finds. Each item becomes a row
A single object: {...}Becomes one row

Example with curl:

curl -X POST "YOUR_CUBE_URL" \
  -H "Content-Type: application/json" \
  -d '[{"pedido": 1001, "data": "2026-10-20", "unidade": "Retail", "valor": 350.90, "status": "paid"}]'

On success, the response is {"success": true}. Errors come back with "success": false and a message (in Portuguese):

CodeMessageCause
400Body da requisição não pode ser vazio.The call had no body.
400O body enviado não é um JSON válido.The body has a syntax error, such as a trailing comma or single quotes.
400Token de rota inválido.The URL was copied partially or changed.
400cubeId deve ser um número inteiro válido.The cube number at the end of the URL was changed.
500Erro ao processar webhook.A failure on the Hubviz side. Try again in a few minutes.

Map the fields

Hubviz only knows the fields after the first delivery.

  1. Send a test delivery with real data.
  2. On the Webhook tab, click Refresh list and check the Last webhook received panel.
  3. Click Load last JSON. Hubviz reads the JSON and fills in the cube fields.
  4. Open the Field Mapping tab, check the types and save with Ctrl + S. See Cube fields.

Example: online store orders

Aurora’s (fictional) online store notifies Hubviz on every paid order. The automation POSTs the list of the day’s orders:

[
  { "pedido": 1001, "data": "2026-10-20", "unidade": "Retail", "valor": 350.90, "status": "paid" },
  { "pedido": 1002, "data": "2026-10-20", "unidade": "Retail", "valor": 129.00, "status": "paid" },
  { "pedido": 1003, "data": "2026-10-20", "unidade": "Services", "valor": 980.00, "status": "pending" }
]

After Load last JSON, the Orders cube has the fields pedido, data, unidade, valor and status. In Cube fields, set data as a date and valor as a number. A sum measure on valor shows the store revenue per day.

Common errors

SituationWhat to do
Failed to list files on the Webhook tabThe Studio could not fetch the deliveries. Click Try again and check your internet connection.
Failed to load JSONThe chosen delivery could not be read. Try another file from the list.
The system gets a 400 errorSee the message table above.
Old data disappearsThe cube only uses the last delivery. Send the full data set every time.

Get the data to Hubviz Web

Deliveries reach the cube in Hubviz Studio. For Hubviz Web to show the new data, click Publish to the Web or turn on the cube’s automatic refresh.