---
title: "Get a secret"
method: GET
path: "/v1/secrets/{secret_id}"
tags: ["Secrets"]
---

# Get a secret

`GET /v1/secrets/{secret_id}`

## Request

- Base URL: `https://api.dexto.ai`
- URL: `https://api.dexto.ai/v1/secrets/{secret_id}`
- Auth: HTTP bearer

Get a secret, without its value.

## Path parameters

- `secret_id` string, required

## Response `200`

Successful response.

- object
  - `created_at` string, date-time, required
  - `created_by` union, required: The API key that created the secret while it exists; otherwise the person, who may have used an OAuth token.
    - object
      - `api_key_id` string, uuid, nullable, required: Null once the key is deleted.
      - `type` 'api_key', required
    - object
      - `type` 'user', required
      - `user_id` string, required: The person who created it through an OAuth token, or whose key was since deleted.
  - `hint` string, nullable, required: The value's last four characters, when it has at least 20; otherwise null. Never the value.
  - `hosts` string[], required
  - `id` string, uuid, required
  - `last_used_at` string, date-time, nullable, required: When Dexto last attached the value to a request.
  - `name` string, required
  - `object` 'secret', required
  - `placement` union, required
    - object
      - `type` 'bearer', required
    - object
      - `name` string, required
      - `prefix` string
      - `type` 'header', required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Invalid JSON or request fields.
- `401`: Missing or invalid API key.
- `402`: The account has insufficient credits.
- `403`: The account cannot perform this operation.
- `404`: The requested resource was not found.
- `409`: The request conflicts with existing resource state.
- `429`: The account exceeded this operation's request rate.
- `500`: Unexpected Dexto failure.
- `502`: The upstream model provider failed.
- `503`: A required Dexto service is temporarily unavailable.

---

[API](https://skmtc.dev/dexto/apis/dexto-api.md) - [All operations](https://skmtc.dev/dexto/apis/dexto-api/llms.txt) - [OpenAPI document](https://skmtc.dev/dexto/apis/dexto-api/revisions/47eb880cffa5?raw)
