API Migration Guide
Moving from REST v1 to v2. This guide covers every breaking change and how to update your code.
Authentication
v1 used API keys in query params. v2 uses Bearer tokens in headers.
# v1 (deprecated)
curl https://api.example.com/data?key=abc123
# v2
curl -H "Authorization: Bearer abc123" https://api.example.com/v2/data
Endpoints Changed
| v1 Endpoint | v2 Endpoint | Notes |
|---|---|---|
GET /users | GET /v2/users | Paginated by default |
POST /users/create | POST /v2/users | RESTful naming |
GET /users/:id/posts | GET /v2/posts?user_id=:id | Flattened |
DELETE /users/:id/remove | DELETE /v2/users/:id | RESTful |
Response Format
All v2 responses are wrapped:
{
"data": { ... },
"meta": {
"page": 1,
"per_page": 20,
"total": 142
}
}
Rate Limits
| Tier | v1 | v2 |
|---|---|---|
| Free | 100/min | 60/min |
| Pro | 1000/min | 600/min |
| Enterprise | Unlimited | 10000/min |
Important: v1 will be sunset on June 30, 2026. All API keys will stop working.
Migration Checklist
- Update auth headers
- Change endpoint URLs
- Handle new response wrapper
- Update rate limit handling
- Test in staging
- Deploy to production