Update a share link
const url = 'https://example.com/api/v1/orgs/example/shares/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"audience":{"kind":"anyone"},"drop":{"maxBytes":1,"maxFiles":1,"perSender":true,"prefix":"example"},"expiresAt":"2026-04-15T12:00:00Z","limits":{"downloads":1,"views":1},"password":"example","site":{"cache":"example","fallback":"example","index":"example"},"hidden":true,"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://example.com/api/v1/orgs/example/shares/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "audience": { "kind": "anyone" }, "drop": { "maxBytes": 1, "maxFiles": 1, "perSender": true, "prefix": "example" }, "expiresAt": "2026-04-15T12:00:00Z", "limits": { "downloads": 1, "views": 1 }, "password": "example", "site": { "cache": "example", "fallback": "example", "index": "example" }, "hidden": true, "name": "example" }'Updates settings on a gated or proxied share (changing password, audience, or drop bumps grantVersion and invalidates prior recipient sessions). Immutable direct/public links only accept hidden and name changes. Restricted to the link creator or an org admin.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Resource ID within the organization.
Request Body
Section titled “Request Body”object
Responses
Section titled “Responses”Updated share link
Share link record including delivery mode, limits, and audience.
object
Audience access configuration of a share link.
object
Attached guest list IDs when kind is restricted.
Who may open a share link: anyone with the URL, or restricted to explicit recipients and guest lists.
Individual allowed email addresses when kind is restricted.
User ID of the creator.
Display name of the creator.
How recipients receive bytes: gated (access-checked redirect to short-lived presigned URL, or streamed for internal buckets), proxied (streamed through Sendcrate with exact download counts and instant revocation), direct (raw presigned URL, files only, <= 7 days, immutable), or public (provider ACL/policy or bucket public base URL, permanent).
Recorded download count (exact for proxied, hand-off count for gated).
Reverse-upload (drop) configuration for folder/bucket links, or null.
object
When true on a restricted drop, each verified email uploads into its own subfolder.
Whether an immutable (direct/public) link has been hidden from the default list.
Whether opening the link requires a password.
Static website hosting configuration, or null.
Random public identifier in the /s/<slug> URL.
Full recipient-facing URL for the share.
Total link opens recorded.
Example
{ "audience": { "kind": "anyone" }, "delivery": "gated", "target": { "kind": "file" }}Invalid request input or rule violation.
Error returned when request input fails schema validation or violates a domain rule.
object
object
Field-level validation failures, present when schema validation fails.
object
Dot-separated field path.
Human-readable error explanation.
Example
{ "code": "BAD_REQUEST"}Authentication required or credentials invalid.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Insufficient role, bucket grant, or token scope.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Resource not found.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Request conflicts with the current state of the resource.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}The backing resource is no longer available.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Rate limit exceeded.
Standard REST error envelope.
object
Machine-readable error code.
Optional structured error details.
Human-readable error explanation.
Example generated
{ "code": "example", "data": "example", "message": "example"}Unexpected server error. Quote data.requestId when you report it.
Error returned when Sendcrate or one of its providers fails (5xx).
object
object
Error chain with stack traces. Present only when the server runs in development mode.
Request reference to quote when you report the error.
Human-readable error explanation.
Example
{ "code": "INTERNAL_SERVER_ERROR"}