Access your projects programmatically with our RESTful API. Available for Pro plan users.
All API requests require authentication using an API key. Only Pro plan users have access to the API.
Include your API key in the Authorization header:
curl -H "Authorization: Bearer pm_your_api_key_here" https://projectmirror.app/api/v1/projectscurl -H "Authorization: Bearer YOUR_API_KEY" https://projectmirror.app/api/v1/projectscurl -H "Authorization: Bearer YOUR_API_KEY" https://projectmirror.app/api/v1/projects?status=activecurl -H "Authorization: Bearer YOUR_API_KEY" https://projectmirror.app/api/v1/projects?sort=title&order=asc/api/v1/projectsRetrieve your projects with flexible sorting and filtering options.
| Parameter | Type | Default | Description |
|---|---|---|---|
sort | string | date | date, title, or status |
order | string | desc | asc or desc |
status | string | all | active, draft, archived, or all |
limit | number | 50 | 1-100 |
offset | number | 0 | Pagination offset |
{
"success": true,
"data": [
{
"_id": "507f...",
"title": "My Project",
"description": "...",
"url": "https://example.com",
"tags": ["web", "app"],
"technologies": ["React", "Next.js"],
"status": "active",
"projectDate": "2024-01-15T00:00:00.000Z",
"createdAt": "2024-01-10T12:00:00.000Z"
}
],
"pagination": {
"total": 42,
"limit": 50,
"offset": 0,
"hasMore": false
},
"meta": {
"sort": "date",
"order": "desc",
"status": "all"
}
}Missing or invalid API key
{
"error": "Invalid API key",
"message": "API key is invalid or has been disabled."
}Not an active Pro plan user or subscription expired
{
"error": "Access denied",
"message": "API access is only available for active Pro plan users. Your subscription may have expired or been downgraded.",
"currentPlan": "Basic",
"upgradeUrl": "https://projectmirror.app/#pricing"
}Invalid parameters
{
"error": "Invalid sort parameter",
"message": "Sort parameter must be one of: date, title, status",
"received": "invalid"
}const API_KEY = 'pm_your_api_key_here';
async function fetchProjects() {
const response = await fetch(
'https://projectmirror.app/api/v1/projects',
{
headers: {
'Authorization': `Bearer ${API_KEY}`
}
}
);
const data = await response.json();
return data;
}async function getProjectsPaginated(page = 0, pageSize = 10) {
const offset = page * pageSize;
const response = await fetch(
`https://projectmirror.app/api/v1/projects?limit=${pageSize}&offset=${offset}`,
{
headers: {
'Authorization': `Bearer ${API_KEY}`
}
}
);
return response.json();
}