---
title: "Create a new key"
method: POST
path: "/v1/config/keys"
tags: ["Keys"]
---

# Create a new key

`POST /v1/config/keys`

Create a new key of the type specified by the `type` parameter. If a name is not supplied, one will be auto generated.

## Query parameters

- `type` 'ingestion' | 'service' | 'all', required

## Request body

- KeysPut
  - `name` string — A user friendly name for the key

## Response `200`

A new key was created successfully! The entire key resource is returned.

- KeyResource
  - `id` string — The ID of the key
  - `key` string — A secret key which can be used to authenticate requests to Mezmo.
  - `name` string — A user friendly name for the key
  - `type` 'ingestion' | 'service' — The type of the key
  - `created` integer — The time the key was created as a Unix timestamp in milliseconds

## Other responses

- `400` — The supplied request is invalid or malformed.

---

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