---
title: "Get a secret by ID or name"
method: GET
path: "/v1/deployments/secrets/{id}"
tags: ["Secrets"]
---

# Get a secret by ID or name

`GET /v1/deployments/secrets/{id}`

## Request

- Base URL: `https://api.together.ai`
- URL: `https://api.together.ai/v1/deployments/secrets/{id}`
- Auth: HTTP bearer

Retrieve details of a specific secret by its ID or name

## Path parameters

- `id` string, required: Secret ID or name

## Response `200`

Secret details

- SecretResponseItem
  - `created_at` string: CreatedAt is the ISO8601 timestamp when this secret was created
  - `created_by` string: CreatedBy is the identifier of who created this secret.
  - `description` string: Description is a human-readable description of the secret's purpose
  - `expires_at` string, date-time: ExpiresAt is the ISO8601 timestamp when this secret expires and is deleted. Changing the value extends it. Omitted for secrets that never expire
  - `id` string: ID is the unique identifier for this secret
  - `last_updated_by` string: LastUpdatedBy is the identifier of who last updated this secret.
  - `name` string: Name is the name/key of the secret
  - `object` 'secret': The object type, which is always `secret`.
  - `ttl_seconds` integer: TTLSeconds is the secret's lifetime in seconds. Omitted when no TTL is set
  - `updated_at` string: UpdatedAt is the ISO8601 timestamp when this secret was last updated

## Other responses

- `404`: Secret not found
- `500`: Internal server error

## Changes

- **2026-10-28** `93438ddac711`: 2 info
  - added the optional property `expires_at` to the response with the `200` status
  - added the optional property `ttl_seconds` to the response with the `200` status
- **2026-10-22** `bb5257b3173a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/together/apis/together-apis/changes/v1/deployments/secrets/:id/get.md)

---

[API](https://skmtc.dev/together/apis/together-apis.md) - [All operations](https://skmtc.dev/together/apis/together-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/together/apis/together-apis/revisions/93438ddac711?raw)
