---
title: "Validate API key"
method: POST
path: "/v1/keys/validate"
tags: ["Status and Authentication"]
---

# Validate API key

`POST /v1/keys/validate`

## Request

- Base URL: `https://getsocialclaw.com`
- URL: `https://getsocialclaw.com/v1/keys/validate`
- Auth: HTTP bearer

Checks the bearer token, returns the workspace, and updates last-used metadata.

## Response `200`

Successful response.

- KeyValidationResponse: Valid API key response.
  - `ok` unknown, required
  - `tenant` Tenant, required: Workspace visible to the authenticated API key or dashboard session.
    - `id` string, required: Workspace id.
    - `name` string, nullable: Workspace name.
    - `plan` string, nullable: Workspace plan.
    - `subscriptionStatus` string, nullable: Billing subscription status.
    - `entitlements` object, nullable: Plan capabilities and limits.
  - `apiKey` ApiKey, required: 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.

## 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)
