Webhooks API
The Egnyte Webhooks API lets you subscribe to real-time events in your Egnyte domain. When a registered event occurs—such as a file upload, folder creation, or permission change—Egnyte sends an HTTP POST request to your specified endpoint with event details. This push model eliminates the need to poll the Events API.
Note: The number of webhooks you can register is limited per client ID and domain pair. You can register up to 100 path filters per webhook.
Overview
Webhooks complement the Egnyte Events API by providing push-based notifications instead of requiring your application to poll for changes. When you register a webhook, Egnyte pushes events to your endpoint in near real-time as they occur in your domain.
Key Features
- Real-time notifications — Receive events as they happen, with minimal latency
- Event filtering — Subscribe only to the event types your application needs, using exact names or wildcards (e.g.
fs:*,link:*,comment:*) - Secure delivery — Webhook requests include an
authorizationheader whose value is theauthHeaderyou configure at registration time. Validate this on every incoming request to confirm it originates from Egnyte. - Automatic retries — Egnyte retries failed deliveries at fixed intervals: immediate, then 1 minute, 10 minutes, and 1 hour (4 attempts total). After all retries are exhausted the webhook registration is disabled.
- SSL required — Your endpoint must have a valid CA-signed TLS certificate; self-signed certificates are rejected.
Common Use Cases
- Sync applications — Update local caches when files change in Egnyte
- Workflow automation — Trigger business processes when specific events occur
- Compliance monitoring — Log permission changes and access events in real time
- Notifications — Alert users or systems when files are uploaded, shared, or modified
Base URL
https://{domain}.egnyte.com/pubapi/v1/webhooks
Authentication
All requests require an OAuth 2.0 Bearer token in the Authorization header:
Authorization: Bearer {access_token}
Your OAuth token must include the Egnyte.webhooks scope.
See Authentication for details on obtaining a token.
When Egnyte delivers events to your endpoint it includes an authorization header whose value is set from the authHeader you configured at registration time. Validate this value on every incoming request to ensure requests originate from Egnyte.
Register a Webhook
Creates a new webhook subscription for specified event types and paths.
Request
POST /pubapi/v1/webhooks
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The HTTPS endpoint where Egnyte will send event notifications |
eventType | array of strings | No | List of event types to subscribe to. Use category wildcards (e.g., fs:*) or specific event names. If omitted, subscribes to all events (not recommended). Minimum 1 item if provided. |
path | string | No | Comma-separated list of folder paths to monitor (e.g., /Shared/Documents/Invoices,/Shared/Documents/Samples). If omitted, monitors all paths. Maximum 100 paths. |
authHeader | string | No | Custom authorization header value sent with webhook notifications for request verification |
Example Request
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/webhooks" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "url": "https://{redirect_uri_base}/webhook", "eventType": [ "fs:add_file" ], "path": "/Shared/Documents/Invoices,/Shared/Documents/Samples" }'
Response
201 Created
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique identifier for the registered webhook |
expires | integer | Unix timestamp when the webhook registration expires |
status | string | Current status: enabled or disabled |
Example Response
{
"webhookId": "c9ac0519-284a-4bee-9574-30ae7891e5dc",
"expires": 2100000000,
"status": "enabled"
}
List Webhooks
Returns all webhooks registered for the authenticated user and client ID.
Request
GET /pubapi/v1/webhooks
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/webhooks" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
Returns an array of webhook objects.
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique identifier for the webhook |
expires | integer | Unix timestamp when the webhook registration expires |
status | string | Current status: enabled or disabled |
Example Response
[
{
"webhookId": "c9ac0519-284a-4bee-9574-30ae7891e5dc",
"expires": 2100000000,
"status": "enabled"
},
{
"webhookId": "a1bc0519-284a-4bee-9574-30ae7891e5ef",
"expires": 2100000000,
"status": "disabled"
}
]
Get Webhook Details
Returns full configuration details for a specific webhook.
Request
GET /pubapi/v1/webhooks/{webhookId}/details
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | ID of the webhook |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/webhooks/{webhookId}/details" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique identifier for the webhook |
url | string | Endpoint receiving webhook notifications |
eventType | array of strings | Subscribed event types |
path | string | Comma-separated list of monitored paths |
authHeader | string | Custom authorization header value |
expires | integer | Unix timestamp when the webhook registration expires |
status | string | Current status: enabled or disabled |
Example Response
{
"webhookId": "c9ac0519-284a-4bee-9574-30ae7891e5dc",
"expires": 2100000000,
"status": "enabled",
"eventType": ["fs:add_file", "fs:delete_file"],
"path": "/Shared/Documents/Invoices,/Shared/Documents/Samples",
"authHeader": "Bearer secret-token-12345",
"url": "https://example.com/webhook"
}
Get Webhook Status
Returns the current status and expiration of a webhook.
Request
GET /pubapi/v1/webhooks/{webhookId}/status
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | ID of the webhook |
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/webhooks/{webhookId}/status" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique identifier for the webhook |
expires | integer | Unix timestamp when the webhook registration expires |
status | string | Current status: enabled or disabled |
Example Response
{
"webhookId": "c9ac0519-284a-4bee-9574-30ae7891e5dc",
"expires": 2100000000,
"status": "enabled"
}
Update Webhook Status
Enables or disables a webhook without changing its configuration.
Request
POST /pubapi/v1/webhooks/{webhookId}/status
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | ID of the webhook |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | New status: enabled or disabled |
Example Request
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/webhooks/{webhookId}/status" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "status": "disabled" }'
Response
200 OK
| Field | Type | Description |
|---|---|---|
webhookId | string | Unique identifier for the webhook |
expires | integer | Unix timestamp when the webhook registration expires |
status | string | Updated status: enabled or disabled |
Example Response
{
"webhookId": "c9ac0519-284a-4bee-9574-30ae7891e5dc",
"expires": 2100000000,
"status": "disabled"
}
Update Webhook
Updates the configuration of an existing webhook.
Request
PUT /pubapi/v1/webhooks/{webhookId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | ID of the webhook to update |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
url | string | Yes | The HTTPS endpoint where Egnyte will send event notifications |
eventType | array of strings | No | List of event types to subscribe to. Minimum 1 item if provided. |
path | string | No | Comma-separated list of folder paths to monitor. Maximum 100 paths. |
authHeader | string | No | Custom authorization header value |
status | string | No | Webhook status: enabled or disabled |
Example Request
curl -i -X PUT "https://{domain}.egnyte.com/pubapi/v1/webhooks/{webhookId}" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{ "url": "https://{redirect_uri_base}/webhook", "eventType": [ "fs:add_file" ], "path": "/Shared/Documents/Invoices", "status": "enabled", "authHeader": "Bearer secret-token-12345" }'
Response
200 OK
Returns no content on successful update.
Delete Webhook
Permanently removes a webhook subscription.
Request
DELETE /pubapi/v1/webhooks/{webhookId}
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
webhookId | string | Yes | ID of the webhook to delete |
Example Request
curl -i -X DELETE "https://{domain}.egnyte.com/pubapi/v1/webhooks/{webhookId}" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
204 No Content
Returns no content on successful deletion.
Get Current User Information
Returns information about the authenticated user and OAuth client. Useful for verifying token validity and inspecting active scopes. This endpoint requires a valid OAuth token but no specific scope.
Request
GET /pubapi/v1/whoami
Example Request
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/whoami" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Response
200 OK
| Field | Type | Description |
|---|---|---|
clientId | string | OAuth client ID of the application |
username | string | Username of the authenticated user |
domain | string | Egnyte domain name |
scopes | array of strings | OAuth scopes granted to the token |
Example Response
{
"clientId": "hweb8adyh3gumiypa45qdgkm",
"username": "johndoe",
"domain": "apidemo",
"scopes": ["Egnyte.webhooks"]
}
Webhook Payload
Egnyte sends an HTTP POST with Content-Type: application/json. The body is an object with a data array:
{
"data": [
{
"eventId": "...",
"domain": "...",
"timestamp": 1710000000000,
"user": {
"id": 1,
"displayName": "...",
"username": "...",
"email": "..."
},
"actionSource": "...",
"eventType": "fs:add_file",
"webhookId": "...",
"data": {}
}
]
}
Each item in data contains:
| Field | Type | Description |
|---|---|---|
eventId | string | Unique per Egnyte domain; use for deduplication |
domain | string | The Egnyte domain where the event occurred |
timestamp | integer | Unix timestamp in milliseconds |
user | object | User who triggered the event (see below) |
actionSource | string | API or client used to perform the action |
eventType | string | Canonical event name (e.g. fs:add_file). When an event maps to multiple names, this is always the most specific. |
webhookId | string | ID of the webhook registration |
customProperties | object | (Optional) Whitelisted subset of internal event properties: PROJECT_ID, PROJECT_ROOT_FOLDER_ID, FOLDER_PROJECT_ACTIVITY_ACTION_INFO, fileUpdated |
data | object | Event-specific payload. Schema varies by eventType (see Event Types below). |
User Object Fields
| Field | Type | Description |
|---|---|---|
id | integer | User ID |
displayName | string | User's display name |
username | string | Username |
email | string | Email address |
clientIdHash | string | (Optional) SHA1 hash of the OAuth clientId that caused the event — useful for filtering out your own application's actions |
impersonatedBy | string | (Optional) Admin username if the action was performed via API impersonation |
Your endpoint must respond with HTTP 200 to acknowledge receipt. Any non-200 response code schedules a retry.
Event Types
Supported Event Types
The following event types and wildcards are supported. Wildcards are only available for the categories marked below.
| Category | Wildcard | Specific Events |
|---|---|---|
| File System | fs:* | fs:add_file, fs:add_folder, fs:upload_link, fs:copy_file, fs:copy_folder, fs:delete_file, fs:delete_folder, fs:delete_from_trash, fs:move_file, fs:move_folder, fs:restore_from_trash, fs:lock_file, fs:unlock_file, fs:folder_project_activity |
| Links | link:* | link:create, link:create_download_link, link:create_upload_link, link:delete, link:delete_download_link, link:delete_upload_link |
| Comments | comment:* | comment:set_comment, comment:remove_comment |
| Permissions | permission:* | permission:permission_change |
| Metadata | meta:* | meta:add_metadata_key, meta:delete_metadata_key |
| Workflows | — | workflow:created, workflow:completed, workflow:approvaltask_approved, workflow:approvaltask_rejected |
| Groups | — | group:create, group:delete, group:rename, group:add_members, group:remove_members, group:add_owner, group:remove_owner |
File System (fs:*)
Subscribable via fs:* or specific event names.
fs:add_file—targetEntryId,targetGroupId,targetFileChecksum,targetPath,itemType('file'or'version')fs:add_folder—targetPathfs:copy_file—sourcePath,targetPath,targetEntryId,targetGroupId,targetFileChecksumfs:copy_folder—sourcePath,targetPathfs:move_file—sourcePath,targetPath,targetGroupId,targetEntryIdfs:move_folder—sourcePath,targetPathfs:delete_file—targetGroupId,targetEntryId,targetPath,targetFileChecksum,itemType(optional)fs:delete_folder—targetPathfs:restore_from_trash—targetPath,isFolder(boolean); alsotargetEntryId,targetGroupId,targetFileChecksum,itemType(optional) for filesfs:delete_from_trash—targetPathfs:lock_file—targetEntryId,targetGroupId,targetFileChecksum,targetPathfs:unlock_file—targetEntryId,targetGroupId,targetFileChecksum,targetPathfs:upload_link—uploadLinkUrl,filePath,fileChecksum,fileGroupId,fileEntryIdfs:folder_project_activity—targetPath
Links (link:*)
Subscribable via link:* or specific event names.
link:create— (no additional fields)link:create_download_link—sourcePath,linkId,linkType('file'or'folder'),linkURLlink:create_upload_link—sourcePath,linkId,linkType('upload'),linkURLlink:delete— (no additional fields)link:delete_download_link—sourcePath,linkId,linkType('file'or'folder'),linkURLlink:delete_upload_link—sourcePath,linkId,linkType('upload'),linkURL
Comments (comment:*)
Subscribable via comment:* or specific event names.
comment:set_comment—targetPath,commentcomment:remove_comment—targetPath, optionalcomment
Permissions (permission:*)
Subscribable via permission:* or permission:permission_change.
permission:permission_change—folderPath,newPrivilege,oldPrivilege,assignerId; nullable:assignee,assigneeId,assigner,groupName
Groups
No wildcard is available for group events. Subscribe using specific event names.
All group events include user (id, fullName, userName, email), groupName, and groupId.
group:create—members(array),ownergroup:delete— (no additional fields)group:rename— (no additional fields)group:add_members—members(array)group:remove_members—members(array)group:add_owner—ownergroup:remove_owner—owner
Workflows
No wildcard is available for workflow events. Subscribe using specific event names.
All workflow events include:
workflowobject:id,name,displayId,type,actionStatus, optionaltemplateIdfirstEntityobject:type,filePath,entryID,groupID
Events:
workflow:created— additionallydefinitionJsonworkflow:completed— additionallycompletionStatusCode,totalNumberOfSteps,completionDateworkflow:approvaltask_approved— additionallystep(id,name,type),assignee(id,displayName,username,email),totalNumberOfSteps,completionDate,creationDateworkflow:approvaltask_rejected— same asworkflow:approvaltask_approved
Additional workflow events (workflow:edited, workflow:cancelled, step events, workflow:esignature_captured, etc.) are planned but not yet implemented.
Metadata (meta:*)
Subscribable via meta:* or specific event names.
meta:add_metadata_key—targetPath,targetGroupId,namespace,keymeta:delete_metadata_key—targetPath,targetGroupId,namespace,key
User Provisioning (user:*)
user:create, user:delete, user:disable, user:enable events are implemented in the backend but not yet supported in v1. They will be available in a future release.
Error Codes
All error responses share a common JSON structure:
{
"code": "hook_invalid_url",
"message": "ENOTFOUND notexistingdomainname.com",
"details": "..."
}
| Field | Type | Description |
|---|---|---|
code | string | Machine-readable error code |
message | string | Human-readable description of the error |
details | string | (Optional) Additional context |
Error Codes
| Status | Error Code | Description | Resolution |
|---|---|---|---|
| 400 | request_schema_error | Invalid request body or parameters | Verify JSON syntax and required fields. Ensure eventType values are valid and path contains no more than 100 entries. |
| 400 | hook_invalid_url | Invalid webhook URL format | Ensure the url field is a valid HTTPS URL. |
| 401 | gateway_error_forbidden_not_authorized | Invalid or expired token | Refresh your OAuth token. |
| 403 | missing_scope_error | Missing required OAuth scope | Ensure your token includes the Egnyte.webhooks scope. |
| 404 | hook_not_found_error | Webhook ID does not exist | Verify the webhookId is correct and belongs to your client ID. |
| 409 | hook_quota_error | Webhook quota exceeded | You have reached the maximum number of webhooks for this client ID and domain. Delete unused webhooks before registering new ones. |
| 500 | — | Unexpected server error | Retry the request. If the issue persists, contact api-support@egnyte.com. |
Code Examples
POST /pubapi/v1/webhooks
curl -i -X POST "https://{domain}.egnyte.com/pubapi/v1/webhooks" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -d '{"url":"https://example.com/webhook","eventType":["fs:add_file","fs:delete_file"],"path":"/Shared/Documents","authHeader":"Bearer my-secret-token"}'
GET /pubapi/v1/webhooks
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/webhooks" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
GET /pubapi/v1/webhooks/{wh['webhookId']}/details
curl -i -X GET "https://{domain}.egnyte.com/pubapi/v1/webhooks/{wh['webhookId']}/details" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Webhooks vs. Events API
| Feature | Webhooks | Events API |
|---|---|---|
| Delivery model | Push (Egnyte sends to you) | Pull (you poll Egnyte) |
| Latency | Near real-time | Depends on polling interval |
| Infrastructure | Requires publicly accessible HTTPS endpoint | No endpoint required |
| Event filtering | Subscribe to specific event types at registration | Query all events, filter client-side |
| Retries | Automatic with fixed backoff (immediate, 1 min, 10 min, 1 hour); disabled after exhaustion | Manual retry logic required |
| Best for | Real-time integrations, automation | Batch processing, historical analysis |
Related Resources
- Events API — Poll-based event retrieval for historical data
- Authentication — How to obtain OAuth tokens for webhook registration
- Best Practices — Rate limiting, error handling, and security recommendations
