---
title: "Create a dated absence for a resource"
method: POST
path: "/v1/resources/{resourceId}/absences"
tags: ["Resources"]
---

# Create a dated absence for a resource

`POST /v1/resources/{resourceId}/absences`

## Request

- Base URL: `https://api.workwing.io`
- URL: `https://api.workwing.io/v1/resources/{resourceId}/absences`
- Auth: HTTP bearer

Marks a resource unavailable for a window of time, blocking scheduling and auto-assignment for jobs whose scheduled window overlaps it (ends_at is exclusive). Pass starts_at and ends_at as ISO-8601 instants for a timed absence, or start_date, end_date and is_all_day: true for a whole-day absence; the day range is resolved to instant bounds in the organisation's configured timezone, with end_date inclusive of the last day.

## Path parameters

- `resourceId` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `starts_at` string
  - `ends_at` string
  - `start_date` string
  - `end_date` string
  - `is_all_day` boolean

## Response `201`

Default Response

- object
  - `data` object, required
    - `id` string, uuid, required
    - `resource_id` string, uuid, required
    - `starts_at` string, date-time, required
    - `ends_at` string, date-time, required: Exclusive end of the absence.
    - `is_all_day` boolean, required
    - `created_at` string, date-time, required
    - `updated_at` string, date-time, required
  - `meta` object, required
    - `request_id` string, required
    - `timestamp` string, date-time, required

---

[API](https://skmtc.dev/workwing/apis/workwing-api.md) · [All operations](https://skmtc.dev/workwing/apis/workwing-api/llms.txt) · [OpenAPI document](https://skmtc.dev/workwing/apis/workwing-api/revisions/54bb14368a35?raw)
