HomeDevelopersGuides
Integration Guides
End-to-end tutorials for building real-world integrations with WorkSkedge.
Getting Started with WorkSkedge API
This guide walks you through making your first API request to WorkSkedge, from generating an API key to handling responses.
Step 1: Generate an API Key
1
Log into WorkSkedge
Navigate to app.workskedge.com and sign in to your account.
2
Access Settings
Click your profile icon in the top right, then select Settings.
3
Navigate to API Keys
In the settings sidebar, click API Keys.
4
Generate New Key
Click Generate New Key, give it a descriptive name, choose scopes, and save it securely.
Important
Your API key will only be shown once. Store it securely in a password manager or environment variable. Never commit API keys to version control.
Step 2: Make Your First Request
JavaScriptjs
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://app.workskedge.com/api/v1';
async function getProjects() {
const response = await fetch(`${BASE_URL}/projects`, {
headers: { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' }
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
return response.json();
}Pythonpy
import requests
API_KEY = 'your_api_key_here'
BASE_URL = 'https://app.workskedge.com/api/v1'
def get_projects():
headers = {'X-API-Key': API_KEY, 'Content-Type': 'application/json'}
r = requests.get(f'{BASE_URL}/projects', headers=headers)
r.raise_for_status()
return r.json()cURLbash
curl -X GET "https://app.workskedge.com/api/v1/projects" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json"Step 3: Create a Resource
Create a work orderjs
await fetch(`${BASE_URL}/work-orders`, {
method: 'POST',
headers: { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' },
body: JSON.stringify({
title: 'Install HVAC System',
project_id: 'proj_1234567890',
assigned_to: ['emp_abc123'],
scheduled_start: '2025-01-20T08:00:00Z',
scheduled_end: '2025-01-20T17:00:00Z',
priority: 'high'
})
});Step 4: Handle Errors Gracefully
Retry with backoffjs
async function apiRequest(endpoint, options = {}) {
for (let attempt = 0; attempt < 3; attempt++) {
const res = await fetch(`${BASE_URL}${endpoint}`, {
...options,
headers: { 'X-API-Key': API_KEY, 'Content-Type': 'application/json', ...options.headers }
});
if (res.status === 429) {
const retryAfter = Number(res.headers.get('Retry-After') ?? 60);
await new Promise((r) => setTimeout(r, retryAfter * 1000));
continue;
}
if (!res.ok) throw new Error(`${res.status}: ${res.statusText}`);
return res.json();
}
}