---
title: "Create Vault"
method: POST
path: "/v1/event-gateways/{gatewayId}/vaults"
tags: ["Event Gateway Vaults"]
---

# Create Vault

`POST /v1/event-gateways/{gatewayId}/vaults`

Creates a new vault associated with the specified Event Gateway.

## Request body

- union — The typed schema of the vault to modify it.
  - EventGatewayEnvVault — An environment vault.
    - `name` string, required — The name of the vault.
    - `type` 'env', required — The type of the vault.
    - `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.
    - `description` string — A human-readable description of the vault.
    - `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 "_".
    - `config` object, required — The configuration of the environment vault.
      - `prefix` string, required — The optional prefix for environment variables.
  - EventGatewayKonnectVault — A konnect vault.
    - `name` string, required — The name of the vault.
    - `type` 'konnect', required — The type of the vault.
    - `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.
    - `description` string — A human-readable description of the vault.
    - `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 "_".

## Response `201`

Created

- union
  - object — An environment vault.
    - `id` string, uuid, required — The unique identifier of the vault.
    - `name` string, required — The name of the vault.
    - `type` 'env', required — The type of the vault.
    - `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.
    - `description` string — A human-readable description of the vault.
    - `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 "_".
    - `config` object, required — The configuration of the environment vault.
      - `prefix` string, required — The optional prefix for environment variables.
  - object — A konnect vault.
    - `id` string, uuid, required — The unique identifier of the vault.
    - `name` string, required — The name of the vault.
    - `type` 'konnect', required — The type of the vault.
    - `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.
    - `description` string — A human-readable description of the vault.
    - `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 "_".

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

## Changes

- **2026-02-16** `106b373707f3` — 4 info
  - the `description` request property default value `` was added
  - the `description` request property default value `` was added
  - the `description` response's property default value `` was added for the status `201`
  - the `description` response's property default value `` was added for the status `201`
- **2025-12-19** `0325d14dfc53` — 2 breaking, 3 info
  - added `#/components/schemas/EventGatewayEnvVault, #/components/schemas/EventGatewayKonnectVault` to the response body `oneOf` list for the response status `201`
  - the response's body type/format changed from ``/`` to `object`/`` for status `201`
  - removed `subschema #1, subschema #2` from the response body `allOf` list for the response status `201`
  - added response discriminator for the response status `201`
  - …1 more
- **2025-11-06** `5d2b35832e3f` — 1 warning, 1 info
  - added the new `type` enum value to the `allOf[subschema #2]/invalid_parameters/items/oneOf[#/components/schemas/InvalidParameterStandard]/rule` response property for the response status `400`
  - added discriminator to `allOf[subschema #2]/` response property for the response status `201`
- …earlier changes not shown

[Full history](https://skmtc.dev/kong/apis/konnect-api-beta/changes/v1/event-gateways/:gatewayId/vaults/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)
