v4

latestOpenAPI 3.0.32026-07-312,317012.2 MB
Secret Sharing

Create a new shared secret that can be accessed by a link.

post/api/v1/shared-secrets

Request body

namestring

An optional name for the shared secret for easier identification.

passwordstring

An optional password to protect the shared secret. Recipients will need to provide this password to access the secret.

secretValuestring required

The secret value to share.

expiresInstring

The duration after which the shared secret will expire. Accepts formats like '30d', '24h', '1w'. Maximum is 30 days, minimum is 5 minutes.

maxViewsnumber

The maximum number of times the shared secret can be viewed before it expires. If not provided, unlimited views are allowed.

accessType'anyone' | 'organization'

Determines who can access the shared secret. 'organization' restricts access to users within your organization. 'anyone' allows access to anyone with the link. Defaults to 'organization'.

authorizedEmailsstring[]

An optional array of email addresses to share the secret with. Maximum 100 emails. Organization members in the list get direct access. When allowExternalEmails is enabled, non-member emails are also accepted and recipients will receive the secret link via email, but must use the password to access it.

allowExternalEmailsboolean

When true, allows sharing with email addresses that do not belong to Infisical. A password is required when this option is enabled. External recipients will receive the secret link via email and must enter the password to access it.

Response

Default Response

idstring required
expiresAtstring date-time required
userIdstring uuid nullable
orgIdstring uuid nullable
createdAtstring date-time required
updatedAtstring date-time required
expiresAfterViewsnumber nullable
accessTypestring
namestring nullable
lastViewedAtstring date-time nullable
typestring
{"stackTrail":"paths:/api/v1/shared-secrets:post:responses:200:content:application/json:schema:properties:authorizedEmails","oasType":"schema","type":"unknown","nullable":true}
identityIdstring uuid nullable
allowExternalEmailsboolean nullable
sharedSecretLinkstring required