---
docId: doc_5bd98eb7829b4daaa67cd327674b4d5f
title: Get a secret
description: "Retrieves secret details and current authorizations without returning its value."
api:
  group: herramientas/secretos
  auth: bearer
  operations:
    - operationId: getSecret
      method: GET
      path: '/v1/secrets/{secretId}'
      postmanName: Get a secret
---

<script>
  import { Ways } from '$lib/components';
</script>

# Get a secret

Retrieves the secret’s details and current authorizations in `usedBy`. Check them before revoking or deleting the secret to see which resources will stop working.

## Example

<Ways tabs="api,sdk">
<Ways.Way name="api">

```bash
curl https://api.platic.ai/v1/secrets/$SECRET_ID \
  -H "Authorization: Bearer $PLATIC_API_KEY"
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
await platic.secrets.get("secret_123");
```

</Ways.Way>
</Ways>

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `secretId` | string | Id of the secret | ✓ |

## Response

```json
{
  "status": "success",
  "data": {
    "id": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c",
    "name": "Acme Store · Orders API",
    "kind": "bearer",
    "status": "active",
    "revision": 1,
    "createdAt": "2026-10-28T12:05:00.000Z",
    "updatedAt": "2026-10-28T12:05:00.000Z",
    "usedBy": [
      {
        "kind": "api",
        "id": "RuzoaswTBBrhutHyKYZn",
        "slot": "auth.token",
        "destination": "https://api.acme.example"
      }
    ]
  }
}
```

### Response fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Id of the secret |
| `name` | string | Name to recognize it |
| `kind` | string | `api_key`, `bearer`, `password`, or `signing_key` |
| `status` | string | `active`, `revoked`, or `deleting`. See [secret states](/api-reference/secrets#slot-states) |
| `revision` | number | Goes up with every change to the secret |
| `createdAt`, `updatedAt` | string \| null | Dates in ISO 8601 |
| `expiresAt` | string | When it stops working. Only appears if it has an expiration |
| `usedBy` | array | The secret's current authorizations. Empty if it is not bound to anything |
| `usedBy[].kind` | string | Type of resource: `api`, `mcp`, `webhook`, or `app` (an application installed from Platica) |
| `usedBy[].id` | string | Id of the resource: the `integrationId`, the `mcpId`, or the `webhookId` |
| `usedBy[].slot` | string | The slot it is bound to |
| `usedBy[].destination` | string | The origin Platica may send the value to |

## Errors

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `403` | `FORBIDDEN` | The person behind the token cannot view secrets |
| `404` | `SECRET_NOT_FOUND` | The secret does not exist in this workspace or was already deleted |

## Notes

- `usedBy` leaves out revoked authorizations and checks at most 50.
- Check each slot’s state in the resource’s `secrets[]`. An authorization can appear in `usedBy` while the slot is in `needs_authorization` if the resource changed afterwards.
- To change the value without touching what already uses it, [rotate the secret](/api-reference/secrets/rotate).
- A secret that was already deleted answers `404`, the same as one that never existed.
