---
title: "Assign a policy to employees"
method: POST
path: "/companies/{company}/absence-policies/{absence_policy}/assign"
tags: ["Absence Policies"]
---

# Assign a policy to employees

`POST /companies/{company}/absence-policies/{absence_policy}/assign`

## Request

- Base URL: `https://api.factuarea.com/v1`
- URL: `https://api.factuarea.com/v1/companies/{company}/absence-policies/{absence_policy}/assign`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Assign the absence policy to one or more employees. `employee_ids` (a non-empty list of UUID v7, each belonging to your company) is required; an unknown employee returns 422. Returns the policy with its updated assigned-employee count.

## Path parameters

- `company` string, uuid, required
- `absence_policy` string, uuid, required

## Headers

- `Idempotency-Key` string
- `Factuarea-Version` string, date

## Request body

- AssignAbsencePolicyRequest
  - `employee_ids` string[], required: Employee IDs (UUID v7) the policy is assigned to.

## Response `200`

- object
  - `data` AbsencePolicy, required: An absence policy for the Control Horario (time tracking) module: how many days per year an employee accrues for a set of absence types, how those days accrue, and which employees it applies to. `allowance_type` decides whether the yearly allowance is capped (`limited`, with `allowance_days`) or `unlimited`.
    - `id` string, uuid, required: Opaque identifier of the policy, a UUID v7.
    - `object` 'absence_policy', required: Always `absence_policy`.
    - `name` string, required: Human-readable name of the policy (e.g. `Vacaciones estándar`).
    - `allowance_type` 'limited' | 'unlimited', required: Whether the yearly allowance is capped (`limited`) or `unlimited`.
    - `allowance_days` integer, nullable, required: Days accrued per year when `allowance_type` is `limited`; `null` when `unlimited`.
    - `accrual_method` 'annual' | 'monthly', required: How the allowance accrues: `annual` (all at once) or `monthly` (prorated).
    - `absence_type_ids` string[], required: UUID v7 of each absence type this policy covers.
    - `assigned_employee_count` integer, required: Number of employees currently assigned to the policy.
    - `status` 'active' | 'archived', required: Lifecycle status: `active` (usable) or `archived` (retired from use).
    - `carryover` object, required: How much unused balance carries over at year-end under this policy.
      - `type` 'none' | 'capped' | 'unlimited', required: Carryover mode: `none` (no carryover), `capped` (up to `max_days`) or `unlimited`.
      - `max_days` integer, nullable, required: Maximum days that carry over when `type` is `capped`; `null` otherwise.
      - `expiry_month` integer, nullable, required: Month (1..12) on which carried-over days expire, or `null` when they do not expire.
      - `expiry_day` integer, nullable, required: Day of month on which carried-over days expire, or `null` when they do not expire.
    - `created_at` string, date-time, nullable, required: Creation timestamp (ISO 8601).
    - `updated_at` string, date-time, nullable, required: Last-update timestamp (ISO 8601).

## Other responses

- `400`: `parameter_unknown` with `subcode` `retired_active_profile_header`: the retired `X-Active-Profile` header was sent; the company goes in the path. `parameter_invalid_format` on `Factuarea-Version`: the header is not a `YYYY-MM-DD` date. `unsupported_api_version`: the `Factuarea-Version` date is not a supported version.
- `401`: Missing or invalid API key.
- `403`: The request is authenticated but not allowed: the API key lacks the required scope (`insufficient_scope`), the plan does not include the public API or this feature (`addon_not_active`, `feature_not_available_in_plan`), or the module is not available with a test key (`module_not_available_in_sandbox`).
- `404`: The requested resource does not exist or belongs to another company.
- `422`: Validation failed. The `error.param` field identifies which input is invalid.
- `429`: Rate limit exceeded. Retry after the duration in `Retry-After`.
- `500`: Unexpected server error.

---

[API](https://skmtc.dev/factuarea/apis/factuarea-public-api.md) · [All operations](https://skmtc.dev/factuarea/apis/factuarea-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/factuarea/apis/factuarea-public-api/revisions/718e77934422?raw)
