Got it - thanks for the details!
Hi David,
Iāve been experimenting with the Intervals.icu API and running into some persistent issues I wondered if you might be able to help with.
Iāve been attempting to retrieve activity data using my API key, but consistently getting 403 errors, both via Apple Shortcuts and directly with cURL from my desktop. Iāve double-checked the endpoints, headers, and bearer token formatting, and even tried using the API testerās generated cURL commands ā all returning the same 403.
I also wasnāt sure if privacy settings might be interfering, though my understanding is that the API key should authenticate me as the account holder regardless.
Additionally, I noticed that activity IDs in the API docs are listed as int32, while athlete IDs are strings ā which seemed consistent with what I was working with, but wanted to confirm thereās no mismatch expected there.
Would you mind taking a look or pointing me in the right direction? I suspect Iām either missing something obvious or possibly bumping into a permission issue on my account.
Thanks a lot for your time ā I appreciate it.
You have to use basic auth, not bearer.
The API uses basic authentication for personal use. The username is āAPI_KEYā and the password your API key. Example using curl:
$ curl -u API_KEY:1l0nlqjq3j1obdhg08rz5rfhx https://intervals.icu/api/v1/athlete/2049151/activities.csv
Thatās exactly the thing I needed to crack it thank you!
So now Iām making good progress pulling down my activities.csv list via the /athlete/{id}/activities.csv endpoint ā works great.
I noticed thereās a /activities/{id}/laps.csv endpoint for rides, and was wondering: is there anything equivalent for runs? Or any way to download the full activity data or laps via the API for run activities, similar to what you can export manually from the web UI?
Apologies if Iāve missed something obvious ā just getting my head around whatās possible via the API at the moment.
Thanks so much for the great platform and API access ā itās been brilliant so far. And a super responsive community too.
Hi David,
another question from my side.
Is there a possibility to check when an activity has been updated?
For example, āwellnessā has an āupdated: date-timeā which sets a timestamp when the wellness data has been updated (e.g. steps increased from garmin).
But for activity i canāt see something similiar. There is a āicu_sync_date: date-timeā but when i change my activity in garmin connect (e.g. adding a comment), the activity in intervals.icu is updated. But the āicu_sync_dateā is still the same.
Is this on purpose and i need to use Webhooks (i currently have no registered app at intervals, since im just doing a little private coding project where i want to sync my activities to my own database. I just check a few times a day if there has been added activities, but iām missing when an activity has been updated)?
Unfortunately I forgot to include a general updated data originally. I will likely add it at some point.
Hi. Iām trying to update Power Zones via the API. Is there any guidance on the format for the power_zones input - the Cookbook just say its Interger values as part of an array. Does this need to contain the lower and upper limits of each zone e.g. [0,150,151,220,221,260,261,300,301,340,341,430,431], or should it just include the values of the lower bouund? [0,151,221,261,301,341,431].
I only really want update the boundary between z2 and z3, but Iām assumning I need to include all the zones in the array?
thanks
the endpoint reports values in this format.
āpower_zonesā:[55,75,90,105,120,150,999]
so looks like itās the upper
Thanks! I seem to now be getting a 422 error when including the power_zones array in the exisiting API call I have working. The body is below. Any idea what might be causing the error? Auth is fine as it works without the power_zones element.
{"ftp":288,"indoor_ftp":288,"power_zones":[55,78,90,105,120,150,999]}
Thanks in advance
That endpoint was a bit buggy in that you had to update the power zones, names, sweet spot etc. all together. I have fixed that. You can now update just the zones or just the names etc⦠I still need to make similar changes to updating HR and pace zones.
@david Hi David,
i have some problem with creating a webhook. I dont know why it does not work. But when i set Webhook Types, i canāt save them. If i enter for example a Webhook Authorization Header and Webhook Types i can save the form, but after refreshing the site the webhook types are gone.
The webhook URL is working, itās a cloudflared tunnel to my localhost and i tried to reach it with curl from my server. But intervals.icu wonāt send me webhooks, since the types are not saved i guess?
Yet another bug introduced by the big update. Fixed. Tx for the report.
thank you for the fast fix. Working as expected now.
edit: one small detail i noticed with webhooks, if i change the activity type, for example from Walk to Hike it does not trigger an Event.
Also when i change the activity type in garmin connect, it does not update in intervals. Maybe this is by intention, or a bug, or simply not implemented. idk.
AFAIK, Garmin doesnāt send webhooks for activity type changes
i donāt know how the sync between Garmin Connect and Intervals.icu is happening, but my point was: when i change the name of my activity in garmin connect, it instantly updates the name in Intervals. But when i change the activity type in garmin connect, it does nothing in intervals.
and back to the webhook: when i change the activity type in intervals, i dont get a āACTIVITY_UPDATEDā, but if i change the name, or the description or whatever, it does trigger.
Activity type is set to what it is in the original FIT file and not what is on Garmin Connect.
That should cause it to be re-analysed. I will have a look. Tx.
Garmin only sends webhooks for name and description updates, not type. MedtechCD is correct, the type comes from the fit file only.
I noticed that the category of an event includes the type āPLANā in the enum - creating an event of that type gives something in the calendar that looks like a hybrid between a workout and a note. I canāt see any way to create it using the UI. You can also set the color using the API, but the corresponding dialog doesnāt have a picker.
Just curious if anybody knows what itās for?
We are busy working on a plan builder and it is to help with that.


