Integrate CleverSlip into your workflow. Manage employees, generate payslips, and download PDFs programmatically.
All API requests require a Bearer token. Create an API key from your dashboard, then include it in the Authorization header.
curl -X GET https://cleverslip.com/api/v1/employees \ -H "Authorization: Bearer pslp_your_api_key"
/api/v1/employeesList all active employees. Supports pagination and search.
{
"data": [
{
"id": "clx...",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Software Engineer",
"salary": 85000,
"startDate": "2024-01-15",
"isActive": true,
"createdAt": "2024-01-15T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z"
}
],
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}/api/v1/employeesCreate a new employee. Subject to your plan's employee limit.
{
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Software Engineer",
"salary": 85000,
"startDate": "2024-01-15"
}{
"data": {
"id": "clx...",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Software Engineer",
"salary": 85000,
"startDate": "2024-01-15",
"isActive": true,
"createdAt": "2024-01-15T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z"
}
}/api/v1/employees/:idGet a single employee by ID.
{
"data": {
"id": "clx...",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Software Engineer",
"salary": 85000,
"startDate": "2024-01-15",
"isActive": true,
"createdAt": "2024-01-15T00:00:00.000Z",
"updatedAt": "2024-01-15T00:00:00.000Z"
}
}/api/v1/employees/:idUpdate an employee. All fields except startDate can be modified.
{
"firstName": "Jane",
"lastName": "Smith",
"email": "[email protected]",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Senior Engineer",
"salary": 95000
}{
"data": {
"id": "clx...",
"email": "[email protected]",
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001",
"department": "Engineering",
"position": "Senior Engineer",
"salary": 95000,
"startDate": "2024-01-15",
"isActive": true,
"createdAt": "2024-01-15T00:00:00.000Z",
"updatedAt": "2024-06-01T00:00:00.000Z"
}
}/api/v1/employees/:idSoft-delete an employee. Sets isActive to false and records an end date.
204 No Content
/api/v1/payslipsList payslips. Supports pagination, search, and filtering by employeeId.
{
"data": [
{
"id": "clx...",
"employeeId": "clx...",
"country": "US",
"payPeriodStart": "2024-06-01",
"payPeriodEnd": "2024-06-30",
"grossSalary": 7083.33,
"totalDeductions": 2125.00,
"netSalary": 4958.33,
"createdAt": "2024-07-01T00:00:00.000Z",
"employee": {
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001"
}
}
],
"total": 1,
"page": 1,
"limit": 20,
"totalPages": 1
}/api/v1/payslipsCreate a payslip and automatically generate the PDF. Subject to plan limits.
{
"country": "US",
"employeeId": "clx...",
"payPeriodStart": "2024-06-01",
"payPeriodEnd": "2024-06-30",
"payDate": "2024-07-05",
"paymentMethod": "Bank Transfer",
"earnings": {
"baseSalary": 7083.33,
"bonus": 500
},
"deductions": {
"federalTax": 1200,
"stateTax": 450,
"socialSecurity": 475
},
"notes": "June 2024 payslip",
"sendEmail": false
}{
"data": {
"id": "clx..."
}
}/api/v1/payslips/:idGet full payslip details including all earnings, deductions, and employee info.
{
"data": {
"id": "clx...",
"employeeId": "clx...",
"country": "US",
"payPeriodStart": "2024-06-01",
"payPeriodEnd": "2024-06-30",
"payDate": "2024-07-05",
"paymentMethod": "Bank Transfer",
"earnings": [
{ "key": "baseSalary", "label": "Base Salary", "amount": 7083.33 },
{ "key": "bonus", "label": "Bonus", "amount": 500 }
],
"deductions": [
{ "key": "federalTax", "label": "Federal Tax", "amount": 1200 },
{ "key": "stateTax", "label": "State Tax", "amount": 450 },
{ "key": "socialSecurity", "label": "Social Security", "amount": 475 }
],
"grossSalary": 7583.33,
"totalDeductions": 2125.00,
"netSalary": 5458.33,
"notes": "June 2024 payslip",
"createdAt": "2024-07-01T00:00:00.000Z",
"employee": {
"firstName": "Jane",
"lastName": "Smith",
"employeeId": "EMP-001"
}
}
}/api/v1/payslips/:idPermanently delete a payslip and its generated PDF.
204 No Content
/api/v1/payslips/:id/pdfDownload the payslip as a PDF file. Returns binary PDF with Content-Disposition header.
Content-Type: application/pdf Content-Disposition: attachment; filename="payslip-Jane-Smith-2024-06-01-2024-06-30.pdf" <binary PDF data>
List endpoints accept the following query parameters:
| Parameter | Default | Description |
|---|---|---|
| page | 1 | Page number (min: 1) |
| limit | 20 | Items per page (1–100) |
| search | — | Filter by name, email, or employee ID (max 255 chars) |
| employeeId | — | Filter payslips by employee (payslips only) |
GET /api/v1/employees?page=2&limit=10&search=jane
The API returns standard HTTP status codes. Error responses include a JSON body with an error field.
| Status | Description |
|---|---|
| 400 | Bad Request — invalid parameters or missing required fields |
| 401 | Unauthorized — invalid or missing API key |
| 403 | Forbidden — plan limit reached (employees, payslips, or feature) |
| 404 | Not Found — resource does not exist or is not accessible |
| 429 | Too Many Requests — rate limit exceeded |
| 500 | Internal Server Error — unexpected failure, try again later |
{
"error": "Missing required field: firstName"
}API requests are rate-limited to 120 requests per minute per API key.
When the limit is exceeded, requests return 429 Too Many Requests. Wait before retrying.