> ## Documentation Index
> Fetch the complete documentation index at: https://docs.megaport.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance Webhook Events

> This help topic describes the maintenance webhook events.

export const Anchor = ({name}) => {
  const errorPrefix = '\x1b[31;1;4mERROR\x1b[0m: Anchor -';
  if (name === undefined || name === null || name === 'undefined') {
    console.error(`${errorPrefix} \`name\` must have a value — rendering an empty string instead`);
    return <></>;
  }
  const raw = typeof name === 'string' ? name : JSON.stringify(name);
  const id = raw.replace(/\s+/g, '-').replace(/[^A-Za-z0-9_-]/g, '').replace(/-+/g, '-').replace(/^-+|-+$/g, '');
  if (!id) {
    console.error(`${errorPrefix} \`name\` "${name}" sanitizes to an empty id — rendering an empty string instead`);
    return <></>;
  }
  return <a style={{
    scrollMarginTop: 'var(--scroll-mt)'
  }} id={id}></a>;
};

This topic describes the maintenance events sent by Megaport's webhooks.

<Anchor name="maintenance-cancelled" />

## maintenance.cancelled

`maintenance.cancelled` is sent when scheduled maintenance has been cancelled.

The payload of this event has the following structure:

* `company_uid` (string, UUID)
* `metadata` (object)
  * `environment` (string)
* `schema_version` (string)
* `timestamp` (string, date-time)
* `type` (string)
* `data` (object)
  * `cancel_reason` (string)
  * `company_uid` (string, UUID)
  * `maintenance_uid` (string, UUID)
  * `purpose` (string)
  * `service_uids` (array of string, UUID)
  * `window_end` (string, date-time)
  * `window_start` (string, date-time)

For example:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
  "metadata": {
    "environment": "production"
  },
  "schema_version": "1",
  "timestamp": "2026-04-23T10:29:12Z",
  "type": "maintenance.cancelled",
  "data": {
    "cancel_reason": "Cancelled at vendor request due to upstream change conflict.",
    "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
    "maintenance_uid": "5a2c1f3e-7b9d-4f6a-8c11-9e9b1234abcd",
    "purpose": "Software upgrade of MCR control plane.",
    "service_uids": [
      "3a8c0b2d-7f44-49ab-9a85-2bcd9e012345"
    ],
    "window_end": "2026-05-12T03:00:00Z",
    "window_start": "2026-05-12T01:00:00Z"
  }
}
```

<Anchor name="maintenance-completed" />

## maintenance.completed

`maintenance.completed` is sent when scheduled maintenance has been completed.

The payload of this event has the following structure:

* `company_uid` (string, UUID)
* `metadata` (object)
  * `environment` (string)
* `schema_version` (string)
* `timestamp` (string, date-time)
* `type` (string)
* `data` (object)
  * `company_uid` (string, UUID)
  * `maintenance_uid` (string, UUID)
  * `purpose` (string)
  * `service_uids` (array of string, UUID)
  * `window_end` (string, date-time)
  * `window_start` (string, date-time)

For example:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
  "metadata": {
    "environment": "production"
  },
  "schema_version": "1",
  "timestamp": "2026-04-23T10:29:12Z",
  "type": "maintenance.completed",
  "data": {
    "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
    "maintenance_uid": "5a2c1f3e-7b9d-4f6a-8c11-9e9b1234abcd",
    "purpose": "Software upgrade of MCR control plane.",
    "service_uids": [
      "3a8c0b2d-7f44-49ab-9a85-2bcd9e012345"
    ],
    "window_end": "2026-05-12T03:00:00Z",
    "window_start": "2026-05-12T01:00:00Z"
  }
}
```

<Anchor name="maintenance-failed" />

## maintenance.failed

`maintenance.failed` is sent when scheduled maintenance has failed.

The payload of this event has the following structure:

* `company_uid` (string, UUID)
* `metadata` (object)
  * `environment` (string)
* `schema_version` (string)
* `timestamp` (string, date-time)
* `type` (string)
* `data` (object)
  * `company_uid` (string, UUID)
  * `failure_reason` (string)
  * `maintenance_uid` (string, UUID)
  * `purpose` (string)
  * `service_uids` (array of string, UUID)
  * `window_end` (string, date-time)
  * `window_start` (string, date-time)

