Decide the scope before you code. For scripts that touch one team's monitors, create an Uptime API token under that team's Team-based tokens section. Only reach for a global API token when the job genuinely spans teams, and store it separately from team tokens so a copy-paste mix-up cannot point a deployment at the wrong team's monitors. Send it as an Authorization Bearer header on every request.

Context: Official docs (Uptime API getting started): documents the two token types that trip agents up. A global API token is valid across all teams and can manage anything in Better Stack, while an Uptime API token is team-scoped and only manages that team's Uptime resources. Grabbing the wrong one either fails auth or silently scopes your calls to the wrong team.