Skip to main content

At a glance

  • Plan needed: Plus plan (plan feature matrix).
  • Rate limit: 150 requests per second per workspace.
  • Starting points: Quick start for your first call, Webhooks for real-time events, or MCP Server for AI assistants (https://absentify.com/docs/mcp for read-only docs search).

Quick start guide

Create an API key and make your first REST API call.

Webhook integration

Receive real-time notifications when requests are created or updated.

MCP server

Connect AI assistants to your workspace or read-only docs (https://absentify.com/docs/mcp).

Localized names

Endpoints returning leave-type or allowance-type names accept an optional locale (en, de, fr, hu, it, pl, pt, ru, es, tr, uk; query parameter on GET).
  • With locale: name returns the translation if stored (otherwise the default name). Unsupported values like DE or de-DE return 400. On GET /requests_per_day, month, weekday, and fullday are also localized.
  • Without locale: Leave types return their stored name; allowance types follow the API key owner’s language. default_name is always returned.
  • Writing translations: POST /leave_types and PUT /leave_types/{id} accept translations: [{ language, name }] (replaces the full set when sent; omit to keep existing).
  • Webhooks: Always send the stored name only (no locale support).

Managing allowances through the API

Allowances use four linked objects: allowance types (the balance), allowance rules (accrual & carry-over), rule assignments (connecting a user to a rule over a date range), and adjustments (manual corrections on top).

Key rules and conventions

  • Permissions: All write endpoints require an authenticated admin. Read-only GET /allowance-types, GET /allowance-types/{id}, and GET /members/{member_id}/allowances also work for an authenticated manager (via a validated Microsoft Entra ID Bearer token) for members they may view. Workspace API keys belong to active admins only.
  • Units: allowance_unit is days or hours and cannot be changed after creation. Every amount on an hours allowance is sent and returned in minutes.
  • Dates (YYYY-MM-DD): Real calendar dates only (e.g. 2026-02-30 is rejected).
    • rule_start_date and valid_from are the first inclusive day.
    • rule_end_date, valid_until, and adjustment expiry_date are the last inclusive day (null = open-ended; omitting rule_end_date on PATCH leaves it unchanged). expiry_date cannot be earlier than the adjustment date.
    • coverage_start_date (read-only) is the actual first accrual day (rule_start_date or the member’s later employment_start_date). Never write it back into rule_start_date.
  • Rule fields:
    • rule_amount must be > 0. Use POST /members/{member_id}/manual-rule for manual/zero-accrual management.
    • proration_basis (yearly rules; default month): month (whole months + day-prorated partial months), day, full_month (whole 1/12 months only), or none (full amount on join/leave year; mid-year rule switches still count each rule’s months). none cannot combine with rule_duration (Always the full amount can’t be combined with an expiry for each grant.) and may be rejected on migrated workspaces with pre-rule balances.
    • part_time_basis: none, workdays, or hours (users without a personal schedule count as full time). When not none, part_time_reference is required (> 0, max 7 days or 168 hours, always in days or hours even for hourly types), and part_time_from cannot precede day 1 of the current fiscal year.
  • Reasons: Optional on rule edits; required (3 to 500 non-whitespace characters) when creating, updating, switching, or deleting rule assignments.
Breaking change on August 10, 2026: rule_end_date is now the last inclusive day (sending 2026-08-31 covers August 31). Previously it was treated as the first day after coverage ended. Remove any +1 day workaround in older integrations.

Allowance types, chains, and rule moves

  • Types: POST /allowance-types starts with no rules (nothing accrues until a rule is added; workspace limits depend on plan). PATCH updates only sent fields (translations replaces all stored translations when present). DELETE is blocked while leave types, default assignments, or rules depend on it, or if it is the last type. POST /allowance-types/reorder expects every workspace type ID. PUT /allowance-types/{allowance_type_id}/default-rule sets the org default (rule_id: null sets default_rule_manually_managed: true); existing members do not move.
  • Deleting rules: DELETE /rules/{id} requires reassign_to if members are assigned; they switch at the next fiscal-year start, never mid-year.
  • Assignment chains: End dates are accepted only on the day before the next assignment or the member’s last employment day (null if nothing follows). Existing gaps/overlaps are tolerated but cannot be widened. DELETE /rule-assignments/{id} extends the neighboring assignment (preceding forward, or following backward) to cover the gap.
  • Moving members: Prefer POST /members/{member_id}/rule-change or POST /members/{member_id}/manual-rule (passing current_assignment_id, or null if none) to switch atomically in one transaction and one audit entry. GET /rules/{rule_id}/members is a preview without offset (limit 1 to 50, default 10; total counts all).

Carry-over when you switch to manual management

POST /members/{member_id}/manual-rule has no carry_over field. A carry_over object on that call is ignored. absentify copies the year-end carry-over of current_assignment_id, including whether a negative balance carries. Pass current_assignment_id as null when no assignment covers valid_from. Unused allowance then follows the allowance type. On a type with no carry-over of its own, nothing carries over. Choose the carry-over with the MCP tools allowance_rule.assignManualRule or allowance_rule.updateAssignment (MCP Server). Amounts are days, or minutes on an hours allowance (480 is 8 hours). Leave carry_over out to keep the replaced rule. On allowance_rule.updateAssignment, send carry_over only with set_manual true. For a user already managed manually, send both to change it, or leave carry_over out to keep it. A change recalculates every year end in that period, including past ones. GET /members/{member_id}/rule-assignments returns only rule.max_carry_forward. allowance_rule.listAssignments also returns the expiry months and the amount kept.

Balances and audit logs

  • GET /members/{member_id}/allowances: All fiscal years (oldest first) for enabled types. allowance = rule_allowance + adjustments; overtime is separate in compensatory_time_off.
  • GET /members/{member_id}/allowance-breakdown: Month-by-month ledger for one fiscal year (fields stay empty if legacy_unmigrated or no_allowance_for_year is true).
  • POST /allowances/{id}/revert-carryover-override: Pass member_allowance_id from breakdown. Returns brought_forward from before the revert; re-read allowances for the recomputed value.
  • Audit logs (newest first): Rule and type logs take take 1 to 200 (default 100); member logs return up to 200 entries. Rule moves appear under the destination rule (changes.from_rule_id); deleted rules remain readable via GET /allowance-types/{allowance_type_id}/audit-log.
Deprecated endpoint: PUT /members/{id}/allowance/{allowance_type_id}/{year} is deprecated. Use rules and POST /members/{member_id}/adjustments instead. On a ruled member, allowance writes an overwritten Set via API adjustment for the difference from the rule (other manual adjustments stay on top); sending the rule amount removes it. brought_forward, compensatory_time_off, set_as_default, and disabled remain supported (omitted fields stay unchanged, including overwrite_brought_forward). Returns a conflict during migration/rollback and 404 Not Found for uncovered years (do not retry).