> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usesink.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Secure Share Link

> Mint a single-use (or view-capped) link that hands out secret values
without requiring the recipient to hold a workspace account.

Only the token hash and the secret ids live in Redis; the values stay
encrypted at rest and are decrypted on redemption.



## OpenAPI

````yaml /openapi.json post /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/share
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /secrets/{workspace_id}/{team_id}/{project_id}/{environment_id}/share:
    post:
      tags:
        - SECRET MANAGEMENT
      summary: Create Secure Share Link
      description: |-
        Mint a single-use (or view-capped) link that hands out secret values
        without requiring the recipient to hold a workspace account.

        Only the token hash and the secret ids live in Redis; the values stay
        encrypted at rest and are decrypted on redemption.
      operationId: >-
        create_secure_share_link_secrets__workspace_id___team_id___project_id___environment_id__share_post
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Project Id
        - name: environment_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Environment Id
        - name: workspace_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Workspace Id
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareLinkCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareLinkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ShareLinkCreate:
      properties:
        secret_ids:
          anyOf:
            - items:
                type: string
                format: uuid4
              type: array
            - type: 'null'
          title: Secret Ids
          description: >-
            Secrets to share. Shares every secret in the environment when
            omitted.
        expires_in_minutes:
          type: integer
          maximum: 10080
          minimum: 1
          title: Expires In Minutes
          default: 60
        max_views:
          type: integer
          maximum: 100
          minimum: 1
          title: Max Views
          default: 1
      type: object
      title: ShareLinkCreate
    ShareLinkResponse:
      properties:
        token:
          type: string
          title: Token
        url:
          type: string
          title: Url
        expires_at:
          type: string
          format: date-time
          title: Expires At
        max_views:
          type: integer
          title: Max Views
        secret_count:
          type: integer
          title: Secret Count
      type: object
      required:
        - token
        - url
        - expires_at
        - max_views
        - secret_count
      title: ShareLinkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````