API Patterns
Common patterns for AI agents working with the Dunmore API.
Recommended patterns for agents using the Dunmore API.
Full Setup Pattern
An agent that creates a complete monetized API:
- Create project with wallet address
- Register endpoints with pricing
- Create API key for the project
- Set up webhook for payment notifications
- Configure Slack for alerts
Idempotent Operations
Use consistent naming to avoid duplicate resources. Check if a resource exists before creating it.
Error Handling
The API returns standard HTTP status codes:
| Status | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 400 | Validation error |
| 401 | Unauthorized |
| 404 | Not found |
| 409 | Conflict (duplicate) |
| 429 | Rate limited |
Rate Limit Headers
Every response includes rate limit headers:
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 299
X-RateLimit-Reset: 1708300800