---
title: "Create a new API key in a workspace."
method: POST
path: "/workspaces/{workspaceId}/api-keys"
---

# Create a new API key in a workspace.

`POST /workspaces/{workspaceId}/api-keys`

Create a new API key in a workspace.

## Path parameters

- `workspaceId` string, uuid, required

## Request body

- object

## Response `201`

Status Created.

- ApiKey
  - `id` string, uuid, required — The API key id.
  - `name` string, nullable — The API key name.
  - `dateCreated` string, date-time, required — The API key creation date.
  - `dateUpdated` string, date-time, required — The API key last update date.
  - `dateLastUsed` string, date-time, nullable, required — The API key last use date.
  - `secureKey` string, required — The API key value.

---

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