API Reference
Build powerful integrations with the GoodOff API. Access decks, cards, and learning analytics programmatically.
Authentication
Use JWT tokens for secure API access. Include the token in the Authorization header.
Rate Limits
Free tier: 100 requests/hour. Pro tier: 1000 requests/hour. Enterprise: Unlimited.
Response Format
All responses are in JSON format with consistent error handling and status codes.
API Endpoints
POST
/api/auth/login
Authenticate user and receive JWT token
Parameters:
email
(string)requiredpassword
(string)requiredGET
/api/decks
Get all decks for authenticated user
POST
/api/decks
Create a new deck
Parameters:
name
(string)requireddescription
(string)POST
/api/cards
Create a new flashcard
Parameters:
deck_id
(string)requiredfront
(string)requiredback
(string)requiredQuick Start Example
// Authentication
const response = await fetch('https://api.goodoff.co/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: '[email protected]',
password: 'your-password'
})
});
const { token } = await response.json();
// Get user's decks
const decks = await fetch('https://api.goodoff.co/decks', {
headers: {
'Authorization': `Bearer ${token}`
}
});