Skip to content

Webhooks

Webhooks let you receive HTTP callbacks when events occur in your GolemDrive account. Instead of polling the API to check for changes, GolemDrive pushes events to a URL you specify.

  • Trigger a build pipeline when a file is uploaded
  • Log download activity to an external analytics system
  • Send a Slack notification when someone accesses a share link
  • Sync file metadata with an external database
  • Audit account changes in real time
  1. Go to Account Settings > Webhooks
  2. Click Add Webhook
  3. Enter the URL where you want to receive events
  4. Select which event types to subscribe to
  5. Save

GolemDrive will send a test event to your URL to verify it’s reachable.

Terminal window
curl -X POST https://api.golemdrive.com/api/v1/webhooks/ \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-server.com/webhook",
"events": ["file.uploaded", "share.accessed"]
}'
EventTriggered when
file.uploadedA file finishes uploading
file.downloadedA file is downloaded
file.deletedA file is deleted
file.movedA file is moved to a different folder
file.renamedA file is renamed
share.createdA new share link is created
share.accessedSomeone opens a share link
share.downloadedSomeone downloads a file through a share link
share.revokedA share link is disabled or deleted
team.member_joinedA new member joins a team
team.member_leftA member leaves a team

Each webhook delivery sends a JSON POST request to your URL:

{
"event": "file.uploaded",
"timestamp": "2026-03-26T14:30:00Z",
"data": {
"file_id": "abc123",
"file_name": "report.pdf",
"folder_id": "def456",
"size_bytes": 2048576
},
"webhook_id": "wh_789",
"delivery_id": "del_012"
}

The data field varies depending on the event type. Each event type’s specific payload is documented in the API reference.

Every webhook delivery includes a signature header so you can verify it came from GolemDrive and wasn’t tampered with:

X-GolemDrive-Signature: sha256=a1b2c3d4e5f6...

To verify:

  1. Get the webhook secret assigned when you created the webhook
  2. Compute an HMAC-SHA256 of the raw request body using your secret
  3. Compare the result to the value in the X-GolemDrive-Signature header
import hmac
import hashlib
def verify_webhook(payload_body, signature_header, secret):
expected = hmac.new(
secret.encode(),
payload_body,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature_header)

Never process a webhook payload without verifying the signature first.

Webhook payloads are encrypted at rest on GolemDrive’s servers. This means that even internally, stored webhook delivery records are protected. The payloads are decrypted only at the moment of delivery to your endpoint.

If your endpoint returns a non-2xx status code or doesn’t respond within 30 seconds, GolemDrive retries the delivery automatically:

AttemptDelay
1st retry1 minute
2nd retry5 minutes
3rd retry30 minutes
4th retry2 hours
5th retry12 hours

After 5 failed retries, the delivery is marked as failed. You can view failed deliveries in Account Settings > Webhooks and manually retry them.

You can send a test event from the dashboard to verify your endpoint is working:

  1. Go to Account Settings > Webhooks
  2. Click on an existing webhook
  3. Click Send Test Event
  4. Check your endpoint for the test payload

The test event uses the event type webhook.test with sample data so you can verify your integration end to end without triggering a real event.

Terminal window
curl https://api.golemdrive.com/api/v1/webhooks/ \
-H "Authorization: Bearer YOUR_TOKEN"
Terminal window
curl -X PUT https://api.golemdrive.com/api/v1/webhooks/{id} \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"events": ["file.uploaded", "file.deleted", "share.created"]
}'
Terminal window
curl -X DELETE https://api.golemdrive.com/api/v1/webhooks/{id} \
-H "Authorization: Bearer YOUR_TOKEN"
  • Use a service like webhook.site during development to inspect payloads before building your handler
  • Always respond with a 200 status quickly — do heavy processing asynchronously after acknowledging receipt
  • Store the delivery_id from each payload to handle deduplication, in case a retry delivers the same event twice
  • If your endpoint will be temporarily unavailable, disable the webhook in settings rather than letting deliveries fail and retry