---
title: Edit maintenance update
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Status Pages
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Edit maintenance update{% #edit-maintenance-update %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------------------------------------ |
| ap1.datadoghq.com | PATCH https://api.ap1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id} |
| ap2.datadoghq.com | PATCH https://api.ap2.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id} |
| app.datadoghq.eu  | PATCH https://api.datadoghq.eu/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}      |
| app.ddog-gov.com  | PATCH https://api.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}      |
| us2.ddog-gov.com  | PATCH https://api.us2.ddog-gov.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}  |
| uk1.datadoghq.com | PATCH https://api.uk1.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id} |
| app.datadoghq.com | PATCH https://api.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id}     |
| us3.datadoghq.com | PATCH https://api.us3.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id} |
| us5.datadoghq.com | PATCH https://api.us5.datadoghq.com/api/v2/statuspages/{page_id}/maintenances/{maintenance_id}/updates/{update_id} |

### Overview

Edits the message of a specific maintenance update. Editing is allowed regardless of the parent maintenance's status, including completed and canceled maintenances. This endpoint requires the `status_pages_incident_write` permission.

OAuth apps require the `status_pages_incident_write` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#status-pages) to access this endpoint.



### Arguments

#### Path Parameters

| Name                             | Type   | Description                       |
| -------------------------------- | ------ | --------------------------------- |
| page_id [*required*]        | string | The ID of the status page.        |
| maintenance_id [*required*] | string | The ID of the maintenance.        |
| update_id [*required*]      | string | The ID of the maintenance update. |

### Request

#### Body Data (required)



{% tab title="Model" %}

| Parent field | Field                  | Type   | Description                                                                          |
| ------------ | ---------------------- | ------ | ------------------------------------------------------------------------------------ |
|              | data                   | object | The data object for editing a maintenance update.                                    |
| data         | attributes             | object | Attributes for editing a maintenance update.                                         |
| attributes   | description            | string | The message body of the update.                                                      |
| data         | id [*required*]   | string | The ID of the maintenance update to edit. Must match the `update_id` path parameter. |
| data         | type [*required*] | enum   | Maintenance updates resource type. Allowed enum values: `maintenance_updates`        |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "description": ""
    },
    "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
    "type": "maintenance_updates"
  }
}
```

{% /tab %}

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response object for a maintenance update.

| Parent field          | Field                    | Type      | Description                                                                                           |
| --------------------- | ------------------------ | --------- | ----------------------------------------------------------------------------------------------------- |
|                       | data                     | object    | The data object for a maintenance update.                                                             |
| data                  | attributes               | object    | Attributes of a maintenance update resource.                                                          |
| attributes            | components_affected      | [object]  | Components affected at the time of the update.                                                        |
| components_affected   | id [*required*]     | uuid      | The ID of the component. Must be a component of type `component`.                                     |
| components_affected   | name                     | string    | The name of the component.                                                                            |
| components_affected   | status [*required*] | enum      | The status of the component. Allowed enum values: `operational,maintenance`                           |
| attributes            | created_at               | date-time | The date and time the update was created.                                                             |
| attributes            | description              | string    | The message body of the update.                                                                       |
| attributes            | manual_transition        | boolean   | Whether the update was applied manually by a user (true) or automatically by the system (false).      |
| attributes            | modified_at              | date-time | The date and time the update was last modified.                                                       |
| attributes            | started_at               | date-time | The date and time the update started.                                                                 |
| attributes            | status                   | enum      | The status of the maintenance update. Allowed enum values: `scheduled,in_progress,completed,canceled` |
| data                  | id [*required*]     | uuid      | The ID of the maintenance update.                                                                     |
| data                  | relationships            | object    | Relationships of a maintenance update resource.                                                       |
| relationships         | created_by_user          | object    | A user relationship of a maintenance update.                                                          |
| created_by_user       | data [*required*]   | object    | The data object identifying a Datadog user linked to a maintenance update.                            |
| data                  | id [*required*]     | uuid      | The ID of the Datadog user.                                                                           |
| data                  | type [*required*]   | enum      | Users resource type. Allowed enum values: `users`                                                     |
| relationships         | last_modified_by_user    | object    | A user relationship of a maintenance update.                                                          |
| last_modified_by_user | data [*required*]   | object    | The data object identifying a Datadog user linked to a maintenance update.                            |
| data                  | id [*required*]     | uuid      | The ID of the Datadog user.                                                                           |
| data                  | type [*required*]   | enum      | Users resource type. Allowed enum values: `users`                                                     |
| relationships         | maintenance              | object    | The parent maintenance of the update.                                                                 |
| maintenance           | data [*required*]   | object    | The maintenance linked to a maintenance update.                                                       |
| data                  | id [*required*]     | uuid      | The ID of the maintenance.                                                                            |
| data                  | type [*required*]   | enum      | Maintenances resource type. Allowed enum values: `maintenances`                                       |
| data                  | type [*required*]   | enum      | Maintenance updates resource type. Allowed enum values: `maintenance_updates`                         |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": {
    "attributes": {
      "components_affected": [
        {
          "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
          "name": "string",
          "status": "operational"
        }
      ],
      "created_at": "2019-09-19T10:00:00.000Z",
      "description": "string",
      "manual_transition": false,
      "modified_at": "2019-09-19T10:00:00.000Z",
      "started_at": "2019-09-19T10:00:00.000Z",
      "status": "string"
    },
    "id": "1234abcd-12ab-34cd-56ef-123456abcdef",
    "relationships": {
      "created_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      },
      "last_modified_by_user": {
        "data": {
          "id": "",
          "type": "users"
        }
      },
      "maintenance": {
        "data": {
          "id": "",
          "type": "maintenances"
        }
      }
    },
    "type": "maintenance_updates"
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \## default
# 
 \# Path parameters export page_id="CHANGE_ME" export maintenance_id="CHANGE_ME" export update_id="CHANGE_ME" \# Curl command curl -X PATCH "https://api.datadoghq.com/api/v2/statuspages/${page_id}/maintenances/${maintenance_id}/updates/${update_id}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF
{
  "data": {
    "attributes": {
      "description": "We have completed maintenance on the API to improve performance."
    },
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "maintenance_updates"
  }
}
EOF 
                
##### 

```python
"""
Edit maintenance update returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.status_pages_api import StatusPagesApi
from datadog_api_client.v2.model.patch_maintenance_update_request import PatchMaintenanceUpdateRequest
from datadog_api_client.v2.model.patch_maintenance_update_request_data import PatchMaintenanceUpdateRequestData
from datadog_api_client.v2.model.patch_maintenance_update_request_data_attributes import (
    PatchMaintenanceUpdateRequestDataAttributes,
)
from datadog_api_client.v2.model.patch_maintenance_update_request_data_type import PatchMaintenanceUpdateRequestDataType
from uuid import UUID

body = PatchMaintenanceUpdateRequest(
    data=PatchMaintenanceUpdateRequestData(
        attributes=PatchMaintenanceUpdateRequestDataAttributes(
            description="We have completed maintenance on the API to improve performance.",
        ),
        id="00000000-0000-0000-0000-000000000000",
        type=PatchMaintenanceUpdateRequestDataType.MAINTENANCE_UPDATES,
    ),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = StatusPagesApi(api_client)
    response = api_instance.patch_maintenance_update(
        page_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
        maintenance_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
        update_id=UUID("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
        body=body,
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```ruby
# Edit maintenance update returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::StatusPagesAPI.new

body = DatadogAPIClient::V2::PatchMaintenanceUpdateRequest.new({
  data: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestData.new({
    attributes: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestDataAttributes.new({
      description: "We have completed maintenance on the API to improve performance.",
    }),
    id: "00000000-0000-0000-0000-000000000000",
    type: DatadogAPIClient::V2::PatchMaintenanceUpdateRequestDataType::MAINTENANCE_UPDATES,
  }),
})
p api_instance.patch_maintenance_update("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", body)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```go
// Edit maintenance update returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
	"github.com/google/uuid"
)

func main() {
	body := datadogV2.PatchMaintenanceUpdateRequest{
		Data: &datadogV2.PatchMaintenanceUpdateRequestData{
			Attributes: &datadogV2.PatchMaintenanceUpdateRequestDataAttributes{
				Description: datadog.PtrString("We have completed maintenance on the API to improve performance."),
			},
			Id:   "00000000-0000-0000-0000-000000000000",
			Type: datadogV2.PATCHMAINTENANCEUPDATEREQUESTDATATYPE_MAINTENANCE_UPDATES,
		},
	}
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewStatusPagesApi(apiClient)
	resp, r, err := api.PatchMaintenanceUpdate(ctx, uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), uuid.MustParse("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"), body)

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `StatusPagesApi.PatchMaintenanceUpdate`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `StatusPagesApi.PatchMaintenanceUpdate`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// Edit maintenance update returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.StatusPagesApi;
import com.datadog.api.client.v2.model.MaintenanceUpdate;
import com.datadog.api.client.v2.model.PatchMaintenanceUpdateRequest;
import com.datadog.api.client.v2.model.PatchMaintenanceUpdateRequestData;
import com.datadog.api.client.v2.model.PatchMaintenanceUpdateRequestDataAttributes;
import com.datadog.api.client.v2.model.PatchMaintenanceUpdateRequestDataType;
import java.util.UUID;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    StatusPagesApi apiInstance = new StatusPagesApi(defaultClient);

    PatchMaintenanceUpdateRequest body =
        new PatchMaintenanceUpdateRequest()
            .data(
                new PatchMaintenanceUpdateRequestData()
                    .attributes(
                        new PatchMaintenanceUpdateRequestDataAttributes()
                            .description(
                                "We have completed maintenance on the API to improve performance."))
                    .id("00000000-0000-0000-0000-000000000000")
                    .type(PatchMaintenanceUpdateRequestDataType.MAINTENANCE_UPDATES));

    try {
      MaintenanceUpdate result =
          apiInstance.patchMaintenanceUpdate(
              UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
              UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
              UUID.fromString("9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d"),
              body);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling StatusPagesApi#patchMaintenanceUpdate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// Edit maintenance update returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_status_pages::StatusPagesAPI;
use datadog_api_client::datadogV2::model::PatchMaintenanceUpdateRequest;
use datadog_api_client::datadogV2::model::PatchMaintenanceUpdateRequestData;
use datadog_api_client::datadogV2::model::PatchMaintenanceUpdateRequestDataAttributes;
use datadog_api_client::datadogV2::model::PatchMaintenanceUpdateRequestDataType;
use uuid::Uuid;

#[tokio::main]
async fn main() {
    let body = PatchMaintenanceUpdateRequest::new().data(
        PatchMaintenanceUpdateRequestData::new(
            "00000000-0000-0000-0000-000000000000".to_string(),
            PatchMaintenanceUpdateRequestDataType::MAINTENANCE_UPDATES,
        )
        .attributes(
            PatchMaintenanceUpdateRequestDataAttributes::new().description(
                "We have completed maintenance on the API to improve performance.".to_string(),
            ),
        ),
    );
    let configuration = datadog::Configuration::new();
    let api = StatusPagesAPI::with_config(configuration);
    let resp = api
        .patch_maintenance_update(
            Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
            Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
            Uuid::parse_str("00000000-0000-0000-0000-000000000000").expect("invalid UUID"),
            body,
        )
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * Edit maintenance update returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.StatusPagesApi(configuration);

const params: v2.StatusPagesApiPatchMaintenanceUpdateRequest = {
  body: {
    data: {
      attributes: {
        description:
          "We have completed maintenance on the API to improve performance.",
      },
      id: "00000000-0000-0000-0000-000000000000",
      type: "maintenance_updates",
    },
  },
  pageId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  maintenanceId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  updateId: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
};

apiInstance
  .patchMaintenanceUpdate(params)
  .then((data: v2.MaintenanceUpdate) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
