---
updatedAt: 2026-04-21T00:22:01.000Z
agentTools:
  projectIndex: https://developer.servicem8.com/llms.txt
---

# Create or Update an Event Webhook Subscription

Subscribe to business events (e.g., job.created, job.completed). When the specified event occurs, a webhook will be sent to your callback URL with detailed event data.

Your callback URL must return a successful `2xx` response within 10 seconds. Requests that take longer than 10 seconds are treated as timeouts. Repeated failed deliveries, including repeated timeouts, can cause the subscription to be automatically deactivated.

<Callout icon="📘" theme="info">
  Webhook Events are new to the API, and will be rolling out to all accounts slowly by the 18th September.
</Callout>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Webhooks API",
    "description": "API for managing webhook subscriptions. This specification includes 25 dynamically registered webhook events.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.servicem8.com"
    }
  ],
  "paths": {
    "/webhook_subscriptions/event": {
      "post": {
        "operationId": "post_event_webhook_subscription",
        "tags": [
          "Webhook Subscription"
        ],
        "summary": "Create or Update an Event Webhook Subscription",
        "description": "Subscribe to business events (e.g., job.created, job.completed). When the specified event occurs, a webhook will be sent to your callback URL with detailed event data.\n\nYour callback URL must return a successful `2xx` response within 10 seconds. Requests that take longer than 10 seconds are treated as timeouts. Repeated failed deliveries, including repeated timeouts, can cause the subscription to be automatically deactivated.",
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "$ref": "#/components/schemas/CreateEventWebhookRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                },
                "examples": {
                  "success": {
                    "value": {
                      "success": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Result"
                },
                "examples": {
                  "error": {
                    "value": {
                      "success": false,
                      "message": "Event unknown.event does not exist"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CreateEventWebhookRequest": {
        "type": "object",
        "required": [
          "event",
          "callback_url"
        ],
        "properties": {
          "event": {
            "type": "string",
            "description": "Supported events:\n- `company.created`: New customer added\n- `company.updated`: Customer details updated\n- `form.response_created`: Form response submitted\n- `inbox.message_received`: New message received in inbox\n- `job.badge_added`: Badge added to job\n- `job.badge_removed`: Badge removed from job\n- `job.checked_in`: Staff member arrived at job site\n- `job.checked_out`: Staff member left job site\n- `job.completed`: Job marked as completed\n- `job.created`: New job created in the system\n- `job.invoice_paid`: Full payment received for invoice\n- `job.invoice_sent`: Invoice sent to customer\n- `job.note_added`: Note added to job\n- `job.photo_added`: Photo attached to job\n- `job.queued`: Job added to queue\n- `job.quote_accepted`: Customer accepted the quote\n- `job.quote_sent`: Quote sent to customer\n- `job.review_received`: Customer review submitted\n- `job.status_changed`: Job status changed\n- `job.updated`: Job details modified\n- `job.video_added`: Video attached to job\n- `proposal.sent`: Proposal sent to customer\n- `proposal.viewed`: Proposal viewed by customer\n- `staff.clocked_off`: Staff member ended shift\n- `staff.clocked_on`: Staff member started shift\n",
            "enum": [
              "company.created",
              "company.updated",
              "form.response_created",
              "inbox.message_received",
              "job.badge_added",
              "job.badge_removed",
              "job.checked_in",
              "job.checked_out",
              "job.completed",
              "job.created",
              "job.invoice_paid",
              "job.invoice_sent",
              "job.note_added",
              "job.photo_added",
              "job.queued",
              "job.quote_accepted",
              "job.quote_sent",
              "job.review_received",
              "job.status_changed",
              "job.updated",
              "job.video_added",
              "proposal.sent",
              "proposal.viewed",
              "staff.clocked_off",
              "staff.clocked_on"
            ]
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "description": "The URL on your server that will receive webhooks when the event occurs. This endpoint must return a successful `2xx` response within 10 seconds."
          },
          "unique_id": {
            "type": "string",
            "description": "Optional unique identifier for grouping subscriptions.",
            "maxLength": 100
          }
        },
        "description": "Create or update an event-based webhook subscription. Your callback URL must return a successful `2xx` response within 10 seconds, otherwise the delivery is treated as a timeout. Repeated failed deliveries, including repeated timeouts, can cause the subscription to be automatically deactivated."
      },
      "Result": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "description": "Indicates whether the operation succeeded"
          },
          "message": {
            "type": "string",
            "description": "If the operation did not succeed, this property will contain a description of the error."
          },
          "detail": {
            "type": "string",
            "description": "Additional error detail when available."
          },
          "errorCode": {
            "type": "integer",
            "description": "Optional error code for non-success responses."
          }
        }
      }
    }
  }
}
```