Skip to main content
POST
https://genui.sh
/
api
/
artifacts
/
{id}
/
share
Share Artifact
curl --request POST \
  --url https://genui.sh/api/artifacts/{id}/share \
  --header 'Content-Type: application/json' \
  --data '
{
  "expiresIn": "<string>",
  "allowDownload": true,
  "password": "<string>"
}
'
{
  "url": "https://genui.sh/a/art_abc123?token=eyJhbGc...",
  "token": "eyJhbGc...",
  "expiresAt": "2024-01-22T12:00:00Z"
}
Generate a signed share URL for an existing artifact. The URL allows anyone to view the artifact without authentication.

Request

id
string
required
The artifact ID to share
expiresIn
string
Share link expiration. Examples: 1h, 24h, 7d, 30d. Default: 7d
allowDownload
boolean
Allow viewers to download the artifact (PDF only). Default: false
password
string
Optional password protection for the share link

Response

url
string
The shareable URL
token
string
The share token (for reference)
expiresAt
string
ISO 8601 expiration timestamp
{
  "url": "https://genui.sh/a/art_abc123?token=eyJhbGc...",
  "token": "eyJhbGc...",
  "expiresAt": "2024-01-22T12:00:00Z"
}

Code Examples

curl -X POST https://genui.sh/api/artifacts/art_abc123/share \
  -H "Authorization: Bearer $GENUI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"expiresIn": "7d"}'

Password-Protected Sharing

To create a password-protected share link:
{
  "expiresIn": "7d",
  "password": "secret123"
}
Viewers will be prompted to enter the password before accessing the artifact.