Getting Started
Authentication
All API requests require authentication using an API key. Include your API key in the Authorization header of each request.
Authorization: Bearer YOUR_API_KEY
Getting Your API Key
1. Sign in to your Repetix account
2. Go to Settings → API
3. Click "Generate New API Key"
4. Copy and securely store your key
API Endpoints
/api/v1/subscriptions
List all subscriptions for the authenticated user
Parameters
page
limit
category
/api/v1/subscriptions
Create a new subscription
Parameters
name
*cost
*billing_cycle
*next_renewal
*category
/api/v1/subscriptions/{id}
Get details of a specific subscription
Parameters
id
*/api/v1/subscriptions/{id}
Update a subscription
Parameters
id
*name
cost
billing_cycle
/api/v1/subscriptions/{id}
Delete a subscription
Parameters
id
*/api/v1/analytics/summary
Get spending summary and metrics
Parameters
period
Code Examples
Authentication
curl -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ https://api.repetix.com/v1/subscriptions
Create Subscription
const response = await fetch('https://api.repetix.com/v1/subscriptions', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Spotify Premium', cost: 9.99, billing_cycle: 'monthly', next_renewal: '2025-02-13T00:00:00Z', category: 'entertainment' }) }); const subscription = await response.json();
Get Analytics
import requests headers = { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' } response = requests.get( 'https://api.repetix.com/v1/analytics/summary', headers=headers ) analytics = response.json()
Rate Limits
Rate limits are applied per API key and are based on your subscription plan:
Free Plan
Basic API access for personal use
Standard Plan
Increased limits for growing businesses
Premium Plan
High-volume access for enterprises
Rate Limit Headers: Each response includes headers showing your current usage: X-RateLimit-Limit
, X-RateLimit-Remaining
, and X-RateLimit-Reset
.
Response Format
All API responses follow a consistent JSON format:
{ "success": true, "data": { // Response data here }, "message": "Request successful", "pagination": { "page": 1, "limit": 10, "total": 25, "pages": 3 } }
Error Responses
{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Invalid request parameters", "details": { "field": "cost", "issue": "Must be a positive number" } } }
Need Help?
Our developer support team is here to help you integrate the Repetix API successfully.