Skip to content

Recipes · Build it

Get a ping in your own tool when new data lands

freddy calls your own URL each time new data for the metrics you pick arrives. Use it to update a sheet, a dashboard or a home screen widget.

trendsAPI
  1. Make an API key

    In freddy, open Connections. Under Your API keys, choose Create API key. Copy the key: freddy shows it once.

  2. Find your metric names

    curl -H "Authorization: Bearer $FREDDY_KEY" https://freddy.coach/api/v1/catalog
  3. Create the webhook

    curl -X POST https://freddy.coach/api/v1/webhooks \
      -H "Authorization: Bearer $FREDDY_KEY" \
      -H "Content-Type: application/json" \
      -d '{"url":"https://your-tool.example/freddy","metrics":[{"metric":"sleep_score"}]}'

    The answer holds the signing secret, once. Use it to check that each call comes from freddy.

What you'll see

A call to your URL each time a sync stores new data for those metrics. Then your tool reads the new rows from /api/v1/metrics.

The example is illustrative.

Good to know

The Personal API is part of Pro and Believer.

The URL must be public https. Up to 10 metrics per webhook.

A change to data freddy already has sends no call. The full reference is at freddy.coach/api-docs.