---
title: "Dashboard create key"
method: POST
path: "/v1/dashboard/keys"
tags: ["Dashboard Browser API"]
---

# Dashboard create key

`POST /v1/dashboard/keys`

## Request

- Base URL: `https://getsocialclaw.com`
- URL: `https://getsocialclaw.com/v1/dashboard/keys`
- Auth: API key in cookie `socialclaw_dash_session`

Creates a workspace API key from the dashboard.

## Request body

- KeyCreateRequest: Creates an API key.
  - `label` string, nullable: Optional label.
  - `kind` string, nullable: Dashboard-only key kind.

## Response `201`

Successful response.

- KeyCreateResponse: API key creation response.
  - `ok` unknown, required
  - `key` ApiKey: API key metadata. Secret values are only returned when a key is created or shown in the dashboard key API.
    - `id` string, required: API key id, for example key_abc123.
    - `prefix` string, nullable: Public prefix used to identify the key without exposing the secret.
    - `label` string, nullable: Optional human label.
    - `kind` string, nullable: Key kind, such as personal or agent.
    - `secret` string, nullable: Raw key secret. Only present at creation or in dashboard key listings.
    - `createdAt` string, date-time, nullable: Creation time.
    - `revokedAt` string, date-time, nullable: Revocation time.
    - `lastUsedAt` string, date-time, nullable: Last successful API authentication time.
  - `apiKey` ApiKey: API key metadata. Secret values are only returned when a key is created or shown in the dashboard key API.
    - `id` string, required: API key id, for example key_abc123.
    - `prefix` string, nullable: Public prefix used to identify the key without exposing the secret.
    - `label` string, nullable: Optional human label.
    - `kind` string, nullable: Key kind, such as personal or agent.
    - `secret` string, nullable: Raw key secret. Only present at creation or in dashboard key listings.
    - `createdAt` string, date-time, nullable: Creation time.
    - `revokedAt` string, date-time, nullable: Revocation time.
    - `lastUsedAt` string, date-time, nullable: Last successful API authentication time.
  - `secret` string, nullable: Raw secret when returned as a top-level value.

## Other responses

- `400`: Invalid request.
- `401`: Missing, invalid, or unauthorized credentials.
- `404`: Requested resource was not found.
- `422`: Request body or semantic validation failed.

---

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