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 authorization header whose value is the authHeader you 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

FieldTypeRequiredDescription
urlstringYesThe HTTPS endpoint where Egnyte will send event notifications
eventTypearray of stringsNoList 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.
pathstringNoComma-separated list of folder paths to monitor (e.g., /Shared/Documents/Invoices,/Shared/Documents/Samples). If omitted, monitors all paths. Maximum 100 paths.
authHeaderstringNoCustom 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

FieldTypeDescription
webhookIdstringUnique identifier for the registered webhook
expiresintegerUnix timestamp when the webhook registration expires
statusstringCurrent 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.

FieldTypeDescription
webhookIdstringUnique identifier for the webhook
expiresintegerUnix timestamp when the webhook registration expires
statusstringCurrent 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

ParameterTypeRequiredDescription
webhookIdstringYesID 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

FieldTypeDescription
webhookIdstringUnique identifier for the webhook
urlstringEndpoint receiving webhook notifications
eventTypearray of stringsSubscribed event types
pathstringComma-separated list of monitored paths
authHeaderstringCustom authorization header value
expiresintegerUnix timestamp when the webhook registration expires
statusstringCurrent 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

ParameterTypeRequiredDescription
webhookIdstringYesID 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

FieldTypeDescription
webhookIdstringUnique identifier for the webhook
expiresintegerUnix timestamp when the webhook registration expires
statusstringCurrent 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

ParameterTypeRequiredDescription
webhookIdstringYesID of the webhook

Request Body

FieldTypeRequiredDescription
statusstringYesNew 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

FieldTypeDescription
webhookIdstringUnique identifier for the webhook
expiresintegerUnix timestamp when the webhook registration expires
statusstringUpdated 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

ParameterTypeRequiredDescription
webhookIdstringYesID of the webhook to update

Request Body

FieldTypeRequiredDescription
urlstringYesThe HTTPS endpoint where Egnyte will send event notifications
eventTypearray of stringsNoList of event types to subscribe to. Minimum 1 item if provided.
pathstringNoComma-separated list of folder paths to monitor. Maximum 100 paths.
authHeaderstringNoCustom authorization header value
statusstringNoWebhook 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

ParameterTypeRequiredDescription
webhookIdstringYesID 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

FieldTypeDescription
clientIdstringOAuth client ID of the application
usernamestringUsername of the authenticated user
domainstringEgnyte domain name
scopesarray of stringsOAuth 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:

FieldTypeDescription
eventIdstringUnique per Egnyte domain; use for deduplication
domainstringThe Egnyte domain where the event occurred
timestampintegerUnix timestamp in milliseconds
userobjectUser who triggered the event (see below)
actionSourcestringAPI or client used to perform the action
eventTypestringCanonical event name (e.g. fs:add_file). When an event maps to multiple names, this is always the most specific.
webhookIdstringID of the webhook registration
customPropertiesobject(Optional) Whitelisted subset of internal event properties: PROJECT_ID, PROJECT_ROOT_FOLDER_ID, FOLDER_PROJECT_ACTIVITY_ACTION_INFO, fileUpdated
dataobjectEvent-specific payload. Schema varies by eventType (see Event Types below).

User Object Fields

