| Endpoint | Method | Admin Required |
|---|---|---|
/api/v1/buckets/:bucketName/notifications | PUT | No |
Replaces the webhook notification rules for a bucket you own, overwriting the existing configuration entirely. Send an empty rules array to remove all webhooks. See Webhooks for payload format, signing, and retry behavior.
00000000-0000-0000-0000-000000000000) for a new rule - the server assigns a real id and returns it.http or https endpoint to deliver events to. URLs resolving to private, loopback, or link-local addresses can only be set by administrators.X-Alarik-Signature-256 HMAC-SHA256 header the receiver can verify.| Event | Fires when |
|---|---|
s3:ObjectCreated:* | Any object creation |
s3:ObjectCreated:Put | A PutObject |
s3:ObjectCreated:Copy | A CopyObject |
s3:ObjectCreated:CompleteMultipartUpload | A multipart upload completes |
s3:ObjectRemoved:* | Any object removal |
s3:ObjectRemoved:Delete | A permanent delete |
s3:ObjectRemoved:DeleteMarkerCreated | A delete marker is created (versioned bucket) |
s3:LifecycleExpiration:* | Any lifecycle expiration |
s3:LifecycleExpiration:Delete | A lifecycle rule permanently deletes an object |
s3:LifecycleExpiration:DeleteMarkerCreated | A lifecycle rule creates a delete marker |
{
"rules": [
{
"id": "00000000-0000-0000-0000-000000000000",
"url": "https://example.com/webhook",
"secret": "a-shared-signing-secret",
"events": ["s3:ObjectCreated:*"],
"prefix": "uploads/",
"suffix": ".jpg",
"enabled": true
}
]
}
Returns the saved rules, each with its server-assigned id:
{
"rules": [
{
"id": "6ff08747-4ec0-48fd-a0b1-f5adda6d3161",
"url": "https://example.com/webhook",
"events": ["s3:ObjectCreated:*"],
"prefix": "uploads/",
"suffix": ".jpg",
"enabled": true
}
]
}
| Status | Reason |
|---|---|
400 | Missing bucket name, invalid URL, unknown event type, no events, or more than 16 rules |
403 | A non-admin tried to set a private/loopback URL |
404 | Bucket not found (or not owned by you) |