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

# Create a new service object

`POST /api/v2/integration/opsgenie/services`

## Request

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

Create a new service object in the Opsgenie integration.

## Request body

- OpsgenieServiceCreateRequest: Create request for an Opsgenie service.
  - `data` OpsgenieServiceCreateData, required: Opsgenie service data for a create request.
    - `attributes` OpsgenieServiceCreateAttributes, required: The Opsgenie service attributes for a create request.
      - `custom_url` string: The custom URL for a custom region.
      - `name` string, required: The name for the Opsgenie service.
      - `opsgenie_api_key` string, required: The Opsgenie API key for your Opsgenie service.
      - `region` 'us' | 'eu' | 'custom', required: The region for the Opsgenie service.
    - `type` 'opsgenie-service', required: Opsgenie service resource type.

## Response `201`

CREATED

- OpsgenieServiceResponse: Response of an Opsgenie service.
  - `data` OpsgenieServiceResponseData, required: Opsgenie service data from a response.
    - `attributes` OpsgenieServiceResponseAttributes, required: The attributes from an Opsgenie service response.
      - `custom_url` string, nullable: The custom URL for a custom region.
      - `name` string: The name for the Opsgenie service.
      - `region` 'us' | 'eu' | 'custom': The region for the Opsgenie service.
    - `id` string, required: The ID of the Opsgenie service.
    - `type` 'opsgenie-service', required: Opsgenie service resource type.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `409`: Conflict
- `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)
