---
title: "Get a secret key"
method: GET
path: "/secret-keys/{keyId}"
tags: ["Secret Keys"]
---

# Get a secret key

`GET /secret-keys/{keyId}`

## Request

- Base URL: `https://api.sazabi.com/v1`
- URL: `https://api.sazabi.com/v1/secret-keys/{keyId}`
- Auth: none declared

Get one secret key within the organization.

## Path parameters

- `keyId` string, uuid, required: Key ID to fetch.

## Query parameters

- `organizationId` string: Organization whose keys the operation targets. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).

## Response `200`

OK

- object
  - `secretKey` object, required
    - `id` string, uuid, required
    - `name` string, required
    - `expiresAt` string, date-time, nullable, required
    - `lastUsedAt` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `projectId` string, uuid, nullable, required

---

[API](https://skmtc.dev/sazabi/apis/sazabi-public-api.md) - [All operations](https://skmtc.dev/sazabi/apis/sazabi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sazabi/apis/sazabi-public-api/revisions/965b6230cf45?raw)