FieldTypeDescription
idintegerUser ID
displayNamestringUser's display name
usernamestringUsername
emailstringEmail address
clientIdHashstring(Optional) SHA1 hash of the OAuth clientId that caused the event — useful for filtering out your own application's actions
impersonatedBystring(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.

CategoryWildcardSpecific Events
File Systemfs:*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
Linkslink:*link:create, link:create_download_link, link:create_upload_link, link:delete, link:delete_download_link, link:delete_upload_link
Commentscomment:*comment:set_comment, comment:remove_comment
Permissionspermission:*permission:permission_change
Metadatameta:*meta:add_metadata_key, meta:delete_metadata_key
Workflowsworkflow:created, workflow:completed, workflow:approvaltask_approved, workflow:approvaltask_rejected
Groupsgroup: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_filetargetEntryId, targetGroupId, targetFileChecksum, targetPath, itemType ('file' or 'version')
  • fs:add_foldertargetPath
  • fs:copy_filesourcePath, targetPath, targetEntryId, targetGroupId, targetFileChecksum
  • fs:copy_foldersourcePath, targetPath
  • fs:move_filesourcePath, targetPath, targetGroupId, targetEntryId
  • fs:move_foldersourcePath, targetPath
  • fs:delete_filetargetGroupId, targetEntryId, targetPath, targetFileChecksum, itemType (optional)
  • fs:delete_foldertargetPath
  • fs:restore_from_trashtargetPath, isFolder (boolean); also targetEntryId, targetGroupId, targetFileChecksum, itemType (optional) for files
  • fs:delete_from_trashtargetPath
  • fs:lock_filetargetEntryId, targetGroupId, targetFileChecksum, targetPath
  • fs:unlock_filetargetEntryId, targetGroupId, targetFileChecksum, targetPath
  • fs:upload_linkuploadLinkUrl, filePath, fileChecksum, fileGroupId, fileEntryId
  • fs:folder_project_activitytargetPath

Subscribable via link:* or specific event names.

  • link:create — (no additional fields)
  • link:create_download_linksourcePath, linkId, linkType ('file' or 'folder'), linkURL
  • link:create_upload_linksourcePath, linkId, linkType ('upload'), linkURL
  • link:delete — (no additional fields)
  • link:delete_download_linksourcePath, linkId, linkType ('file' or 'folder'), linkURL
  • link:delete_upload_linksourcePath, linkId, linkType ('upload'), linkURL

Comments (comment:*)

Subscribable via comment:* or specific event names.

  • comment:set_commenttargetPath, comment
  • comment:remove_commenttargetPath, optional comment

Permissions (permission:*)

Subscribable via permission:* or permission:permission_change.

  • permission:permission_changefolderPath, 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:createmembers (array), owner
  • group:delete — (no additional fields)
  • group:rename — (no additional fields)
  • group:add_membersmembers (array)
  • group:remove_membersmembers (array)
  • group:add_ownerowner
  • group:remove_ownerowner

Workflows

No wildcard is available for workflow events. Subscribe using specific event names.

All workflow events include:

  • workflow object: id, name, displayId, type, actionStatus, optional templateId
  • firstEntity object: type, filePath, entryID, groupID

Events:

  • workflow:created — additionally definitionJson
  • workflow:completed — additionally completionStatusCode, totalNumberOfSteps, completionDate
  • workflow:approvaltask_approved — additionally step (id, name, type), assignee (id, displayName, username, email), totalNumberOfSteps, completionDate, creationDate
  • workflow:approvaltask_rejected — same as workflow: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_keytargetPath, targetGroupId, namespace, key
  • meta:delete_metadata_keytargetPath, 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": "..."
}
FieldTypeDescription
codestringMachine-readable error code
messagestringHuman-readable description of the error
detailsstring(Optional) Additional context

Error Codes

StatusError CodeDescriptionResolution
400request_schema_errorInvalid request body or parametersVerify JSON syntax and required fields. Ensure eventType values are valid and path contains no more than 100 entries.
400hook_invalid_urlInvalid webhook URL formatEnsure the url field is a valid HTTPS URL.
401gateway_error_forbidden_not_authorizedInvalid or expired tokenRefresh your OAuth token.
403missing_scope_errorMissing required OAuth scopeEnsure your token includes the Egnyte.webhooks scope.
404hook_not_found_errorWebhook ID does not existVerify the webhookId is correct and belongs to your client ID.
409hook_quota_errorWebhook quota exceededYou have reached the maximum number of webhooks for this client ID and domain. Delete unused webhooks before registering new ones.
500Unexpected server errorRetry 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

FeatureWebhooksEvents API
Delivery modelPush (Egnyte sends to you)Pull (you poll Egnyte)
LatencyNear real-timeDepends on polling interval
InfrastructureRequires publicly accessible HTTPS endpointNo endpoint required
Event filteringSubscribe to specific event types at registrationQuery all events, filter client-side
RetriesAutomatic with fixed backoff (immediate, 1 min, 10 min, 1 hour); disabled after exhaustionManual retry logic required
Best forReal-time integrations, automationBatch processing, historical analysis

  • 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