---
title: "POST /v1beta/{+parent}/keyEvents"
method: POST
path: "/v1beta/{+parent}/keyEvents"
tags: ["properties"]
---

# POST /v1beta/{+parent}/keyEvents

`POST /v1beta/{+parent}/keyEvents`

Creates a Key Event.

## Path parameters

- `parent` string, required

## Request body

- GoogleAnalyticsAdminV1betaKeyEvent — A key event in a Google Analytics property.
  - `eventName` string — Immutable. The event name for this key event. Examples: 'click', 'purchase'
  - `defaultValue` GoogleAnalyticsAdminV1betaKeyEventDefaultValue — Defines a default value/currency for a key event.
    - `numericValue` number, double — Required. This will be used to populate the "value" parameter for all occurrences of this Key Event (specified by event_name) where that parameter is unset.
    - `currencyCode` string — Required. When an occurrence of this Key Event (specified by event_name) has no set currency this currency will be applied as the default. Must be in ISO 4217 currency code format. See https://en.wikipedia.org/wiki/ISO_4217 for more information.
  - `countingMethod` 'COUNTING_METHOD_UNSPECIFIED' | 'ONCE_PER_EVENT' | 'ONCE_PER_SESSION' — Required. The method by which Key Events will be counted across multiple events within a session.
  - `name` string — Output only. Resource name of this key event. Format: properties/{property}/keyEvents/{key_event}
  - `createTime` string, google-datetime — Output only. Time when this key event was created in the property.
  - `deletable` boolean — Output only. If set to true, this event can be deleted.
  - `custom` boolean — Output only. If set to true, this key event refers to a custom event. If set to false, this key event refers to a default event in GA. Default events typically have special meaning in GA. Default events are usually created for you by the GA system, but in some cases can be created by property admins. Custom events count towards the maximum number of custom key events that may be created per property.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/analyticsadmin.md) · [All operations](https://skmtc.net/google/apis/analyticsadmin/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/analyticsadmin/versions/ec5f6df9b9a2/schema)
