Skip to content

Update a share link

PATCH
/orgs/{orgId}/shares/{id}
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.

orgId
required

Organization ID.

string
id
required

Resource ID within the organization.

string
Media typeapplication/json
object
audience
Any of:
object
kind
required
Allowed value: anyone
drop
Any of:
object
maxBytes
Any of:
integer
> 0 <= 9007199254740991
maxFiles
Any of:
integer
> 0 <= 9007199254740991
perSender
boolean
prefix
Any of:
string
expiresAt
Any of:
string format: date-time
limits
object
downloads
Any of:
integer
> 0 <= 9007199254740991
views
Any of:
integer
> 0 <= 9007199254740991
password
Any of:
string
site
Any of:
object
cache
Any of:
string
fallback
Any of:
string
index
Any of:
string
hidden
boolean
name

New address for the link, or null to keep only the random /s/<slug> address. The old address stops working at once.

Any of:
string

Updated share link

Media typeapplication/json

Share link record including delivery mode, limits, and audience.

object
audience
required

Audience access configuration of a share link.

object
guestListIds
required

Attached guest list IDs when kind is restricted.

Array<string>
kind
required

Who may open a share link: anyone with the URL, or restricted to explicit recipients and guest lists.

string
Allowed values: anyone restricted
recipients
required

Individual allowed email addresses when kind is restricted.

Array<string>
bucketId
required

Bucket ID, or null if the backing bucket was disconnected.

Any of:
string
createdAt
required
string
createdBy
required

User ID of the creator.

string
createdByName
required

Display name of the creator.

string
delivery
required

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).

string
Allowed values: gated proxied direct public
downloads
required

Recorded download count (exact for proxied, hand-off count for gated).

number
drop
required

Reverse-upload (drop) configuration for folder/bucket links, or null.

Any of:
object
maxBytes
required

Maximum size in bytes per uploaded file, or null.

Any of:
number
maxFiles
required

Maximum number of files accepted by the drop, or null.

Any of:
number
perSender
required

When true on a restricted drop, each verified email uploads into its own subfolder.

boolean
prefix
required

Optional subfolder prefix inside the shared target.

Any of:
string
expiresAt
required

ISO-8601 UTC expiration timestamp, or null if never.

Any of:
string
hidden
required

Whether an immutable (direct/public) link has been hidden from the default list.

boolean
id
required
string
lastOpenAt
required

ISO-8601 UTC timestamp of the most recent open, or null.

Any of:
string
limits
required

Optional usage caps for the link.

object
downloads
required

Maximum downloads (proxied links only), or null.

Any of:
number
views
required

Maximum link opens, or null.

Any of:
number
name
required

Address chosen for the link, unique among the org’s live links, or null for a random one.

Any of:
string
orgId
required
string
password
required

Whether opening the link requires a password.

boolean
revokedAt
required

ISO-8601 UTC revocation timestamp, or null while active.

Any of:
string
site
required

Static website hosting configuration, or null.

Any of:
object
cache
required

Optional Cache-Control directive for served assets.

Any of:
string
fallback
required

Fallback document for missing paths (e.g. index.html for SPAs).

Any of:
string
index
required

Index document name (defaults to index.html).

Any of:
string
slug
required

Random public identifier in the /s/<slug> URL.

string
target
required

Storage resource pointed to by the share link.

object
bucketName
required
Any of:
string
key
required

Target object key or folder prefix.

string
kind
required

Kind of storage target referenced by a share link.

string
Allowed values: file folder bucket
name
required

Display name of the shared target.

string
url
required

Full recipient-facing URL for the share.

string
views
required

Total link opens recorded.

number

Example

{
"audience": {
"kind": "anyone"
},
"delivery": "gated",
"target": {
"kind": "file"
}
}

Invalid request input or rule violation.

Media typeapplication/json

Error returned when request input fails schema validation or violates a domain rule.

object
code
required
string
Allowed values: BAD_REQUEST
data
object
issues
required

Field-level validation failures, present when schema validation fails.

Array<object>
object
message
required
string
path
required

Dot-separated field path.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "BAD_REQUEST"
}

Authentication required or credentials invalid.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Insufficient role, bucket grant, or token scope.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Resource not found.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Request conflicts with the current state of the resource.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

The backing resource is no longer available.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Rate limit exceeded.

Media typeapplication/json

Standard REST error envelope.

object
code
required

Machine-readable error code.

string
data

Optional structured error details.

message
required

Human-readable error explanation.

string

Example generated

{
"code": "example",
"data": "example",
"message": "example"
}

Unexpected server error. Quote data.requestId when you report it.

Media typeapplication/json

Error returned when Sendcrate or one of its providers fails (5xx).

object
code
required
string
Allowed values: INTERNAL_SERVER_ERROR PROVIDER_FAILED
data
object
debug

Error chain with stack traces. Present only when the server runs in development mode.

Array
requestId

Request reference to quote when you report the error.

string
message
required

Human-readable error explanation.

string

Example

{
"code": "INTERNAL_SERVER_ERROR"
}