1 endpoints. Send your API key as Authorization: Bearer <key> on each request; see The API and AI assistants for keys, errors, idempotency and the conventions every endpoint shares.
PUT /api/webhooks/{id}/events
Choose the events a webhook gets (owners and admins, signed in to the web app)
events is the whole list (an empty list sends nothing). Alert events: incident.opened, incident.resolved, incident.reminder, certificate.expiring, domain.expiring. Task, comment and issue events, for a signed JSON webhook only: task.created, task.updated, task.status_changed, task.deleted, comment.created, issue.opened, issue.resolved. The first time task, comment or issue events are chosen, send agreed: true to the wording in work_agreement_text from GET /api/webhooks; the person and time are stored. Each event is sent as POST with JSON, signed like an alert (X-AperioFlow-Event, X-AperioFlow-Timestamp, X-AperioFlow-Signature: v1= and the hex HMAC-SHA256 of timestamp + "." + body), retried 3 times (after 1, 5 and 30 minutes). Every body has event, test (false), id (the event's id: use it to ignore a repeat), occurred_at and sent_at. A task event adds task: id, key, project_id, phase_id, name, status, priority, start_date, due_date, owner_user_id and link, plus changed (the names of the fields that changed, never their values) on task.updated, and status (from, to) on task.status_changed; task.deleted has only the task's id and project_id. comment.created has comment_on (type, id, project_id), never the comment's text. An issue event has issue: id, project_id, title, level, status, event_count, first_seen, last_seen, resolved_at and link. Descriptions, comments, custom field values, attachments and people's names and email addresses are never sent.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | integer | Yes | From 1 to 2147483647. |
Request body (application/json, required).
| Field | Type | Required | Description |
|---|---|---|---|
events | array of string | Yes | The events this webhook gets. |
agreed | boolean | No | true the first time task, comment or issue events are chosen. |
Responses:
| Status | Meaning |
|---|---|
| 200 | The webhook, with events, work_agreed_at and work_agreement_version (both null until someone agrees to the current wording) |
| 400 | The request body is invalid or is not valid JSON (Error) |
| 401 | Missing or invalid API key (Error) |
| 403 | Not an admin or owner |
| 404 | Item (or its parent) does not exist (Error) |