Skip to main content

Authentication

Authenticate every request with an API key via the HTTP header:

X-API-Key: <dev_demo_123>

Key format

  • Development keys start with pp_dev_…
  • Production keys start with pp_live_…
  • Keys are long‑lived secrets. Treat them like passwords.

Tip: Track the response header x-request-id in your logs/support tickets so we can quickly trace any issue.


Quick check

Use your key against the public health endpoint:

curl -s \
-H "X-API-Key: $PORTPULSE_API_KEY" \
https://api.useportpulse.com/v1/health

Using environment variables

Store your key in an environment variable instead of hardcoding it.

# macOS/Linux (temporary for the current shell)
export PORTPULSE_API_KEY="pp_live_xxxxxxxxxxxxx"

# or use a .env file with a loader (dotenv, python-dotenv, etc.)

In CI or serverless platforms, set PORTPULSE_API_KEY in the project’s secret settings.


Common errors

StatusMeaningTypical causeHow to fix
401UnauthorizedMissing header or malformed keySend X-API-Key and verify the value/prefix
403ForbiddenKey disabled or plan lacks accessRotate/enable key; upgrade plan if endpoint is restricted
429Too Many RequestsYou were rate‑limitedSee Rate limits; respect Retry-After
5xxServer errorTransient issueRetry with jitter/backoff; share x-request-id with support

Related docs: Rate limits · Errors


Response headers you may see

HeaderDescription
x-request-idUnique id for this request – include in support tickets
RateLimit-LimitYour current request-per-minute allotment
RateLimit-RemainingRemaining requests in the current window
RateLimit-ResetUTC epoch seconds when the window resets
Retry-AfterSeconds to wait before retrying (sent on 429)
ETagStrong validator for CSV endpoints – see CSV & ETag

Security best practices

  • Do not embed keys in frontend/mobile apps.
  • Keep separate keys for dev (pp_dev_*) and prod (pp_live_*).
  • Rotate immediately if leaked; contact us to revoke a compromised key.
  • Restrict who can access the key in CI, servers, and notebooks.

Postman / Insomnia

Use a workspace variable called PORTPULSE_API_KEY and set the default Auth header:

Key: X-API-Key
Value: &#123;&#123;PORTPULSE_API_KEY&#125;&#125;

See guides: Postman · Insomnia


Next steps

  • Try a real dataset:
    curl -H "X-API-Key: $PORTPULSE_API_KEY" \
    "https://api.useportpulse.com/v1/ports/USLAX/trend?days=30&format=json"
  • Explore the full API in the OpenAPI page from the navbar.

If you hit any issue, send us the x-request-id and timestamp – we’ll trace it for you.