---
title: "POST /api/v1/shared-secrets/{id}/access"
method: POST
path: "/api/v1/shared-secrets/{id}/access"
tags: ["Secret Sharing"]
---

# POST /api/v1/shared-secrets/{id}/access

`POST /api/v1/shared-secrets/{id}/access`

Access a shared secret by its ID. If the secret is password protected, you must provide the password in the request body. Returns the secret value if access is granted, or an error if access is denied. The endpoint requires authentication if the shared secret is scoped to an organization.

## Path parameters

- `id` string, required

## Request body

- object
  - `password` string — The password for accessing a password-protected shared secret. Only required if the secret is password protected.

## Response `200`

Default Response

- object
  - `id` string, required
  - `expiresAt` string, date-time, required
  - `userId` string, uuid, nullable
  - `orgId` string, uuid, nullable
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required
  - `expiresAfterViews` number, nullable
  - `accessType` string
  - `name` string, nullable
  - `lastViewedAt` string, date-time, nullable
  - `type` string
  - `authorizedEmails` unknown
  - `identityId` string, uuid, nullable
  - `allowExternalEmails` boolean, nullable
  - `orgName` string
  - `secretValue` string

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `500` — Default Response

---

[API](https://skmtc.net/infisical/apis/infisical-api.md) · [All operations](https://skmtc.net/infisical/apis/infisical-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/infisical/infisical-api/versions/f10a4f8c1d41/schema)
