Set up your development environment and build integrations with the COR API
This guide helps you configure your development environment, obtain API credentials, and implement best practices for building robust integrations with COR.
Get your API credentials
Before you can make API requests, you need to obtain your API Key and Client Secret from the COR dashboard.
1
Access API settings
Log in to your COR account and navigate to Settings > Integrations > API.
2
Generate credentials
Click Generate API Key to create a new API Key and Client Secret pair.
API Key settings in the COR dashboard
Store your Client Secret securely. It is only displayed once during creation. If you lose it, you must generate new credentials.
3
Encode credentials for authentication
For Client Credentials authentication, encode your credentials in Base64:
This produces a string like WU9VUl9BUElfS0VZOllPVVJfQ0xJRU5UX1NFQ1JFVA== that you use in the Authorization header.
API environments
COR provides three API services that work together to manage your projects, resources, and external integrations.
COR API
Base URL:https://api.projectcor.com/v1Main API for projects, tasks, clients, users, time tracking, and transactions.
Resource Allocation API
Base URL:https://planner.svc.v2.projectcor.comDedicated service for managing user capacity and project allocations.
Integrations API
Base URL:https://integrations.projectcor.com/Service for external system integrations with external ID mapping and bidirectional sync.
All three APIs share the same authentication. Use your access token from the main COR API to authenticate requests to the Resource Allocation API and Integrations API.
Development tools
Import the OpenAPI specification
Import the COR OpenAPI specification into your preferred API client for easy testing:
Use the page and perPage parameters to navigate through results:
def get_all_projects(access_token): """Fetch all projects across all pages.""" all_projects = [] page = 1 while True: response = requests.get( 'https://api.projectcor.com/v1/projects', params={'page': page, 'perPage': 50}, headers={'Authorization': f'Bearer {access_token}'} ) result = response.json() # Add projects from current page all_projects.extend(result['data']) # Check if we've reached the last page if page >= result['lastPage']: break page += 1 return all_projects
async function getAllProjects(accessToken) { const allProjects = []; let page = 1; let lastPage = 1; do { const response = await fetch( `https://api.projectcor.com/v1/projects?page=${page}&perPage=50`, { headers: { 'Authorization': `Bearer ${accessToken}` } } ); const result = await response.json(); allProjects.push(...result.data); lastPage = result.lastPage; page++; } while (page <= lastPage); return allProjects;}
By default, list endpoints return 20 items per page. You can increase this up to 50 with the perPage parameter to reduce the number of requests. Set page=false to disable pagination entirely (use with caution on large datasets).
Error handling
HTTP status codes
The COR API uses standard HTTP status codes:
Code
Description
Action
200
Success
Process the response
204
Success (No Content)
Request succeeded, no body returned
400
Bad Request
Check request parameters and body
401
Unauthorized
Refresh or re-obtain access token
404
Not Found
Verify the resource ID exists
429
Too Many Requests
Implement backoff and retry
500
Server Error
Retry with exponential backoff
Implement retry logic
Handle transient errors with exponential backoff:
import timeimport requestsdef request_with_retry(url, headers, max_retries=3): for attempt in range(max_retries): response = requests.get(url, headers=headers) if response.status_code == 200: return response.json() if response.status_code in [429, 500, 502, 503, 504]: wait_time = (2 ** attempt) + 1 # 1s, 3s, 5s print(f"Retry {attempt + 1}/{max_retries} after {wait_time}s") time.sleep(wait_time) continue # Non-retryable error response.raise_for_status() raise Exception(f"Max retries exceeded for {url}")
Troubleshooting
401 Unauthorized - Invalid or expired token
Causes:
Access token has expired
Token was not included in the request
Token format is incorrect
Solutions:
Verify the token is included: Authorization: Bearer YOUR_TOKEN
Refresh the token using the /oauth/refreshtoken endpoint
Re-authenticate to obtain a new token pair
400 Bad Request - Invalid request format
Causes:
Missing required fields in the request body
Invalid data types or formats
Malformed JSON
Solutions:
Check the API reference for required parameters
Validate JSON syntax before sending
Ensure dates are in the correct format (YYYY-MM-DD)
403 Forbidden - Insufficient permissions
Causes:
User lacks permission for the requested action
API key scope is limited
Solutions:
Verify your user has the required permissions in COR
Contact your COR administrator to adjust permissions