User Profile API
The User Profile API enables you to programmatically manage users, their notification preferences, and account settings.
Managing User Profiles
Retrieve a user’s profile information:
curl -X GET "https://api.uptimekeeper.com/v1/users/current" \
-H "X-API-Key: your_api_key"
Update a user’s profile information:
curl -X PUT "https://api.uptimekeeper.com/v1/users/current" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+15551234567",
"timezone": "America/New_York"
}'
Managing Notification Preferences
Update notification preferences:
curl -X PUT "https://api.uptimekeeper.com/v1/users/current/notifications" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": {
"downtime": true,
"recovery": true,
"weekly_report": true
},
"sms": {
"downtime": true,
"recovery": false
},
"quiet_hours": {
"enabled": true,
"start_time": "22:00",
"end_time": "08:00",
"timezone": "America/New_York"
}
}'
Managing Team Access
For team administrators, retrieve team members:
curl -X GET "https://api.uptimekeeper.com/v1/team" \
-H "X-API-Key: your_api_key"
Add a new team member:
curl -X POST "https://api.uptimekeeper.com/v1/team" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"role": "viewer",
"monitors": ["mon_12345", "mon_67890"]
}'
Update a team member’s role:
curl -X PUT "https://api.uptimekeeper.com/v1/team/user_12345" \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"role": "admin"
}'