Prerequisites
- A Promptwatch account (Sign up here)
- An active project
- Basic familiarity with RESTful APIs
Step 1: Get Your API Key
API Key Types
Promptwatch offers two types of API keys: Project-Level Keys- Scoped to a specific project
- Automatically associated with the project
- Recommended for most use cases
- Access to all projects in your organization
- Require
X-Project-Idheader to specify which project to query - Useful for cross-project analytics
Creating an API Key
- Go to Settings -> API Keys
- Click “Create API Key”
- Choose your key type and project (for project-level keys)
- Copy and securely store your API key
Step 2: Authenticate Your Requests
All API requests require authentication via theX-API-Key header.
Using Project-Level Keys
Using Organization-Level Keys
Step 3: Validate Your API Key
Test your API key by calling the validate endpoint:Step 4: Make Your First API Request
Now that your API key is validated, try fetching your monitors:Error Handling
The API uses standard HTTP status codes:| Status Code | Meaning |
|---|---|
| 200 | Success |
| 400 | Bad Request - Check your parameters |
| 401 | Unauthorized - Invalid API key |
| 403 | Forbidden - Missing Project ID or insufficient permissions |
| 404 | Not Found - Resource doesn’t exist |
| 429 | Too Many Requests - Rate limit exceeded |
| 500 | Server Error - Contact support |
Next Steps
API Reference
Explore all available endpoints
Rate Limits
Learn about rate limits
Need Help?
- Email: team@promptwatch.com
- Website: promptwatch.com