Appearance
API Reference
What is the CoursePipelines API?
The CoursePipelines API allows you to connect your systems directly with CoursePipelines. This means you can do things like:
- Automatically update variables from your own systems
- Pull course data into your dashboards
- Integrate learner information with your HR systems
- Create custom reports and analytics
TIP
Not a developer? Share this page with your IT team! The API is primarily for technical users who want to create custom integrations with CoursePipelines.
Getting Started with the API
1. Generate an API Key
Before you can use the API, you'll need to create an API key:
- Log in to your CoursePipelines account
- Go to Organization Settings
- Select the API Keys tab
- Click + Generate New Key
- Give your key a name (e.g., "Integration with HR System")
- Set an expiration date if desired
- Click Create Key
- Copy your new API key and store it securely
WARNING
Your API key provides access to your organization's data. Keep it secure and never share it publicly or include it in client-side code.
2. Test Your API Key
Once you have your API key, you can test it with a simple request:
bash
curl -H "X-API-Key: YOUR_API_KEY" https://coursepipelines.com/api/variables
If successful, you'll receive a list of your organization's variables.
Common API Uses
Working with Variables
Get a List of All Variables
http
GET /api/variables
X-API-Key: YOUR_API_KEY
Get Variable Details
http
GET /api/variables/{variable_id}
X-API-Key: YOUR_API_KEY
Update a Variable for a Learner
http
POST /api/variables/set
X-API-Key: YOUR_API_KEY
Content-Type: application/json
{
"variable_id": "your-variable-id",
"learner_id": "learner-email@example.com",
"value": "85"
}
Working with Courses
Get a List of All Courses
http
GET /api/courses
X-API-Key: YOUR_API_KEY
Get Course Details
http
GET /api/courses/{course_id}
X-API-Key: YOUR_API_KEY
Working with Learners
Get a List of All Learners
http
GET /api/learners
X-API-Key: YOUR_API_KEY
Get a Learner's Variables
http
GET /api/learners/{learner_id}/variables
X-API-Key: YOUR_API_KEY
Integration Examples
Example 1: Update a Course Completion in Your LMS
When a learner completes a course in your LMS, you can update a CoursePipelines variable:
javascript
// Example JavaScript code
async function updateCourseCompletion(learnerEmail, courseId) {
const response = await fetch('https://coursepipelines.com/api/variables/set', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
variable_id: 'completion-variable-id',
learner_id: learnerEmail,
value: 'completed'
})
});
const data = await response.json();
return data;
}
Example 2: Display Course Statistics on Your Intranet
Pull course statistics to display on your internal dashboard:
javascript
// Example JavaScript code
async function getCourseStats(courseId) {
const response = await fetch(`https://coursepipelines.com/api/courses/${courseId}/stats`, {
headers: {
'X-API-Key': 'YOUR_API_KEY'
}
});
const data = await response.json();
return data;
}
Using Zapier Instead of the API
If you don't have development resources, you can use our Zapier integration to connect CoursePipelines with 5,000+ other apps without writing any code.
Advanced API Information
Authentication Methods
You can authenticate with the API in three ways:
X-API-Key Header (Recommended)
X-API-Key: YOUR_API_KEY
Bearer Token
Authorization: Bearer YOUR_API_KEY
Query Parameter
?apiKey=YOUR_API_KEY
Rate Limits
To ensure fair usage and system stability, the API has the following limits:
- 100 requests per minute per API key
- 5,000 requests per day per API key
If you exceed these limits, you'll receive a 429 Too Many Requests
response.
Error Handling
API errors follow a consistent format:
json
{
"error": "Error code or name",
"message": "Human-readable error message"
}
Interactive API Documentation
For developers who want to explore the full API capabilities, we provide interactive API documentation:
- Go to coursepipelines.com/api/docs
- Enter your API key in the authorization section
- Try out different endpoints directly in your browser
Need Help?
- For API questions: api-support@coursepipelines.com
- For general help: support@coursepipelines.com
- For custom integration projects: integrations@coursepipelines.com