API ReferenceAuthentication

Authentication

Base URL

https://api.pulserun.dev/v1

Authentication Methods

Include your API key in the Authorization header:

Authorization: Bearer pr_live_xxxxxxxxxxxxx

API keys start with pr_live_ (production) or pr_test_ (sandbox).

JWT Tokens

For browser-based sessions, use JWT tokens obtained via login:

# Login
curl -X POST https://api.pulserun.dev/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "you@example.com", "password": "your-password"}'
{
  "access_token": "eyJhbGciOi...",
  "refresh_token": "eyJhbGciOi...",
  "expires_in": 3600
}
# Use the token
Authorization: Bearer eyJhbGciOi...

Refresh Tokens

curl -X POST https://api.pulserun.dev/v1/auth/refresh \
  -H "Content-Type: application/json" \
  -d '{"refresh_token": "eyJhbGciOi..."}'

Auth Endpoints

MethodEndpointDescription
POST/v1/auth/registerCreate account
POST/v1/auth/loginLogin, get JWT
POST/v1/auth/refreshRefresh JWT
POST/v1/auth/forgot-passwordPassword reset
GET/v1/accountGet account details
PUT/v1/accountUpdate account

API Key Permissions

Keys can be scoped:

{
  "permissions": {
    "instances": true,
    "billing": false
  }
}

Rate Limits

Default: 60 requests per minute per API key. Configurable per key.