Create a share link
const url = 'https://example.com/api/v1/orgs/example/shares';const options = { method: 'POST', 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"},"bucketId":"example","delivery":"gated","key":"example","name":"example","notify":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/orgs/example/shares \ --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" }, "bucketId": "example", "delivery": "gated", "key": "example", "name": "example", "notify": true }'Creates a share link for a file, folder (key ending in /), or whole bucket (empty key). Requires share bucket level. direct links expire in at most 7 days; public ACL folders are capped at 500 files; website links (site) require share_url on a different origin from app_url.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Request Bodyrequired
Section titled “Request Bodyrequired”object
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).
Address for the link (/@<org slug>/<name>), unique among the org’s live links. Omit for a random /s/<slug> address only.
Responses
Section titled “Responses”Created share link and sampled MIME mismatch count (for website links)
object
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
{ "share": { "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"}Request or selection exceeds size or item limits.
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"}The storage, DNS, mail, or payment provider failed or refused the request.
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"}