---
title: "Create a new Opsgenie account"
method: POST
path: "/api/v2/integration/opsgenie/accounts"
tags: ["Opsgenie Integration"]
---

# Create a new Opsgenie account

`POST /api/v2/integration/opsgenie/accounts`

## Request

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

Create a new Opsgenie account in the Datadog Opsgenie integration.

## Request body

- OpsgenieAccountCreateRequest: Create request for an Opsgenie account.
  - `data` OpsgenieAccountCreateData, required: Opsgenie account data for a create request.
    - `attributes` OpsgenieAccountCreateAttributes, required: The Opsgenie account attributes for a create request.
      - `api_key` string, required: The Opsgenie API key for your Opsgenie account.
      - `region` 'us' | 'eu' | 'custom', required: The region for the Opsgenie service.
    - `type` 'opsgenie-account', required: Opsgenie account resource type.

## Response `201`

CREATED

- 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
- `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)
