1. API
Einpix API documentation
  • Changelog
  • About
  • API
    • Task
      • Create
      • List
      • Detail
      • Change status
    • Checklist
      • By task
    • Client
      • Create
      • Update
      • List
      • Detail
    • User
      • List
      • Detail
    • Venue
      • Create
      • List
      • Detail
    • Category
      • Task
        • List
        • Detail
      • Equipment
        • List
    • Tag
      • List
      • Detail
    • Template
      • Checklist
        • List
        • Detail
    • Equipment
      • Create
      • Update
      • Delete
      • Change picture
      • Remove picture
      • Add attachments
      • Remove attachments
      • List
      • List by category
      • Detail
    • Comment
      • Create
      • Detail
      • List
    • Worklog
      • List
      • Hisory
    • Materials
      • By task
    • Service
      • By task
    • Webhook
      • List
      • Create
      • Delete
      • Update
  • Schemas
    • User
    • Venue
    • Task
    • Task comment
    • Tag
    • Task category
    • Picture
    • Check item
    • Equipment category
    • Equipment
    • Client
    • Task severity
    • Attachment
    • Changed log
    • User group
    • WDJ material
    • Unit master
    • WDJ service
    • Worklog History
    • CountryEnum
    • Checklist template
    • Worklog
    • Activity task
    • Downtime task
    • Sla rule
    • Webhook action
    • Webhook
    • WebhookEnumm
  1. API

Webhook

Overview#

Webhooks provide real-time notifications when specific actions occur in the system.
Clients can register multiple webhook endpoints, each with a unique name and a custom set of subscribed actions.
A webhook is triggered only when one of its subscribed actions occurs.
Webhooks are event notifications, not data payloads. After receiving a webhook, clients must fetch the latest data using the appropriate APIs.

Webhook Subscription Model#

Clients can create multiple webhooks
Each webhook must have:
A unique name
A public HTTPS endpoint
One or more actions
A single webhook can subscribe to multiple actions

Webhook Actions#

Supported Actions#

ActionDescription
task.createdTriggered when a task is created.
task.status.updatedTriggered when the task status is updated.
task.start_date.updatedTriggered when the task start date is updated.
task.end_date.updatedTriggered when the task end date is updated.
task.tags.updatedTriggered when task tags are added, removed, or updated.
task.category.updatedTriggered when the task category is updated.
task.requires_approval.updatedTriggered when the task requires-approval flag is updated.
task.checklist.updatedTriggered when the task checklist or its attachments are created or updated.
task.commentTriggered when a comment (with or without attachments) is created
client.createdTriggered when a client is created.
equipment.createdTriggered when equipment is created.
venue.createdTriggered when a venue is created.
task_category.createdTriggered when a task category is created.
user.createdTriggered when a user is created.
tag.createdTriggered when a tag is created.
checklist_template.createdTriggered when a checklist template is created.
worklog.createdTriggered when a worklog is created.
worklog.updatedTriggered when a worklog is updated.
worklog.deletedTriggered when a worklog is deleted.
task_material.createdTriggered when task material is created.
task_material.updatedTriggered when task material is updated.
task_material.deletedTriggered when task material is deleted.

1. Create Webhook#

Endpoint#

POST /webhooks

Description#

Registers a new webhook with a unique name and a set of subscribed actions.

Request Body#

{
  "name": "task-and-worklog-events",
  "url": "https://client-domain.com/webhooks/einpix",
  "actions": [
    "task.created",
    "task.updated",
    "worklog.created"
  ],
}

Validation Rules#

name must be unique per client
url must be a public HTTPS endpoint and should allow POST data
actions must contain at least one valid action
Duplicate actions are not allowed

Success Response#

{
  "id": 12,
  "name": "task-and-worklog-events",
  "url": "https://client-domain.com/webhooks/einpix",
  "actions": [
    "task.created",
    "task.updated",
    "worklog.created"
  ],
  "status": "active",
  "created": "2026-01-28T10:30:00Z"
}

2. Update Webhook#

Endpoint#

PUT /webhooks/{webhookId}

Description#

Updates the webhook name, URL, or subscribed actions.

Request Body#

{
  "name": "task-events-only",
  "actions": [
    "task.created",
    "task.updated",
    "task.deleted"
  ]
}

Success Response#

{
  "id": 12,
  "status": "updated"
}

3. Delete Webhook#

Endpoint#

DELETE /webhooks/{webhookId}

Description#

Deletes an existing webhook subscription.

Success Response#

{
  "status": "deleted"
}

Webhook Event Delivery#

Webhook Callback (Client Endpoint)#

When a subscribed action occurs, a webhook request is sent to the registered URL.

Webhook Payload#

Standard Payload Format#

{
  "entity": "task | worklog | category",
  "id": 1
}

Field Description#

FieldTypeDescription
entitystringEntity affected by the action.
idintegerUnique identifier of the affected entity.
ℹ️ The action type is inferred from the webhook subscription and optional headers.

Webhook Headers#

Content-Type: application/json
X-Webhook-Action: task.updated
X-Webhook-Name: task-and-worklog-events
X-Webhook-Signature: sha256=abc123...
HeaderDescription
X-Webhook-ActionAction that triggered the webhook.
X-Webhook-NameName of the webhook.
X-Webhook-SignatureHMAC signature used to verify the authenticity of the webhook request (Using api secret key).

Example Webhook Requests#

Task Updated Event#

POST /webhooks/einpix

{
  "action": "task.status.changed",
  "id": 101
}

Worklog Created Event#

POST /webhooks/einpix

{
  "entity": "worklog.created",
  "id": 55
}

Task Checklist Updated#

POST /webhooks/einpix

{
  "entity": "task.checklist.changed",
  "id": 55,
  "task_id": 1
}

Task Comment Created#

POST /webhooks/einpix

{
  "entity": "task.comment.added",
  "id": 55,
  "task_id": 1
}

Expected Client Response#

Clients must return a 2xx HTTP status code.
HTTP/1.1 200 OK
Non-2xx responses will trigger retries.

Error Handling & Retry Policy#

Automatic retries on failure
Possible duplicate deliveries
Clients must implement idempotent processing

Security Best Practices#

✔ HTTPS endpoints only
✔ Verify webhook signatures
✔ Log webhook deliveries
✔ Do not process unverified payloads

Troubleshooting#

Webhook Not Triggered#

Verify webhook is active
Ensure action is subscribed
Check endpoint accessibility

Signature Verification Failed#

Ensure the correct secret is used
Validate the raw request body
Modified at 2026-02-02 06:23:56
Previous
By task
Next
List
Built with