---
title: "Post an event"
method: POST
path: "/api/v2/events"
tags: ["Events"]
---

# Post an event

`POST /api/v2/events`

This endpoint allows you to publish events.

**Note:** To utilize this endpoint with our client libraries, please ensure you are using the latest version released on or after July 1, 2025. Earlier versions do not support this functionality.

**Important:** Upgrade to the latest client library version to use the updated endpoint at `https://event-management-intake.{site}/api/v2/events`. Older client library versions of the Post an event (v2) API send requests to a deprecated endpoint (`https://api.{site}/api/v2/events`).

✅ **Only events with the `change` or `alert` category** are in General Availability. For change events, see [Change Tracking](https://docs.datadoghq.com/change_tracking) for more details.

❌ For use cases involving other event categories, use the V1 endpoint or reach out to [support](https://www.datadoghq.com/support/).

## Request body

- EventCreateRequestPayload — Payload for creating an event.
  - `data` EventCreateRequest, required — An event object.
    - `attributes` EventPayload, required — Event attributes.
      - `aggregation_key` string — A string used for aggregation when [correlating](https://docs.datadoghq.com/service_management/events/correlation/) events. If you specify a key, events are deduplicated to alerts based on this key. Limited to 100 characters.
      - `attributes` union, required — JSON object for category-specific attributes. Schema is different per event category.
        - ChangeEventCustomAttributes — Change event attributes.
          - `author` ChangeEventCustomAttributesAuthor — The entity that made the change. Optional, if provided it must include `type` and `name`.
            - `name` string, required — The name of the user or system that made the change. Limited to 128 characters.
            - `type` 'user' | 'system' | 'api' | 'automation', required — Author's type.
          - `change_metadata` object — Free form JSON object with information related to the `change` event. Supports up to 100 properties per object and a maximum nesting depth of 10 levels.
          - `changed_resource` ChangeEventCustomAttributesChangedResource, required — A uniquely identified resource.
            - `name` string, required — The name of the resource that was changed. Limited to 128 characters. Must contain at least one non-whitespace character.
            - `type` 'feature_flag' | 'configuration', required — The type of the resource that was changed.
          - `impacted_resources` ChangeEventCustomAttributesImpactedResourcesItems[] — A list of resources impacted by this change. It is recommended to provide an impacted resource to display the change event at the correct location. Only resources of type `service` are supported. Maximum of 100 impacted resources allowed.
            - `name` string, required — The name of the impacted resource. Limited to 128 characters.
            - `type` 'service', required — The type of the impacted resource.
          - `new_value` object — Free form JSON object representing the new state of the changed resource.
          - `prev_value` object — Free form JSON object representing the previous state of the changed resource.
        - AlertEventCustomAttributes — Alert event attributes.
          - `custom` AlertEventCustomAttributesCustom — Free form JSON object for arbitrary data. Supports up to 100 properties per object and a maximum nesting depth of 10 levels.
          - `links` AlertEventCustomAttributesLinksItems[] — The links related to the event. Maximum of 20 links allowed.
            - `category` 'runbook' | 'documentation' | 'dashboard' | 'resource', required — The category of the link.
            - `title` string — The display text of the link. Limited to 300 characters.
            - `url` string, required — The URL of the link. Limited to 2048 characters.
          - `priority` '1' | '2' | '3' | '4' | '5' — The priority of the alert.
          - `status` 'warn' | 'error' | 'ok', required — The status of the alert.
      - `category` 'change' | 'alert', required — Event category identifying the type of event.
      - `host` string — Host name to associate with the event. Any tags associated with the host are also applied to this event. Limited to 255 characters.
      - `integration_id` 'custom-events' — Integration ID sourced from integration manifests.
      - `message` string — Free formed text associated with the event. It's suggested to use `data.attributes.attributes.custom` for well-structured attributes. Limited to 4000 characters.
      - `tags` string[] — A list of tags associated with the event. Maximum of 100 tags allowed. Refer to [Tags docs](https://docs.datadoghq.com/getting_started/tagging/).
      - `timestamp` string — Timestamp when the event occurred. Must follow [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. For example `"2017-01-15T01:30:15.010000Z"`. Defaults to the timestamp of receipt. Limited to values no older than 18 hours.
      - `title` string, required — The title of the event. Limited to 500 characters.
    - `type` 'event', required — Entity type.

## Response `202`

OK

- EventCreateResponsePayload — Event creation response.
  - `data` EventCreateResponse — Event object.
    - `attributes` EventCreateResponseAttributes — Event attributes.
      - `attributes` EventCreateResponseAttributesAttributes — JSON object for category-specific attributes.
        - `evt` EventCreateResponseAttributesAttributesEvt — JSON object of event system attributes.
          - `id` string — Event identifier. This field is deprecated and will be removed in a future version. Use the `uid` field instead.
          - `uid` string — A unique identifier for the event. You can use this identifier to query or reference the event.
    - `type` string — Entity type.
  - `links` EventCreateResponsePayloadLinks — Links to the event.
    - `self` string — The URL of the event. This link is only functional when using the default subdomain.

## Other responses

- `400` — Bad request
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
