---
title: "Webhook Payload"
method: POST
path: "/api/webhooks"
tags: ["Webhooks"]
---

# Webhook Payload

`POST /api/webhooks`

## Request

- Base URL: `https://app.timetastic.co.uk` (the document declares no server; this is the origin it was published from)
- URL: `https://app.timetastic.co.uk/api/webhooks`
- Auth: none declared

This is an example of the payload you'll receive when we make a webhook request to your server.
Anything other than a 2xx response will be treated as a failure and redirects will not be followed.
            
This entry documents the payload we send to *you*. It is not a callable Timetastic endpoint.

## Response `200`

The shape of the payload we POST to your webhook URL. Shown for reference only; this endpoint
never returns it.

- TimetasticCoreQueueModelsWebhookPayload
  - `eventId` integer: Event ID is how we reference individual events. They are globally unique per event
  - `eventType` 'TestEvent' | 'AbsenceRequested' | 'AbsenceApproved' | 'AbsenceDeclined' | 'AbsenceCancelled' | 'AbsenceBooked' | 'AbsenceUpdated': The type of event we're raising - The recordID will be related to this - `TestEvent` - `AbsenceRequested` - `AbsenceApproved` - `AbsenceDeclined` - `AbsenceCancelled` - `AbsenceBooked` - `AbsenceUpdated`
  - `url` string, nullable: The URL We're posting to
  - `recordId` integer: The related record the event concerns. This is currently just the HolidayID as Webhooks only reference bookings for now.
  - `timestamp` string, date-time: When did the event happen (UTC)
  - `performingUser` TimetasticCoreQueueModelsWebhookUser: A slimmed down user object for just passing the ID and name back to reduce the JSON payload.
    - `id` integer: The user's ID
    - `firstname` string, nullable: User's firstname
    - `surname` string, nullable: User's surname/lastname
    - `fullname` string, nullable: User's Full name
  - `recordData` TimetasticCoreModelsApiModelsHolidayApiModel: A representation of a holiday
    - `id` integer: The unique Id for this holiday
    - `dateRangeString` string, nullable: A formatted string representation of the holiday date range
    - `startDateString` string, nullable: A formatted string representation of the holiday start date
    - `endDateString` string, nullable: A formatted string representation of the holiday end date
    - `startDate` string, date-time: Start of the holiday. Use in conjunction with the start type to determine the holiday start
    - `adjustedStartDateUtc` string, date-time, nullable: UTC equivalent of the actual start of the booking period, adjusted for the organisation timezone and user work schedule. For daily bookings this reflects the start of the working day/period.
    - `startType` 'Morning' | 'Afternoon' | 'Hours': Morning - Booked for the morning of the start date Afternoon - Booked after the morning of the start date (starts at lunchtime) Hours - This is an hourly booking, use the time in the Start. - `Morning` - `Afternoon` - `Hours`
    - `endDate` string, date-time: End of the holiday. Use in conjunction with the end type to determine the holiday end
    - `adjustedEndDateUtc` string, date-time, nullable: UTC equivalent of the actual end of the booking period, adjusted for the organisation timezone and user work schedule.
    - `endType` 'Morning' | 'Afternoon' | 'Hours': Used to define the time the holiday ends: Morning - Ends after the morning of the last day (lunchtime) Afternoon - Ends at the end of the last day (whole day booked) Hours - This is an hourly booking, use the time in the Start. - `Morning` - `Afternoon` - `Hours`
    - `userId` integer: The user this leave is for
    - `userName` string, nullable: The user name this leave is for
    - `requestedById` integer: The user who requested this leave
    - `leaveTypeId` integer
    - `duration` number, double
    - `deduction` number, double
    - `actionerId` integer
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `reason` string, nullable: The reason for the holiday. Only visible if the requestor has permissions to see this
    - `declineReason` string, nullable: The reason for declining (or cancelling) the holiday. Only visible if the requestor has permissions to see this
    - `status` 'Pending' | 'Approved' | 'Cancelled' | 'Declined': The status of this holiday - `Pending` - `Approved` - `Cancelled` - `Declined`
    - `autoApproved` boolean: Whether this holiday was automatically approved (for example, if booked by an Admin user)
    - `bookingUnit` 'Days' | 'Hours': Whether the holiday was booked in day(s) or hours. - `Days` - `Hours`
    - `leaveType` string, nullable

## Other responses

- `404`: Always. There is nothing to call here.

---

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