---
title: "Decline a change of a request"
method: POST
path: "/requests/{id}/changes/{changeId}/decline"
tags: ["Requests"]
---

# Decline a change of a request

`POST /requests/{id}/changes/{changeId}/decline`

## Request

- Base URL: `https://api.absentify.com/api/v1`
- URL: `https://api.absentify.com/api/v1/requests/{id}/changes/{changeId}/decline`
- Auth: API key in header `X-API-KEY`

Decline the pending change of an approved request on behalf of the user who created the API token. Only the approvers of the change (or an admin) can do this. The request stays as it was and the requester gets the reason. Fails with 409 when the change is no longer pending or when `revision` does not match the request.

## Path parameters

- `id` string, uuid, required
- `changeId` integer, required

## Request body

- object
  - `decline_reason` string, required: The reason for declining the change. The request itself stays as it is.
  - `revision` integer: Revision you last saw (from GET /requests/{id} or the webhook). If the request was changed since, the call fails with 409 and nothing happens.

## Response `200`

Successful response

- object
  - `success` boolean, required
  - `message` string, required
  - `change` object, required
    - `id` integer, required
    - `revision` integer, nullable, required: The revision the request gets when this change is applied. Null while the change is pending, declined or withdrawn.
    - `kind` 'reason' | 'shortened' | 'extended' | 'moved' | 'leave_type', required
    - `status` 'pending' | 'approved' | 'declined' | 'withdrawn' | 'applied', required: `pending` waits for approvers, `applied` is in force, `declined` and `withdrawn` never changed the request.
    - `previous` object, required: The request as it was before this change.
      - `start` string, required
      - `end` string, required
      - `start_at` 'morning' | 'afternoon', required: For day-based leave types: whether the absence starts in the `morning` (the whole first day counts) or `afternoon` (only the second half of the first day). Ignored for hour-based leave types.
      - `end_at` 'lunchtime' | 'end_of_day', required: For day-based leave types: whether the absence ends at `lunchtime` (only the first half of the last day) or `end_of_day` (the whole last day counts). Ignored for hour-based leave types.
      - `leave_type` object, required
        - `id` string, required
        - `name` string, nullable, required
      - `duration` number, required: Calendar duration, including non-working days and non-working time: calendar days for day and half-day leave units, elapsed minutes from start to end for hour and minute units. Use `workday_absence_duration` for the counted duration.
      - `workday_absence_duration` number, required: Counted duration, the value absentify shows: the working time the absence takes, based on the work schedule and public holidays, unless the leave type also counts days off or public holidays. Days for day and half-day leave units, minutes for hour and minute units. If the leave type deducts from an allowance, this is the amount the absence takes from it, or for a proposed change, would take once the change applies. Canceled and declined requests keep the value but take nothing from the allowance.
      - `reason` string, nullable, required
    - `proposed` object, required: The request as this change wants it. Only for `applied` changes is this what is in force.
      - `start` string, required
      - `end` string, required
      - `start_at` 'morning' | 'afternoon', required: For day-based leave types: whether the absence starts in the `morning` (the whole first day counts) or `afternoon` (only the second half of the first day). Ignored for hour-based leave types.
      - `end_at` 'lunchtime' | 'end_of_day', required: For day-based leave types: whether the absence ends at `lunchtime` (only the first half of the last day) or `end_of_day` (the whole last day counts). Ignored for hour-based leave types.
      - `leave_type` object, required
        - `id` string, required
        - `name` string, nullable, required
      - `duration` number, required: Calendar duration, including non-working days and non-working time: calendar days for day and half-day leave units, elapsed minutes from start to end for hour and minute units. Use `workday_absence_duration` for the counted duration.
      - `workday_absence_duration` number, required: Counted duration, the value absentify shows: the working time the absence takes, based on the work schedule and public holidays, unless the leave type also counts days off or public holidays. Days for day and half-day leave units, minutes for hour and minute units. If the leave type deducts from an allowance, this is the amount the absence takes from it, or for a proposed change, would take once the change applies. Canceled and declined requests keep the value but take nothing from the allowance.
      - `reason` string, nullable, required
    - `changed_by` object, nullable, required
      - `id` string, required
      - `name` string, nullable, required
    - `decided_by` object, nullable, required
      - `id` string, required
      - `name` string, nullable, required
    - `created_at` string, required
    - `decided_at` string, nullable, required
    - `decision_reason` string, nullable, required

## Other responses

- `400`: Invalid input data
- `401`: Authorization not provided
- `403`: Insufficient access
- `500`: Internal server error

## Changes

- **2026-10-07** `9723c592a45f`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/absentify/apis/absentify-crud-api/changes/requests/:id/changes/:changeId/decline/post.md)

---

[API](https://skmtc.dev/absentify/apis/absentify-crud-api.md) - [All operations](https://skmtc.dev/absentify/apis/absentify-crud-api/llms.txt) - [OpenAPI document](https://skmtc.dev/absentify/apis/absentify-crud-api/revisions/f617e161c057?raw)
