---
title: "Update an Opsgenie account"
method: PATCH
path: "/api/v2/integration/opsgenie/accounts/{account_id}"
tags: ["Opsgenie Integration"]
---

# Update an Opsgenie account

`PATCH /api/v2/integration/opsgenie/accounts/{account_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/integration/opsgenie/accounts/{account_id}`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Update a single Opsgenie account in the Datadog Opsgenie integration.

## Path parameters

- `account_id` string, required

## Request body

- OpsgenieAccountUpdateRequest: Update request for an Opsgenie account.
  - `data` OpsgenieAccountUpdateData, required: Opsgenie account data for an update request.
    - `attributes` OpsgenieAccountUpdateAttributes, required: The Opsgenie account attributes for an update request.
      - `api_key` string: The Opsgenie API key for your Opsgenie account.
      - `region` 'us' | 'eu' | 'custom': The region for the Opsgenie service.
    - `id` string, required: The ID of the Opsgenie account.
    - `type` 'opsgenie-account', required: Opsgenie account resource type.

## Response `200`

OK

- OpsgenieAccountResponse: Response containing an Opsgenie account.
  - `data` OpsgenieAccountResponseData, required: Opsgenie account data from a response.
    - `attributes` OpsgenieAccountResponseAttributes, required: The attributes from an Opsgenie account response.
      - `region` 'us' | 'eu' | 'custom': The region for the Opsgenie service.
    - `id` string, required: The ID of the Opsgenie account.
    - `type` 'opsgenie-account', required: Opsgenie account resource type.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `422`: The server cannot process the request because it contains invalid data.
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/da68bf029e4c?raw)