For example:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
  "metadata": {
    "environment": "production"
  },
  "schema_version": "1",
  "timestamp": "2026-04-23T10:29:12Z",
  "type": "maintenance.failed",
  "data": {
    "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
    "failure_reason": "Vendor cancelled the change window after the maintenance had already started.",
    "maintenance_uid": "0c2f6cf2-7c8b-4a2c-9ff4-2c3a0b8a1d1b",
    "purpose": "Replace faulty optic on edge router.",
    "service_uids": [
      "8a1c2d3e-4f5a-6b7c-8d9e-0f1a2b3c4d5e"
    ],
    "window_end": "2026-05-23T03:00:00Z",
    "window_start": "2026-05-23T01:00:00Z"
  }
}
```

<Anchor name="maintenance-rescheduled" />

## maintenance.rescheduled

`maintenance.rescheduled` is sent when a maintenance window is rescheduled.

The payload of this event has the following structure:

* `company_uid` (string, UUID)
* `metadata` (object)
  * `environment` (string)
* `schema_version` (string)
* `timestamp` (string, date-time)
* `type` (string)
* `data` (object)
  * `company_uid` (string, UUID)
  * `impact` (string)
  * `maintenance_uid` (string, UUID)
  * `message_to_customers` (string)
  * `previous_window_end` (string, date-time)
  * `previous_window_start` (string, date-time)
  * `purpose` (string)
  * `service_uids` (array of string, UUID)
  * `window_end` (string, date-time)
  * `window_start` (string, date-time)

For example:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
  "metadata": {
    "environment": "production"
  },
  "schema_version": "1",
  "timestamp": "2026-04-23T10:29:12Z",
  "type": "maintenance.rescheduled",
  "data": {
    "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
    "impact": "Customer services may experience a brief disconnect during the failover.",
    "maintenance_uid": "5a2c1f3e-7b9d-4f6a-8c11-9e9b1234abcd",
    "message_to_customers": "Window moved by two hours to accommodate a dependent change.",
    "previous_window_end": "2026-05-12T03:00:00Z",
    "previous_window_start": "2026-05-12T01:00:00Z",
    "purpose": "Software upgrade of MCR control plane.",
    "service_uids": [
      "3a8c0b2d-7f44-49ab-9a85-2bcd9e012345"
    ],
    "window_end": "2026-05-12T05:00:00Z",
    "window_start": "2026-05-12T03:00:00Z"
  }
}
```

<Anchor name="maintenance-scheduled" />

## maintenance.scheduled

`maintenance.scheduled` is sent when a maintenance window is scheduled.

The payload of this event has the following structure:

* `company_uid` (string, UUID)
* `metadata` (object)
  * `environment` (string)
* `schema_version` (string)
* `timestamp` (string, date-time)
* `type` (string)
* `data` (object)
  * `company_uid` (string, UUID)
  * `impact` (string)
  * `maintenance_uid` (string, UUID)
  * `purpose` (string)
  * `service_uids` (array of string, UUID)
  * `window_end` (string, date-time)
  * `window_start` (string, date-time)

For example:

```json theme={"theme":{"light":"github-light-high-contrast","dark":"github-dark-high-contrast"}}
{
  "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
  "metadata": {
    "environment": "production"
  },
  "schema_version": "1",
  "timestamp": "2026-04-23T10:29:12Z",
  "type": "maintenance.scheduled",
  "data": {
    "company_uid": "681ef39b-436b-40dd-a914-26391db2689c",
    "impact": "Customer services may experience a brief disconnect during the failover.",
    "maintenance_uid": "5a2c1f3e-7b9d-4f6a-8c11-9e9b1234abcd",
    "purpose": "Software upgrade of MCR control plane.",
    "service_uids": [
      "3a8c0b2d-7f44-49ab-9a85-2bcd9e012345"
    ],
    "window_end": "2026-05-12T03:00:00Z",
    "window_start": "2026-05-12T01:00:00Z"
  }
}
```
