---
title: "Create a share link for a secret"
method: POST
path: "/v1/secrets/{secret_id}/share"
tags: ["Sharing"]
---

# Create a share link for a secret

`POST /v1/secrets/{secret_id}/share`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/secrets/{secret_id}/share`
- Auth: HTTP bearer

## Path parameters

- `secret_id` string, uuid, required

## Request body

- CreateShareRequest
  - `recipient_type` 'user' | 'agent' | 'external_email' | 'anyone_with_link' | 'creator', required
  - `recipient_id` string, uuid
  - `email` string, email
  - `permissions` string[]
  - `max_access_count` integer
  - `expires_at` string, date-time, required
  - `passphrase` string
  - `ip_allowlist` string[]

## Response `201`

Share created

- ShareResponse
  - `id` string, uuid
  - `share_url` string, uri
  - `recipient_type` string
  - `recipient_email` string
  - `expires_at` string, date-time
  - `max_access_count` integer

## Other responses

- `402`: x402 payment required
- `404`: Resource not found

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
