Haris Guide
Guide: Integrations

GuideOwners & admins

Integrations: webhooks, API, mapping

Menu: Admin → Integrations (owner only). Available on the Pro and Custom plans. Used to connect Haris with other systems, e.g. Onix.

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

  1. 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.
  2. 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).
  3. Every delivery carries the headers X-Haris-Event, X-Haris-Delivery, and X-Haris-Signature: t=<seconds>,v1=<HMAC-SHA256>. The receiver verifies the signature over the raw body and rejects timestamps more than 5 minutes off.
  4. 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).
  5. With ≥ 50 permanently failed deliveries within 7 days the webhook is disabled automatically and the owner is notified. Fix the receiver, then press Enable.
  6. Send test sends a ping event 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). The hrs_… 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 — filters status, updated_since, email, sassly_sub; pages with cursor and limit (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, 403 insufficient_scope, 404 not_found, 422 invalid_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

  1. Add a mapping Onix → Tenant with the Onix tenant ID.
  2. Create a webhook to Onix's receiver URL with the employee.* events, then set the secret in Onix.
  3. Optional: create an employees:read API key for the initial sync / polling GET /api/v1/employees?updated_since=.
  4. Onix matches users by sassly_sub (once the employee has accepted the invitation), otherwise by email.