---
title: "Create a New Static Key"
method: POST
path: "/v1/event-gateways/{gatewayId}/static-keys"
tags: ["Event Gateway Static Keys"]
---

# Create a New Static Key

`POST /v1/event-gateways/{gatewayId}/static-keys`

Create new static key to this event gateway.

## Request body

- EventGatewayStaticKeyCreate — A symmetric key with its secret value for creation.
  - `name` string, required — The unique name of the static key.
  - `description` string — A human-readable description of the static key.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `value` string, required — A sensitive value containing the secret or a reference to a secret as a template string expression. If the value is provided as plain text, it is encrypted at rest and omitted from API responses. If provided as an expression, the expression itself is stored and returned by the API.

## Response `201`

Created

- EventGatewayStaticKey — A symmetric key with its secret value.
  - `name` string, required — The unique name of the static key.
  - `description` string — A human-readable description of the static key.
  - `labels` Labels — Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types. Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_".
  - `id` string, uuid, required — The unique identifier of the static key.
  - `value` string — A sensitive value containing the secret or a reference to a secret as a template string expression. If the value is provided as plain text, it is encrypted at rest and omitted from API responses. If provided as an expression, the expression itself is stored and returned by the API.
  - `created_at` string, date-time, required — An ISO-8601 timestamp representation of entity creation date.
  - `updated_at` string, date-time, required — An ISO-8601 timestamp representation of entity update date.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

## Changes

- **2026-02-16** `106b373707f3` — 1 breaking, 2 info
  - the `value` request property's minLength was increased from `0` to `1`
  - the `description` request property default value `` was added
  - the `description` response's property default value `` was added for the status `201`
- **2025-12-19** `0325d14dfc53` — 4 breaking, 1 warning, 10 info
  - added the new required request property `name`
  - added the new required request property `value`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `201`
  - …11 more
- **2025-11-06** `5d2b35832e3f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/kong/apis/konnect-api-beta/changes/v1/event-gateways/:gatewayId/static-keys/post.md)

---

[API](https://skmtc.dev/kong/apis/konnect-api-beta.md) · [All operations](https://skmtc.dev/kong/apis/konnect-api-beta/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kong/konnect-api-beta/revisions/cef0f947e9c9/schema)
