Connect a bucket
const url = 'https://example.com/api/v1/orgs/example/buckets';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"accessKeyId":"example","basePath":"example","bucketName":"example","caps":{"del":true,"list":true,"pub":true,"read":true,"write":true},"endpoint":"example","eventsValue":"example","maxUploadBytes":1,"name":"example","pathStyle":true,"provider":"aws","publicBaseUrl":"example","reachability":"public","region":"example","secretAccessKey":"example"}'};
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/buckets \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "accessKeyId": "example", "basePath": "example", "bucketName": "example", "caps": { "del": true, "list": true, "pub": true, "read": true, "write": true }, "endpoint": "example", "eventsValue": "example", "maxUploadBytes": 1, "name": "example", "pathStyle": true, "provider": "aws", "publicBaseUrl": "example", "reachability": "public", "region": "example", "secretAccessKey": "example" }'Connects an S3-compatible bucket, validates its endpoint policy, pings the bucket, and probes .sendcrate/staging/ lifecycle rules. Requires owner or admin role in shared orgs, an org-wide token (or session), and available buckets quota.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Organization ID.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Optional key prefix inside the bucket treated as root.
Underlying bucket name at the S3 provider.
S3 operations declared permitted for a bucket’s credentials.
object
Key can delete objects (s3:DeleteObject).
Key can list keys (s3:ListBucket).
Key can publish objects via ACL or bucket policy for public links.
Key can read objects (s3:GetObject).
Key can write objects (s3:PutObject).
S3 API endpoint URL (required for non-AWS providers).
Use path-style S3 URLs instead of virtual-hosted-style.
S3-compatible storage provider (aws, r2, spaces, b2, minio).
Network reachability of the bucket endpoint from recipients: public (internet-reachable) or internal (private network only; disables direct and non-CDN public links).
Responses
Section titled “Responses”Connected bucket and initial webhook signing secret (when supported by the provider)
object
Connected S3-compatible bucket and its health, caps, and access.
object
Who inside the organization can reach a bucket.
object
When true, every non-guest member of the organization can access the bucket.
Explicit team and member grants on the bucket.
Per-member or per-team bucket access grant.
object
Team ID or organization member ID.
Bucket permission level: share (browse, download, upload, delete, and create links) or read (browse and download only).
Underlying bucket name at the S3 provider.
S3 operations declared permitted for a bucket’s credentials.
object
Key can delete objects (s3:DeleteObject).
Key can list keys (s3:ListBucket).
Key can publish objects via ACL or bucket policy for public links.
Key can read objects (s3:GetObject).
Key can write objects (s3:PutObject).
When true, this bucket is defined in sendcrate.yml and its connection settings cannot be edited via the API.
Display name of the bucket inside Sendcrate.
Whether S3 requests use path-style URLs instead of virtual-hosted-style.
S3-compatible storage provider (aws, r2, spaces, b2, minio).
Human-readable provider name.
Short provider label.
Network reachability of the bucket endpoint from recipients: public (internet-reachable) or internal (private network only; disables direct and non-CDN public links).
Whether an active share link targets the entire bucket root.
Last observed connection health of the bucket (ok, limited, unreachable).
Example
{ "bucket": { "access": { "grants": [ { "kind": "team", "level": "share" } ] }, "myLevel": "share", "provider": "aws", "reachability": "public", "status": "ok" }}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"}Plan or license entitlement required.
Error returned when an organization lacks a required plan or license entitlement.
object
object
Feature or quota gate enforced by the active plan or license.
Human-readable error explanation.
Example
{ "code": "PAYMENT_REQUIRED", "data": { "entitlement": "audit" }}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"}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"}