Use Pixela as a stopwatch and record the measured time directly

You can use Pixela as a stopwatch and record the measured time directly on the graph by requesting POST - /v1/users/<username>/graphs/<graphID>/stopwatch .
To start measuring the time, make a request like the below:
$ curl -X POST https://pixe.la/v1/users/<username>/graphs/<graphID>/stopwatch -H 'X-USER-TOKEN:thisissecret' -H 'Content-Length:0'
{"message":"Stopwatch start successful.","isSuccess":true}
This is all it takes to start measuring the time.
When you want to stop the measurement, make a same request again that you made when you started the measurement.
$ curl -X POST https://pixe.la/v1/users/<username>/graphs/<graphID>/stopwatch -H 'X-USER-TOKEN:thisissecret' -H 'Content-Length:0'
{"message":"Stopwatch stop successful. This time duration is 2m40.747269811s . Pixel updated, too. Quantity=2.68 (0.00 + 2.68)","isSuccess":true}
The above result shows that the measured time is 2 minutes 40.747269811 seconds and the value of 2.68 was recorded on the graph.

Measuring with Webhook

This feature is also available with Webhook. When you create Webhook, please specify stopwatch as type in the request as shown below:
$ curl -X POST https://pixe.la/v1/users/<username>/webhooks -H 'X-USER-TOKEN:thisissecret' -d '{"graphID":"for-stopwatch","type":"stopwatch"}'
For more information about Webhook, please see 🪝Posting values via Webhook.


  • If Graph ’s type is int, the time (in minutes) which its seconds is rounded is recorded
  • Measurements cannot be started and finished across days.