---
title: "POST /v1/projects/{projectId}/apikeys"
method: POST
path: "/v1/projects/{projectId}/apikeys"
tags: ["API Keys"]
---

# POST /v1/projects/{projectId}/apikeys

`POST /v1/projects/{projectId}/apikeys`

## Path parameters

- `projectId` string, required

## Request body

- GoliothAPIKeysCreateBody
  - `keyTags` string[]
  - `name` string
  - `type` 'API_KEY' | 'JWT_KEY' | 'API_KEY_V2'

## Response `200`

A successful response.

- GoliothCreateAPIKeyResponse
  - `data` GoliothAPIKey
    - `createdAt` string, date-time
    - `id` string
    - `key` string
    - `keyTags` string[]
    - `name` string
    - `policyId` string
    - `roles` string[]
    - `secret` string
    - `type` 'API_KEY' | 'JWT_KEY' | 'API_KEY_V2'

## Other responses

- `default` — An unexpected error response.

---

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