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

# Create Webhook

`POST /webhooks`

## Request

- Base URL: `https://secure.fleetio.com/api`
- URL: `https://secure.fleetio.com/api/webhooks`
- Auth: API key in header `Authorization` and API key in header `Account-Token`
- TypeScript: <https://skmtc.dev/fleetio/apis/fleetio-developer-api/docs/webhooks/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new Webhook

## Request body

- object
  - `all_events` boolean
  - `authorization` string: If the URL requires authentication, the value provided here gets passed as the HTTP 'Authorization' header
  - `contact_archived` boolean
  - `contact_assigned` boolean
  - `contact_comment_added` boolean
  - `contact_created` boolean
  - `contact_deleted` boolean
  - `contact_merged` boolean
  - `contact_updated` boolean
  - `description` string
  - `enabled` boolean
  - `equipment_comment_added` boolean
  - `equipment_created` boolean
  - `equipment_deleted` boolean
  - `equipment_updated` boolean
  - `expense_entry_comment_added` boolean
  - `expense_entry_created` boolean
  - `expense_entry_deleted` boolean
  - `expense_entry_updated` boolean
  - `fault_created` boolean
  - `fault_resolved` boolean
  - `fuel_entry_comment_added` boolean
  - `fuel_entry_created` boolean
  - `fuel_entry_deleted` boolean
  - `fuel_entry_updated` boolean
  - `import_completed` boolean
  - `issue_closed` boolean
  - `issue_comment_added` boolean
  - `issue_created` boolean
  - `issue_deleted` boolean
  - `issue_resolved` boolean
  - `issue_updated` boolean
  - `location_entry_created` boolean
  - `location_entry_deleted` boolean
  - `location_entry_updated` boolean
  - `meter_entry_created` boolean
  - `meter_entry_deleted` boolean
  - `meter_entry_updated` boolean
  - `part_comment_added` boolean
  - `part_created` boolean
  - `part_deleted` boolean
  - `part_updated` boolean
  - `place_created` boolean
  - `place_deleted` boolean
  - `place_updated` boolean
  - `place_visited` boolean
  - `purchase_order_approved` boolean
  - `purchase_order_closed` boolean
  - `purchase_order_comment_added` boolean
  - `purchase_order_created` boolean
  - `purchase_order_deleted` boolean
  - `purchase_order_pending_approval` boolean
  - `purchase_order_purchased` boolean
  - `purchase_order_received` boolean
  - `purchase_order_updated` boolean
  - `service_entry_comment_added` boolean
  - `service_entry_created` boolean
  - `service_entry_deleted` boolean
  - `service_entry_updated` boolean
  - `submitted_inspection_form_created` boolean
  - `submitted_inspection_form_deleted` boolean
  - `url` string, required: *Must begin with http:// or https://
  - `user_created` boolean
  - `user_updated` boolean
  - `user_archived` boolean
  - `vehicle_archived` boolean
  - `vehicle_assigned` boolean
  - `vehicle_assignment_created` boolean
  - `vehicle_assignment_deleted` boolean
  - `vehicle_assignment_updated` boolean
  - `vehicle_comment_added` boolean
  - `vehicle_created` boolean
  - `vehicle_deleted` boolean
  - `vehicle_group_changed` boolean
  - `vehicle_status_changed` boolean
  - `vehicle_updated` boolean
  - `vendor_comment_added` boolean
  - `vendor_created` boolean
  - `vendor_deleted` boolean
  - `vendor_updated` boolean
  - `work_order_comment_added` boolean
  - `work_order_created` boolean
  - `work_order_deleted` boolean
  - `work_order_document_added` boolean
  - `work_order_status_changed` boolean
  - `work_order_updated` boolean

## Response `201`

OK

- Webhook: A Webhook
  - `id` integer
  - `created_at` string, date-time: The date and time at which this record was created.
  - `updated_at` string, date-time: The date and time at which this record was most recently updated.
  - `account_id` integer, required
  - `all_events` boolean: Indicates whether or not this Webhook should be triggered by all events.
  - `authorization` string, nullable: The authorization header to include in the request to the URL specified by `url`.
  - `description` string, nullable: A description of this Webhook.
  - `disabled_at` string, date-time, nullable: The date and time at which the Webhook was disabled.
  - `disabled_reason` string, nullable: The reason this Webhook was disabled. This field is only present if `disabled_at` is present.
  - `enabled` boolean: Indicates whether or not this Webhook is enabled. If `false`, the Webhook will not be triggered.
  - `failed_attempts` integer: The number of instances of this Webhook that have failed to be handled by the endpoint (after retries have been exhausted). If this number exceeds the value of `3`, the Webhook will be disabled.
  - `shared_key` string: The shared key to verify that incoming messages came from Fleetio.
  - `subscribed_events` object: The events that this Webhook is subscribed to. If `all_events` is `true`, this field will be ignored.
  - `url` string, uri, required: The URL to which this Webhook will send a POST request when triggered.

## Other responses

- `401`: Request could not be authenticated
- `403`: Insufficient permission to perform this operation
- `422`: Unprocessable Entity
- `500`: Something unexpected happened

## Changes

- **2026-02-13** `1172c0b6ab85`: 1 info
  - added the new optional request property `work_order_document_added`

[Operation history](https://skmtc.dev/fleetio/apis/fleetio-developer-api/changes/webhooks/post.md)

---

[API](https://skmtc.dev/fleetio/apis/fleetio-developer-api.md) - [All operations](https://skmtc.dev/fleetio/apis/fleetio-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fleetio/apis/fleetio-developer-api/revisions/49558d744bd7?raw)
