API Documentation
Integrate Quadrant with your applications using our comprehensive REST API for OKR management.
Quick Navigation
Overview
The Quadrant API provides programmatic access to all OKR management features. Our API follows REST principles and returns JSON responses with standard HTTP status codes.
Base URLs
https://api.mygoals.io/v1
https://api-staging.mygoals.io/v1
Response Format
All responses are JSON with the following structure:
{ "success": true, "data": { ... }, "meta": { ... }, "errors": null }
Authentication
Quadrant API uses Bearer token authentication. Include your API key in the Authorization header for all requests.
API Key Authentication
Replace YOUR_API_KEY
with your actual API key from the dashboard.
Getting Your API Key
- Log into your Quadrant dashboard
- Navigate to your profile settings
- Go to the "API Keys" section
- Generate a new API key
- Copy and securely store your API key
Data Models
Objective
{ "id": 1, "title": "Increase Revenue", "description": "Grow quarterly revenue by 25%", "user_id": 1, "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" }
Key Result
{ "id": 1, "objective_id": 1, "title": "Increase customer acquisition", "description": "Acquire 1000 new customers", "target_value": 1000, "current_value": 750, "unit": "customers", "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" }
Priority
{ "id": 1, "title": "Complete Q1 planning", "description": "Finalize quarterly objectives and key results", "user_id": 1, "position": 1, "completed": false, "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" }
Project
{ "id": 1, "title": "Mobile app launch", "description": "Launch new mobile application", "user_id": 1, "status": "in_progress", "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" }
Health Metric
{ "id": 1, "title": "Team Morale", "description": "Maintain team satisfaction above 8/10", "user_id": 1, "current_value": 8.5, "target_value": 8.0, "status": "green", "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" }
Objectives
List Objectives
Response
{ "success": true, "data": [ { "id": 1, "title": "Increase Revenue", "description": "Grow quarterly revenue by 25%", "user_id": 1, "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" } ], "meta": { "total": 1, "page": 1, "per_page": 20 } }
Get Objective
Response
{ "success": true, "data": { "id": 1, "title": "Increase Revenue", "description": "Grow quarterly revenue by 25%", "user_id": 1, "key_results": [ { "id": 1, "title": "Increase customer acquisition", "current_value": 750, "target_value": 1000 } ], "created_at": "2024-12-15T10:30:00Z", "updated_at": "2024-12-15T10:30:00Z" } }
Create Objective
Request Body
{ "title": "Improve Customer Satisfaction", "description": "Increase customer satisfaction score to 9.0" }
Response
{ "success": true, "data": { "id": 2, "title": "Improve Customer Satisfaction", "description": "Increase customer satisfaction score to 9.0", "user_id": 1, "created_at": "2024-12-15T11:00:00Z", "updated_at": "2024-12-15T11:00:00Z" } }
Update Objective
Request Body
{ "title": "Increase Revenue by 30%", "description": "Grow quarterly revenue by 30% through improved sales" }
Delete Objective
Response
{ "success": true, "message": "Objective deleted successfully" }
Key Results
List Key Results
Query Parameters
objective_id
- Filter by objective IDpage
- Page number (default: 1)per_page
- Items per page (default: 20)
Create Key Result
Request Body
{ "objective_id": 1, "title": "Improve website conversion rate", "description": "Increase website conversion rate from 2% to 3%", "target_value": 3.0, "current_value": 2.0, "unit": "percentage" }
Update Key Result
Request Body
{ "current_value": 2.5, "title": "Improve website conversion rate to 3.5%" }
Priorities
List Priorities
Response
{ "success": true, "data": [ { "id": 1, "title": "Complete Q1 planning", "description": "Finalize quarterly objectives and key results", "position": 1, "completed": false, "created_at": "2024-12-15T10:30:00Z" } ] }
Create Priority
Request Body
{ "title": "Review team metrics", "description": "Analyze current team performance metrics" }
Update Priority Position
Request Body
{ "position": 2, "completed": true }
Projects
List Projects
Response
{ "success": true, "data": [ { "id": 1, "title": "Mobile app launch", "description": "Launch new mobile application", "status": "in_progress", "created_at": "2024-12-15T10:30:00Z" } ] }
Create Project
Request Body
{ "title": "API integration", "description": "Integrate with third-party APIs", "status": "planned" }
Health Metrics
List Health Metrics
Response
{ "success": true, "data": [ { "id": 1, "title": "Team Morale", "description": "Maintain team satisfaction above 8/10", "current_value": 8.5, "target_value": 8.0, "status": "green", "created_at": "2024-12-15T10:30:00Z" } ] }
Create Health Metric
Request Body
{ "title": "Code Quality", "description": "Keep bug reports below 5 per week", "current_value": 3, "target_value": 5, "unit": "bugs_per_week" }
Update Health Metric
Request Body
{ "current_value": 4, "status": "yellow" }
Error Handling
The API uses standard HTTP status codes and returns error details in the response body.
Common Status Codes
Error Response Format
{ "success": false, "errors": [ { "field": "title", "message": "Title cannot be blank" } ], "message": "Validation failed" }
Rate Limiting
API requests are rate limited to ensure fair usage and system stability.
Rate Limits
- • Free Plan: 1,000 requests per hour
- • Pro Plan: 10,000 requests per hour
- • Enterprise: Custom limits
Rate Limit Headers
X-RateLimit-Limit
- Maximum requests per hourX-RateLimit-Remaining
- Remaining requests in current hourX-RateLimit-Reset
- Time when rate limit resets (Unix timestamp)Code Examples
JavaScript (Fetch API)
const API_KEY = 'your_api_key_here'; const BASE_URL = 'https://api.mygoals.io/v1'; // List objectives async function getObjectives() { const response = await fetch(`${BASE_URL}/objectives`, { headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' } }); const data = await response.json(); return data; } // Create a new objective async function createObjective(objective) { const response = await fetch(`${BASE_URL}/objectives`, { method: 'POST', headers: { 'Authorization': `Bearer ${API_KEY}`, 'Content-Type': 'application/json' }, body: JSON.stringify(objective) }); const data = await response.json(); return data; } // Example usage createObjective({ title: 'Improve Customer Satisfaction', description: 'Increase customer satisfaction score to 9.0' }).then(data => console.log(data));
Python (requests)
import requests API_KEY = 'your_api_key_here' BASE_URL = 'https://api.mygoals.io/v1' headers = { 'Authorization': f'Bearer {API_KEY}', 'Content-Type': 'application/json' } # List objectives def get_objectives(): response = requests.get(f'{BASE_URL}/objectives', headers=headers) return response.json() # Create a new objective def create_objective(title, description): data = { 'title': title, 'description': description } response = requests.post(f'{BASE_URL}/objectives', headers=headers, json=data) return response.json() # Example usage objective = create_objective( 'Improve Customer Satisfaction', 'Increase customer satisfaction score to 9.0' ) print(objective)
Ruby (net/http)
require 'net/http' require 'json' API_KEY = 'your_api_key_here' BASE_URL = 'https://api.mygoals.io/v1' # List objectives def get_objectives uri = URI("#{BASE_URL}/objectives") request = Net::HTTP::Get.new(uri) request['Authorization'] = "Bearer #{API_KEY}" request['Content-Type'] = 'application/json' response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end JSON.parse(response.body) end # Create a new objective def create_objective(title, description) uri = URI("#{BASE_URL}/objectives") request = Net::HTTP::Post.new(uri) request['Authorization'] = "Bearer #{API_KEY}" request['Content-Type'] = 'application/json' request.body = { title: title, description: description }.to_json response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http| http.request(request) end JSON.parse(response.body) end # Example usage objective = create_objective( 'Improve Customer Satisfaction', 'Increase customer satisfaction score to 9.0' ) puts objective
Getting Started
Ready to integrate Quadrant into your application? Follow these steps:
Get your API key
Generate an API key from your Quadrant dashboard
Test the API
Use the examples above to make your first API call
Build your integration
Start building your OKR management integration