---
title: "POST /experimental/workspaces/{workspaceId}/api-keys"
method: POST
path: "/experimental/workspaces/{workspaceId}/api-keys"
tags: ["API Keys"]
---

# POST /experimental/workspaces/{workspaceId}/api-keys

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

Issues a new API key scoped to a workspace and a member role.

## Path parameters

- `workspaceId` string, uuid, required

## Headers

- `Authorization` string

## Request body

- object
  - `name` string, required
  - `role` union, required
    - 'owner'
    - 'manager'
    - 'publisher'
    - 'member'
    - 'consumer'
  - `expiryDate` string, date-time

## Response `201`

Default Response

- object
  - `links` object, required
    - `self` string, uri, required
  - `data` object, required
    - `id` string, required
    - `type` 'api-key', required
    - `attributes` object, required
      - `name` string, required
      - `value` string, required
      - `expiryDate` string, date-time, required
      - `createdAt` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `500` — Internal Server Error

## Changes

- **2026-09-15** `d50a02b79ad3` — 2 info
  - added the optional property `error/code` to the response with the `403` status
  - added the optional property `error/url` to the response with the `403` status

[Change history](https://skmtc.dev/tessl/apis/tessl-api/changes/experimental/workspaces/:workspaceId/api-keys/post.md)

---

[API](https://skmtc.dev/tessl/apis/tessl-api.md) · [All operations](https://skmtc.dev/tessl/apis/tessl-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tessl/apis/tessl-api/revisions/6da83f4191fc?raw)
