Skip to content

Developer portal

POST /tenant/scans/{scan_id}/share

Create expiring share links for report, bundle, or passport access.

PilotPOST /tenant/scans/{scan_id}/shareAuth: operator | admin

Summary

Create expiring share links for report, bundle, or passport access.

Example

curl

curl -X POST "https://sparkling-vibrancy-production-1a7a.up.railway.app/tenant/scans/{scan_id}/share" \
  -H "Authorization: Bearer 811f31d4-5b8e-4ed0-a7a2-8176e05eba63" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Board packet",
  "scope": "report",
  "expiresHours": 168
}'

Request body

FieldTypeRequiredDescription
expiresHoursintegerNo (168)

Link TTL in hours (1-720).

labelstringNo

Human-readable link label.

scope"report" | "bundle" | "passport"No (report)

Shared artifact scope.

Response

FieldTypeRequiredDescription
urlstringYes

Public share URL.

tokenstringYes

Opaque share token.

expiresAtstring (ISO8601)Yes

Expiration timestamp.

scopestringYes

Effective link scope.

Errors

CodeMeaningTypical causeSuggested fix
401UnauthorizedMissing or invalid API key in Authorization, x-api-key, or query param.Send Bearer <key> or x-api-key with a valid tenant token.
403ForbiddenValid key but insufficient role (viewer attempting write) or wrong admin key.Use operator or admin role key; check RBAC matrix.
404Not foundScan, schedule, share link, or resource id does not exist or expired.Verify id and tenant scope; share links expire per expiresHours.
422Unprocessable entityInvalid payload shape, unsupported scenario, or infeasible constraints.Fix field errors in response detail; relax constraints and retry.
429Too many requestsPer-key rate limit exceeded (default 300 requests per minute) or public endpoint limit.Backoff with jitter; cache results; request higher limit for production.
500Internal server errorUnexpected backend failure; includes requestId in response.Retry with exponential backoff; contact support with requestId if persistent.
503Service unavailablePersistence disabled, auth DB unreachable, or admin API not configured.Retry shortly; schedules require Postgres persistence enabled.

See the full errors reference.