Generate a signed share URL for an existing artifact. The URL allows anyone to view the artifact without authentication.
Request
Share link expiration. Examples: 1h, 24h, 7d, 30d. Default: 7d
Allow viewers to download the artifact (PDF only). Default: false
Optional password protection for the share link
Response
The share token (for reference)
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.