Integrations: webhooks, API, mapping
Data that is shared
Webhooks and the API only contain these employee fields: id (emp_…), revision, employee number, name, nickname, email, phone number, status, join/end date, Sassly account (once the invitation is accepted), position, department, location, supervisor, and employment type. Salary, compensation, national ID, tax ID, bank account, PIN, and raw attendance data are never sent.
Webhooks
- Integrations → Webhooks → Add webhook: name, receiver URL (
https://, port 443, public server), and events:employee.activated— an employee is activated;employee.updated— the employee data above changes (including offboarding and a linked Sassly account);employee.deactivated— an employee leaves or is cancelled;availability.changed— a published roster or an approved leave changes within the next 14 days.
- The secret (
whsec_…) is shown once after saving — set it in the receiving system. Lost it? Press New secret (the old secret stops working immediately). - Every delivery carries the headers
X-Haris-Event,X-Haris-Delivery, andX-Haris-Signature: t=<seconds>,v1=<HMAC-SHA256>. The receiver verifies the signature over the raw body and rejects timestamps more than 5 minutes off. - The receiver must reply with 2xx. On failure Haris retries after 1 minute, 5 minutes, 15 minutes, 1 hour, 6 hours, and 24 hours; after 7 failures the delivery is marked Permanently failed (you can Resend it from the webhook page).
- With ≥ 50 permanently failed deliveries within 7 days the webhook is disabled automatically and the owner is notified. Fix the receiver, then press Enable.
- Send test sends a
pingevent immediately and shows the receiver's response code.
Delivery order is not guaranteed. Receivers use data.employee.revision: ignore events whose revision is ≤ the stored revision. The full technical guide for receivers is docs/webhooks.md in the Haris repository.
API keys & API v1
- Integrations → API keys → Create API key: a name and permissions (
employees:read,org:read,availability:read). Thehrs_…key is shown once. Revoke rejects the key immediately. - Call with the header
Authorization: Bearer hrs_…(no cookies):GET /api/v1/company— company profile + mappings;GET /api/v1/employees— filtersstatus,updated_since,email,sassly_sub; pages withcursorandlimit(1–200);GET /api/v1/employees/{emp_id};GET /api/v1/org— locations, departments, positions;GET /api/v1/availability?from=&to=— schedule/leave/holiday per employee per date (max. 31 days).
- Errors: 401
invalid_api_key, 403insufficient_scope, 404not_found, 422invalid_request.
Mapping
Integrations → Mapping records this company's ID in other systems (Sassly Suites, Onix, Kobe, Mame, other) as a workspace or tenant. One mapping per system and type; an external ID can belong to one company only. Mappings appear in GET /api/v1/company so other systems can match the company.
Example: Onix
- Add a mapping Onix → Tenant with the Onix tenant ID.
- Create a webhook to Onix's receiver URL with the
employee.*events, then set the secret in Onix. - Optional: create an
employees:readAPI key for the initial sync / pollingGET /api/v1/employees?updated_since=. - Onix matches users by
sassly_sub(once the employee has accepted the invitation), otherwise by email.