A REST API for everything the dashboard can do
Create employees and contractors, generate contracts, read payroll runs and invoices, and subscribe to webhooks. Keys per workspace, OAuth for integrations, a sandbox that behaves like production, and SDKs for Node and Python.
Base URL https://api.ubiquehq.co.uk/v1 · JSON in, JSON out · TLS 1.2 minimum
# Create an employee in Portugal
curl -X POST https://api.ubiquehq.co.uk/v1/employees \
-H "Authorization: Bearer ubq_live_7f3a..." \
-H "Content-Type: application/json" \
-d '{
"first_name": "Inês",
"last_name": "Ferreira",
"email": "ines@example.com",
"country": "PT",
"job_title": "Senior Engineer",
"employment_type": "eor",
"salary": { "amount": 62000, "currency": "EUR", "period": "year" },
"start_date": "2026-11-02"
}'
API keys per workspace, OAuth for integrations
Each Ubique workspace can issue its own API keys from Settings → Developers. Keys are scoped (read, write, payroll, webhooks) and can be restricted to an IP allow-list. A key belongs to the workspace, not to the person who created it, so it survives staff changes. Rotate a key and the old one keeps working for 24 hours.
If you are building an integration that many Ubique customers will install, use OAuth 2.0 with the authorization-code flow. Your app requests scopes, the customer's admin approves them in their dashboard, and you receive a refresh token per workspace. We review and list OAuth apps on the Integrations page.
Keys prefixed ubq_live_ hit production. Keys prefixed ubq_test_ hit the sandbox. Both use the same base URL; the key decides the environment.
# List payroll runs for October 2026
curl https://api.ubiquehq.co.uk/v1/payroll_runs?period=2026-10 \
-H "Authorization: Bearer ubq_live_7f3a..."
# Response (truncated)
{
"data": [
{
"id": "pr_01J9K2M4N6P8",
"country": "DE",
"period": "2026-10",
"status": "completed",
"employee_count": 14,
"total_employer_cost": { "amount": 9842017, "currency": "EUR" },
"pay_date": "2026-10-28"
}
],
"has_more": false
}
Amounts are integers in minor units (cents, pence). Dates are ISO 8601. IDs are prefixed by resource type.
The main endpoints
Every resource supports list, retrieve and, where it makes sense, create and update. Lists are cursor-paginated with limit and starting_after.
People and contracts
/employeesCreate an EOR, PEO or VEO employee. Returns the employee and a draft contract./employees/{id}Retrieve an employee, including status, contract and current compensation./contractorsOnboard a contractor. Triggers the risk questionnaire./contracts/{id}/sendSend a contract or amendment for e-signature./employees/{id}/offboardStart offboarding with a last day and reason. Returns what local law requires.Payroll and money
/payroll_runsList payroll runs by period, country or status./payroll_runs/{id}/payslipsPayslip lines for a run: gross, deductions, net, employer cost./payroll_itemsAdd a bonus, commission or one-off deduction before cut-off./invoicesYour Ubique invoices with line items per person and PDF links./expensesSubmitted and approved expenses, with receipt URLs.Time off and documents
/leave_requestsPending and approved leave with balances./leave_requests/{id}/approveApprove or reject from your own tools./documentsContracts, payslips, tax forms and ID documents, by employee. Scoped to the documents:read permission.Reference data
/countriesThe 160 countries with model (own or partner), currency and onboarding lead time./countries/{code}/cost_estimateThe Calculator as an endpoint: total employer cost for a salary./workspaceYour workspace, plans and enabled integrations.Be told when something happens
Register an HTTPS endpoint per workspace and choose the events. Every delivery is signed with an HMAC-SHA256 signature in the Ubique-Signature header, using a secret shown once when you create the endpoint. Deliveries that do not return a 2xx are retried with exponential backoff for 72 hours, and you can replay any event from the dashboard.
employee.createdwhen a new employee is added, before the contract is sent.contract.signedwhen all parties have signed a contract or amendment.payroll.run.completedwhen a country's payroll for a period is finalised and funds are sent.invoice.issuedwhen a Ubique invoice is created, with a link to the PDF and line items.
Also available: contractor.risk_score.changed, leave_request.created, expense.approved and employee.offboarded.
# Example payload: payroll.run.completed
{
"id": "evt_01J9K3R7T2V5",
"type": "payroll.run.completed",
"created_at": "2026-10-28T09:14:03Z",
"data": {
"payroll_run_id": "pr_01J9K2M4N6P8",
"country": "DE",
"period": "2026-10",
"employee_count": 14,
"pay_date": "2026-10-28"
}
}
# Verify the signature (Node)
import { verifyWebhook } from "@ubique/sdk";
const event = verifyWebhook(req.rawBody, req.headers["ubique-signature"], process.env.UBIQUE_WEBHOOK_SECRET);
Rate limits
600 requests per minute per workspace on live keys, 300 on test keys. Bulk endpoints count once per call, not per record. Each response carries X-RateLimit-Remaining and X-RateLimit-Reset headers; a 429 includes Retry-After. Enterprise plans can request higher limits.
Sandbox
Every workspace gets a sandbox with the same API and the same country rules as production. Contracts are generated but not legally binding, payroll runs on demand instead of on a calendar, and nothing is paid. Webhooks fire. Test keys are issued from the same Developers settings page; no sales conversation required.
SDKs
@ubique/sdk for Node (TypeScript types included, Node 18+) and ubique for Python (3.9+). Both cover every endpoint, handle pagination and retries, and verify webhook signatures. Open source under MIT. Other languages can use the OpenAPI 3.1 specification, available from the Developers settings page.
Already on Merge? Ubique is a supported HRIS
If your product integrates with HR systems through Merge's unified API, Ubique is available as a connector in the HRIS and Payroll categories. Your customers authorise Ubique once in Merge Link and you read employees, employments, time off and payroll runs through Merge's common model, with no Ubique-specific code.
The direct API is still the better choice when you need Ubique-specific fields such as the contractor risk score, the employment model (EOR, PEO, VEO) or country lead times, or when you want to write data back.
See all 24 integrationsChangelog
/countries/{code}/cost_estimatenow returns a breakdown by contribution type, matching Ubique Calculator.- New event
contractor.risk_score.changed. Python SDK 2.3 adds typed event models. POST /employees/{id}/offboardreturns the statutory notice and severance estimate in the response.- SCIM 2.0 provisioning for Okta and Microsoft Entra ID moved from beta to general availability.
- Rate limits raised from 300 to 600 requests per minute on live keys. Node SDK 3.0 drops Node 16.
- Ubique listed as a Merge HRIS and Payroll connector.
- Webhook replay from the dashboard. Deliveries retained for 30 days.
Breaking changes are announced 90 days ahead by email to every key owner. The /v1 prefix will not change in 2026.
Building something on Ubique?
Ask for sandbox access, or book a demo and bring your engineer.