Synchronizing
Architectural Primitives

Webhooks and callbacks

Receive signed application updates, then retrieve current state from the API. Register once for your workflow and use the same receiver across applications in your tenant.

Start with the quickstart for runnable client and receiver examples. Management requests use a server API key with webhooks:manage. Delivery signatures use a separate signing secret.

Set up once

  1. Prepare a public HTTPS receiver that captures raw bytes and durably accepts events.
  2. Register its URL and explicit application event subscriptions. Store the one-time secret privately.
  3. Send webhook.test to check connectivity and signatures. This synchronous direct send does not establish queued application delivery.
  4. Exercise real application submission and information-request workflows, then check delivery diagnostics and current-state reconciliation.

Callbacks are HTTP POST requests to your backend. There is no callbackUrl on application creation. Browser handoff uses the returned loginUrl; redirectPath selects a page inside the portal.

Management endpoints

Method and pathPurpose
POST /v1/webhooksRegister an endpoint and capture its signing secret once.
GET /v1/webhooksList non-retired tenant registrations and delivery health.
PATCH /v1/webhooks/{id}Change receiver URL, full event subscriptions, label or enabled state.
POST /v1/webhooks/{id}/testSend a synchronous signed webhook.test diagnostic.
POST /v1/webhooks/{id}/rotate-secretIssue a new signing secret with bounded overlap.
DELETE /v1/webhooks/{id}Retire an endpoint and release its registration slot.
GET /v1/webhooks/{id}/deliveriesInspect safe delivery diagnostics, including retired endpoint history.

All response fields are enumerated below. Always means the key is present, even if its type permits null. Within parent means the field is present in each containing object; conditional labels identify event or response variants. Read shared errors and optional request replay.

POST /v1/webhooks

Register an endpoint and capture its signing secret once.

Required scope: webhooks:manage.

Request. Send a JSON body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Content-TypeRequiredstring (header)application/json.
Idempotency-KeyOptionalstring (header)Optional: one stable operation key, 1 to 128 visible ASCII characters, no whitespace or duplicate header lines. Matching successful requests replay within 24 hours. See request replay below.
urlRequiredstring (body)Public HTTPS URL, at most 2048 characters, hostname at most 253 characters, port 443. No IP literals, private/special addresses, user information, fragments or redirects.
eventsRequiredstring[] (body)1 to 20 unique filters. Exact application names or matching prefix wildcards; * must stand alone. Empty/unknown filters and webhook.test are refused.
events[]Within supplied eventsstringExact application name or accepted wildcard; see the catalogue. No duplicates.
descriptionOptionalstring (body)Optional label, at most 500 Unicode code points. Default empty string. Null is not accepted.
Example request
POST /v1/webhooks HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>
Idempotency-Key: <one-operation-key>
Content-Type: application/json

{
  "url": "https://integrations.example.com/aegis/events",
  "events": [
    "application.status.changed",
    "application.info_request.raised"
  ],
  "description": "Onboarding updates"
}

Response 200: first successful execution. JSON body.

Example response
{
  "id": "wh_123",
  "url": "https://integrations.example.com/aegis/events",
  "events": [
    "application.status.changed",
    "application.info_request.raised"
  ],
  "status": "enabled",
  "description": "Onboarding updates",
  "createdAt": "2026-09-10T09:00:00.000Z",
  "updatedAt": "2026-09-10T09:00:00.000Z",
  "disabledAt": null,
  "disabledReason": null,
  "consecutiveFailures": 0,
  "lastSuccessAt": null,
  "lastFailureAt": null,
  "secret": "<one-time-signing-secret>"
}
FieldTypeDescription
idAlwaysstringRegistration ID. Keep it for update, rotation, retirement and diagnostics.
urlAlwaysstring | nullRegistered HTTPS URL, maximum 2048 characters.
eventsAlwaysstring[]Complete subscription array, 1 to 20 unique filters.
events[]Within eventsstringAn exact application event name, * alone, or a prefix wildcard matching the catalogue, such as application.* or application.info_request.*.
statusAlwaysstring | nullenabled or disabled. Retired registrations are omitted from this response.
descriptionAlwaysstring | nullLabel, at most 500 Unicode code points. Empty or omitted description is returned as null.
createdAtAlwaysstring | nullRFC 3339 UTC creation timestamp.
updatedAtAlwaysstring | nullRFC 3339 UTC last update timestamp.
disabledAtAlwaysstring | nullWhen the endpoint was disabled, otherwise null.
disabledReasonAlwaysstring | nullmanual, http_410, invalid_failure_metadata, consecutive_delivery_failures or no_success_24h; null while enabled.
consecutiveFailuresAlwaysnumber | nullConsecutive deliveries reaching terminal failure, not every failed HTTP attempt. Resets after a successful delivery or disabled-to-enabled transition.
lastSuccessAtAlwaysstring | nullLast successful delivery time, otherwise null.
lastFailureAtAlwaysstring | nullLast terminal delivery failure time, otherwise null. Cleared on re-enable.
secretFirst response onlystringOpaque UTF-8 signing secret, disclosed only in the first create/rotate response.

Request replay

With Idempotency-Key, the first successful response has Aegis-Idempotency-Replayed: false; a matching completed replay has Aegis-Idempotency-Replayed: true. Both have a fresh Aegis-Request-Id. Without the request header, the replay response header is absent. Read key validation, expiry, conflicts and recovery.

Response 200: matching replay
{
  "id": "wh_123",
  "replayed": true
}
FieldTypeDescription
idAlways on replaystringIdentity of the resource from the completed operation.
replayedAlways on replaybooleanExactly true. No loginUrl, expiresAt, signing secret or other first-response fields are returned in this variant.

If you lost the secret, explicitly rotate this endpoint using a new operation key. An identity-only replay never discloses the earlier secret.

  • Registrations start enabled. Unknown body fields, a status on create, or invalid URL/subscriptions return 400 invalid-argument. Default cap: 5 endpoints; configured bounded values range from 1 to 50. Disabled endpoints occupy a slot, retired endpoints do not. Cap refusal: 400 failed-precondition.
  • Requires an active tenant. Capture the secret privately; do not log the response.

GET /v1/webhooks

List non-retired tenant registrations and delivery health.

Required scope: webhooks:manage.

Request. No request body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Example request
GET /v1/webhooks HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>

Response 200. JSON body.

Example response
{
  "data": [
    {
      "id": "wh_123",
      "url": "https://integrations.example.com/aegis/events",
      "events": [
        "application.status.changed",
        "application.info_request.raised"
      ],
      "status": "enabled",
      "description": "Onboarding updates",
      "createdAt": "2026-09-10T09:00:00.000Z",
      "updatedAt": "2026-09-10T09:00:00.000Z",
      "disabledAt": null,
      "disabledReason": null,
      "consecutiveFailures": 0,
      "lastSuccessAt": null,
      "lastFailureAt": null
    }
  ]
}
FieldTypeDescription
dataAlwaysobject[]Unpaged registrations, bounded by the configured cap (at most 50). Empty array when none exist.
data[].idWithin datastringRegistration ID. Keep it for update, rotation, retirement and diagnostics.
data[].urlWithin datastring | nullRegistered HTTPS URL, maximum 2048 characters.
data[].eventsWithin datastring[]Complete subscription array, 1 to 20 unique filters.
data[].events[]Within datastringAn exact application event name, * alone, or a prefix wildcard matching the catalogue, such as application.* or application.info_request.*.
data[].statusWithin datastring | nullenabled or disabled. Retired registrations are omitted from this response.
data[].descriptionWithin datastring | nullLabel, at most 500 Unicode code points. Empty or omitted description is returned as null.
data[].createdAtWithin datastring | nullRFC 3339 UTC creation timestamp.
data[].updatedAtWithin datastring | nullRFC 3339 UTC last update timestamp.
data[].disabledAtWithin datastring | nullWhen the endpoint was disabled, otherwise null.
data[].disabledReasonWithin datastring | nullmanual, http_410, invalid_failure_metadata, consecutive_delivery_failures or no_success_24h; null while enabled.
data[].consecutiveFailuresWithin datanumber | nullConsecutive deliveries reaching terminal failure, not every failed HTTP attempt. Resets after a successful delivery or disabled-to-enabled transition.
data[].lastSuccessAtWithin datastring | nullLast successful delivery time, otherwise null.
data[].lastFailureAtWithin datastring | nullLast terminal delivery failure time, otherwise null. Cleared on re-enable.
No registrations
{
  "data": []
}
  • Includes enabled and disabled endpoints, never retired endpoints. No secrets. Listing remains available while the tenant is suspended. Do not assume a list order.

PATCH /v1/webhooks/{id}

Change receiver URL, full event subscriptions, label or enabled state.

Required scope: webhooks:manage.

Request. Send a JSON body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Content-TypeRequiredstring (header)application/json.
Idempotency-KeyOptionalstring (header)Optional: one stable operation key, 1 to 128 visible ASCII characters, no whitespace or duplicate header lines. Matching successful requests replay within 24 hours. See request replay below.
idRequiredstring (path)Webhook endpoint ID returned by registration. Keep IDs opaque. A path ID is at most 1500 UTF-8 bytes; slash, dot-only segments and reserved double-underscore names are not addressable.
urlOptionalstring (body)Public HTTPS URL, at most 2048 characters, hostname at most 253 characters, port 443. No IP literals, private/special addresses, user information, fragments or redirects.
eventsOptionalstring[] (body)1 to 20 unique filters. Exact application names or matching prefix wildcards; * must stand alone. Empty/unknown filters and webhook.test are refused.
events[]Within supplied eventsstringExact application name or accepted wildcard; see the catalogue. No duplicates.
descriptionOptionalstring (body)Optional label, at most 500 Unicode code points. Default empty string. Null is not accepted.
statusOptionalstring (body)enabled or disabled. Omit to keep the current state.
Example request
PATCH /v1/webhooks/{id} HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>
Idempotency-Key: <one-operation-key>
Content-Type: application/json

{
  "status": "disabled"
}

Response 200: first successful execution. JSON body.

Example response
{
  "id": "wh_123",
  "url": "https://integrations.example.com/aegis/events",
  "events": [
    "application.status.changed",
    "application.info_request.raised"
  ],
  "status": "disabled",
  "description": "Onboarding updates",
  "createdAt": "2026-09-10T09:00:00.000Z",
  "updatedAt": "2026-09-10T09:00:00.000Z",
  "disabledAt": "2026-09-10T09:00:00.000Z",
  "disabledReason": "manual",
  "consecutiveFailures": 0,
  "lastSuccessAt": null,
  "lastFailureAt": null
}
FieldTypeDescription
idAlwaysstringRegistration ID. Keep it for update, rotation, retirement and diagnostics.
urlAlwaysstring | nullRegistered HTTPS URL, maximum 2048 characters.
eventsAlwaysstring[]Complete subscription array, 1 to 20 unique filters.
events[]Within eventsstringAn exact application event name, * alone, or a prefix wildcard matching the catalogue, such as application.* or application.info_request.*.
statusAlwaysstring | nullenabled or disabled. Retired registrations are omitted from this response.
descriptionAlwaysstring | nullLabel, at most 500 Unicode code points. Empty or omitted description is returned as null.
createdAtAlwaysstring | nullRFC 3339 UTC creation timestamp.
updatedAtAlwaysstring | nullRFC 3339 UTC last update timestamp.
disabledAtAlwaysstring | nullWhen the endpoint was disabled, otherwise null.
disabledReasonAlwaysstring | nullmanual, http_410, invalid_failure_metadata, consecutive_delivery_failures or no_success_24h; null while enabled.
consecutiveFailuresAlwaysnumber | nullConsecutive deliveries reaching terminal failure, not every failed HTTP attempt. Resets after a successful delivery or disabled-to-enabled transition.
lastSuccessAtAlwaysstring | nullLast successful delivery time, otherwise null.
lastFailureAtAlwaysstring | nullLast terminal delivery failure time, otherwise null. Cleared on re-enable.

Request replay

With Idempotency-Key, the first successful response has Aegis-Idempotency-Replayed: false; a matching completed replay has Aegis-Idempotency-Replayed: true. Both have a fresh Aegis-Request-Id. Without the request header, the replay response header is absent. Read key validation, expiry, conflicts and recovery.

A matching replay returns the same successful status and body shown above, including an empty body for 204. It describes the earlier operation; read the resource for current state. Current authorization and resource guards still apply.

  • At least one field is required. Unknown fields, empty patch or invalid values return 400. URL is revalidated when supplied. Missing, foreign or retired ID returns 404. Requires an active tenant.
  • Disabling cancels pending delivery work. Re-enable permits events occurring at or after re-enable, without reviving older work. An HTTP request already in flight may still arrive. Sending enabled to an already enabled endpoint does not reset its history.

POST /v1/webhooks/{id}/test

Send a synchronous signed webhook.test diagnostic.

Required scope: webhooks:manage.

Request. Send a JSON body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Content-TypeRequiredstring (header)application/json.
idRequiredstring (path)Webhook endpoint ID returned by registration. Keep IDs opaque. A path ID is at most 1500 UTF-8 bytes; slash, dot-only segments and reserved double-underscore names are not addressable.
Example request
POST /v1/webhooks/{id}/test HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>
Content-Type: application/json

{}

Response 200. JSON body.

Example response
{
  "delivered": true,
  "httpStatus": 204,
  "latencyMs": 83,
  "responseSnippet": "",
  "sentHeaders": {
    "Aegis-Webhook-Id": "evt_test_123",
    "Aegis-Webhook-Event": "webhook.test",
    "Aegis-Webhook-Attempt": "1",
    "Aegis-Webhook-Timestamp": "1789113600",
    "Aegis-Webhook-Signature": "v1=<lowercase-hex>",
    "Host": "integrations.example.com",
    "Content-Type": "application/json",
    "User-Agent": "Aegis-Webhooks/1.0",
    "Content-Length": 210,
    "Connection": "close"
  }
}
FieldTypeDescription
deliveredAlwaysbooleanTrue only if the receiver completed a successful 2xx response without a transport failure.
httpStatusAlwaysinteger | nullReceiver HTTP status when received, otherwise null. This is not the API response status.
latencyMsAlwaysnumberElapsed time in milliseconds, nonnegative.
responseSnippetAlwaysstringUp to the first 200 receiver-response bytes decoded as UTF-8. Empty if none; not persisted.
sentHeadersAlwaysobjectHeaders used for the attempted send, or {} if sending failed before headers were available.
sentHeaders.Aegis-Webhook-IdWhen headers availablestringEvent ID.
sentHeaders.Aegis-Webhook-EventWhen headers availablestringEvent type.
sentHeaders.Aegis-Webhook-AttemptWhen headers availablestringDecimal attempt number starting at 1, maximum configured attempts (at most 24). Test uses 1.
sentHeaders.Aegis-Webhook-TimestampWhen headers availablestringDecimal Unix seconds for this delivery attempt.
sentHeaders.Aegis-Webhook-SignatureWhen headers availablestringSpace-separated v1=lowercase-hex HMAC values, one per active secret (at most two).
sentHeaders.HostWhen headers availablestringReceiver hostname.
sentHeaders.Content-TypeWhen headers availablestringapplication/json.
sentHeaders.User-AgentWhen headers availablestringAegis-Webhooks/1.0.
sentHeaders.Content-LengthWhen headers availablenumberRaw request body byte count. Sent over HTTP as decimal text.
sentHeaders.ConnectionWhen headers availablestringclose.
Response 200: pre-send transport failure
{
  "delivered": false,
  "httpStatus": null,
  "latencyMs": 12,
  "responseSnippet": "",
  "sentHeaders": {}
}
  • Send exactly {}. Idempotency-Key is refused with 400 before any outbound request. Do not retry this external diagnostic automatically.
  • Works for enabled and disabled registrations, requires an active tenant, and refuses missing/foreign/retired registrations with 404. It sends directly, not through queued application delivery; it does not change failure counters or auto-disable the endpoint.

POST /v1/webhooks/{id}/rotate-secret

Issue a new signing secret with bounded overlap.

Required scope: webhooks:manage.

Request. Send a JSON body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Content-TypeRequiredstring (header)application/json.
Idempotency-KeyOptionalstring (header)Optional: one stable operation key, 1 to 128 visible ASCII characters, no whitespace or duplicate header lines. Matching successful requests replay within 24 hours. See request replay below.
idRequiredstring (path)Webhook endpoint ID returned by registration. Keep IDs opaque. A path ID is at most 1500 UTF-8 bytes; slash, dot-only segments and reserved double-underscore names are not addressable.
gracePeriodSecondsOptionalinteger (body)Optional, default 86400 seconds. Range 0 to 604800; null, nonintegers and out-of-range values return 400. Zero ends old-secret acceptance immediately.
Example request
POST /v1/webhooks/{id}/rotate-secret HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>
Idempotency-Key: <one-operation-key>
Content-Type: application/json

{
  "gracePeriodSeconds": 86400
}

Response 200: first successful execution. JSON body.

Example response
{
  "id": "wh_123",
  "secret": "<new-one-time-secret>",
  "previousSecretExpiresAt": "2026-09-12T09:00:00.000Z"
}
FieldTypeDescription
idAlwaysstringRegistration ID.
secretFirst response onlystringNew opaque UTF-8 signing secret. Store privately.
previousSecretExpiresAtFirst response onlystringRFC 3339 UTC expiry of the prior secret. With zero grace this is the rotation time.

Request replay

With Idempotency-Key, the first successful response has Aegis-Idempotency-Replayed: false; a matching completed replay has Aegis-Idempotency-Replayed: true. Both have a fresh Aegis-Request-Id. Without the request header, the replay response header is absent. Read key validation, expiry, conflicts and recovery.

Response 200: matching replay
{
  "id": "wh_123",
  "replayed": true
}
FieldTypeDescription
idAlways on replaystringIdentity of the resource from the completed operation.
replayedAlways on replaybooleanExactly true. No loginUrl, expiresAt, signing secret or other first-response fields are returned in this variant.

If you lost the secret, explicitly rotate this endpoint using a new operation key. An identity-only replay never discloses the earlier secret.

  • Empty body or {} uses the default. Unknown fields return 400. Requires active tenant and a non-retired owned endpoint; enabled and disabled endpoints can rotate.
  • At most two secret versions are active. Another rotation immediately removes the oldest version. Deliveries during overlap carry both signatures. Rotation does not change endpoint enabled state.

DELETE /v1/webhooks/{id}

Retire an endpoint and release its registration slot.

Required scope: webhooks:manage.

Request. No request body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
Idempotency-KeyOptionalstring (header)Optional: one stable operation key, 1 to 128 visible ASCII characters, no whitespace or duplicate header lines. Matching successful requests replay within 24 hours. See request replay below.
idRequiredstring (path)Webhook endpoint ID returned by registration. Keep IDs opaque. A path ID is at most 1500 UTF-8 bytes; slash, dot-only segments and reserved double-underscore names are not addressable.
Example request
DELETE /v1/webhooks/{id} HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>
Idempotency-Key: <one-operation-key>

Response 204: first successful execution. Empty body. Do not parse as JSON.

Request replay

With Idempotency-Key, the first successful response has Aegis-Idempotency-Replayed: false; a matching completed replay has Aegis-Idempotency-Replayed: true. Both have a fresh Aegis-Request-Id. Without the request header, the replay response header is absent. Read key validation, expiry, conflicts and recovery.

A matching replay returns the same successful status and body shown above, including an empty body for 204. It describes the earlier operation; read the resource for current state. Current authorization and resource guards still apply.

  • Retains an owned tombstone for diagnostics; does not promise a retention period. Repeating retirement of that owned endpoint returns 204, even without an operation key.
  • Cancels pending work and prevents new sends. Already in-flight HTTP requests cannot be recalled. List omits the endpoint; update, test and rotate refuse it with 404. Delivery diagnostics remain readable with the retained ID. Requires active tenant; foreign/missing IDs return 404.

GET /v1/webhooks/{id}/deliveries

Inspect safe delivery diagnostics, including retired endpoint history.

Required scope: webhooks:manage.

Request. No request body.

FieldTypeDescription
AuthorizationRequiredstring (header)Bearer aegis_<key-id>_<secret>. Use a server API key with the scope below.
idRequiredstring (path)Webhook endpoint ID returned by registration. Keep IDs opaque. A path ID is at most 1500 UTF-8 bytes; slash, dot-only segments and reserved double-underscore names are not addressable.
limitOptionalinteger (query)Page size 1 to 100, default 25.
cursorOptionalstring (query)Opaque nextCursor, 1 to 32768 characters. Bound to tenant, endpoint, state filter and limit. Omit on the first request.
stateOptionalstring (query)Optional: pending, delivering, delivered or dead. retrying and cancelled are not accepted filters.
Example request
GET /v1/webhooks/{id}/deliveries?limit=25&state=delivered HTTP/1.1
Host: aegis-api.theauroraedge.com
Authorization: Bearer aegis_<key-id>_<secret>

Response 200. JSON body.

Example response
{
  "data": [
    {
      "id": "evt_example_123_wh_123",
      "endpointId": "wh_123",
      "eventId": "evt_example_123",
      "type": "application.info_request.raised",
      "state": "delivered",
      "attempts": 1,
      "createdAt": "2026-09-10T09:00:00.000Z",
      "updatedAt": "2026-09-10T09:00:00.000Z",
      "firstAttemptAt": "2026-09-10T09:00:00.000Z",
      "lastAttemptAt": "2026-09-10T09:00:00.000Z",
      "nextAttemptAt": null,
      "deliveredAt": "2026-09-10T09:00:00.000Z",
      "lastStatusCode": 204,
      "lastError": null,
      "event": {
        "id": "evt_example_123",
        "type": "application.info_request.raised",
        "apiVersion": "v1",
        "occurredAt": "2026-09-10T09:00:00.000Z",
        "tenantId": "tenant_example",
        "idempotencyKey": "evt_example_123",
        "data": {
          "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
          "externalRef": "ORDER-88213",
          "status": "needs_info",
          "previousStatus": "pending",
          "sequence": 14,
          "requestId": "request_123",
          "requestSeq": 1,
          "round": 1,
          "openItems": 1,
          "comment": "Please supply a current licence.",
          "items": [
            {
              "itemId": "item_123",
              "type": "document",
              "prompt": "Upload the current trade licence."
            }
          ]
        }
      }
    }
  ],
  "nextCursor": null,
  "hasMore": false
}
FieldTypeDescription
dataAlwaysobject[]Delivery records. Empty when no records match.
data[].idWithin datastringDelivery identity, distinct from eventId.
data[].endpointIdWithin datastringRegistration ID, including a retained retired registration.
data[].eventIdWithin datastringStable application event ID.
data[].typeWithin datastringOne of the six application event names.
data[].stateWithin datastringpending, delivering, delivered or dead. There is no retrying or cancelled API state.
data[].attemptsWithin dataintegerNumber of attempts started, zero before the first send. pending with attempts > 0 is shown as retrying in the dashboard.
data[].createdAtWithin datastringRFC 3339 UTC record timestamp.
data[].updatedAtWithin datastringRFC 3339 UTC record timestamp.
data[].firstAttemptAtWithin datastring | nullRFC 3339 UTC time for this action, null if absent. nextAttemptAt is not a guarantee of exact arrival time.
data[].lastAttemptAtWithin datastring | nullRFC 3339 UTC time for this action, null if absent. nextAttemptAt is not a guarantee of exact arrival time.
data[].nextAttemptAtWithin datastring | nullRFC 3339 UTC time for this action, null if absent. nextAttemptAt is not a guarantee of exact arrival time.
data[].deliveredAtWithin datastring | nullRFC 3339 UTC time for this action, null if absent. nextAttemptAt is not a guarantee of exact arrival time.
data[].lastStatusCodeWithin datainteger | nullLast receiver HTTP status, 100 to 599, or null when none was received.
data[].lastErrorWithin datastring | nullSafe failure token from the failure catalogue below, or null. No raw exception or receiver body.
data[].eventWithin dataobject | nullSafe application envelope when its source event exists, otherwise null. No signature or receiver response is included.
data[].event.idWhen event is present; AlwaysstringOpaque event ID, stable across retries and endpoints. Up to 200 ASCII letters, digits, underscores or hyphens. Do not assume UUID formatting or parse its internal structure.
data[].event.typeWhen event is present; AlwaysstringOne of the six application event names above, or webhook.test.
data[].event.apiVersionWhen event is present; Alwaysstringv1.
data[].event.occurredAtWhen event is present; AlwaysstringRFC 3339 UTC occurrence time, not delivery time. May precede event allocation.
data[].event.tenantIdWhen event is present; AlwaysstringTenant identity; validate against your receiver configuration.
data[].event.idempotencyKeyWhen event is present; AlwaysstringExactly the event id. Not the outbound Idempotency-Key request header.
data[].event.dataWhen event is present; AlwaysobjectEvent-specific payload. Fields below have explicit type conditions.
data[].event.data.clientIdWhen event is present; Application eventsstringApplication ID.
data[].event.data.externalRefWhen event is present; Application eventsstring | nullYour application reference, or null.
data[].event.data.statusWhen event is present; Application eventsstringpending, needs_info, hold, pending_approval, active or rejected.
data[].event.data.previousStatusWhen event is present; Application eventsstring | nullPrevious status; null on submission, and can equal status when no transition occurred.
data[].event.data.sequenceWhen event is present; Application eventsintegerPositive event allocation sequence per application, not a snapshot version. Subscription gaps and out-of-order delivery are normal.
data[].event.data.reasonWhen event is present; status.changed onlystringdecision, info_request, pair_change or repair.
data[].event.data.requestIdWhen event is present; All info_request eventsstring | nullInformation-request ID, not the HTTP request diagnostic ID.
data[].event.data.requestSeqWhen event is present; All info_request eventsnumber | nullRequest sequence within the application.
data[].event.data.roundWhen event is present; All info_request eventsnumber | nullResponse round within the request.
data[].event.data.openItemsWhen event is present; info_request.raised onlynumber | nullCount of open and reopened items awaiting the applicant.
data[].event.data.commentWhen event is present; info_request.raised onlystring | nullApplicant-facing request cover note, or null. Limited to 2000 characters on entry. Not a decision comment.
data[].event.data.itemsWhen event is present; info_request.raised onlyobject[]Only items awaiting applicant action. May be empty; a request accepts at most 50 items.
data[].event.data.items[].itemIdWhen event is present; Within raised itemsstring | nullRequest item identity.
data[].event.data.items[].typeWhen event is present; Within raised itemsstring | nullquestion, field or document.
data[].event.data.items[].promptWhen event is present; Within raised itemsstring | nullApplicant-facing prompt, limited to 500 characters on entry. No answer value is included.
data[].event.data.answeredItemsWhen event is present; info_request.answered onlynumber | nullCount of answered items awaiting staff review.
data[].event.data.actorRoleWhen event is present; info_request.answered onlystringExactly customer.
nextCursorAlwaysstring | nullOpaque continuation token, null on the final page.
hasMoreAlwaysbooleanTrue when another page exists. No total count.
Empty diagnostics
{
  "data": [],
  "nextCursor": null,
  "hasMore": false
}
  • Sorts by createdAt descending, then delivery ID descending. Query limit is 65536 encoded characters. Unknown/duplicate query names, invalid filters and mismatched cursors return 400 invalid-argument. Requires active tenant and endpoint ownership, including retained retired endpoints.
  • The nested event can be null if the source event is absent. Never includes signatures, secret material, raw transport exceptions or receiver response bodies. No replay API or retention period is promised.

Application events and test diagnostic

EventWhenPayload additions
application.submittedApplicant submits. Status may remain pending.Common application fields only; previousStatus is null.
application.status.changedApplication status changes.reason: decision, info_request, pair_change or repair.
application.info_request.raisedA request is raised, items are added or answered items reopened.requestId, requestSeq, round, openItems, comment and awaiting-action items.
application.info_request.answeredApplicant submits a response round.requestId, requestSeq, round, answeredItems and actorRole: customer.
application.info_request.closedStaff accept the final answered item.requestId, requestSeq and round only, in addition to common fields.
application.info_request.cancelledA request is cancelled, manually or by an applicable application transition.requestId, requestSeq and round only, in addition to common fields.
webhook.testExplicit synchronous test send.data contains only endpointId. No application read is needed.

Subscribe to exact application names or a matching wildcard. webhook.test cannot be subscribed to; send it through the test route. A single action can emit a status event and a request event with distinct IDs and sequence numbers. Closed and cancelled request events have no actorRole, reason, comment, answers or internal terminal notes.

Envelope and every payload field

Raised request event
{
  "id": "evt_example_123",
  "type": "application.info_request.raised",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_example_123",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": "ORDER-88213",
    "status": "needs_info",
    "previousStatus": "pending",
    "sequence": 14,
    "requestId": "request_123",
    "requestSeq": 1,
    "round": 1,
    "openItems": 1,
    "comment": "Please supply a current licence.",
    "items": [
      {
        "itemId": "item_123",
        "type": "document",
        "prompt": "Upload the current trade licence."
      }
    ]
  }
}
FieldTypeDescription
idAlwaysstringOpaque event ID, stable across retries and endpoints. Up to 200 ASCII letters, digits, underscores or hyphens. Do not assume UUID formatting or parse its internal structure.
typeAlwaysstringOne of the six application event names above, or webhook.test.
apiVersionAlwaysstringv1.
occurredAtAlwaysstringRFC 3339 UTC occurrence time, not delivery time. May precede event allocation.
tenantIdAlwaysstringTenant identity; validate against your receiver configuration.
idempotencyKeyAlwaysstringExactly the event id. Not the outbound Idempotency-Key request header.
dataAlwaysobjectEvent-specific payload. Fields below have explicit type conditions.
data.clientIdApplication eventsstringApplication ID.
data.externalRefApplication eventsstring | nullYour application reference, or null.
data.statusApplication eventsstringpending, needs_info, hold, pending_approval, active or rejected.
data.previousStatusApplication eventsstring | nullPrevious status; null on submission, and can equal status when no transition occurred.
data.sequenceApplication eventsintegerPositive event allocation sequence per application, not a snapshot version. Subscription gaps and out-of-order delivery are normal.
data.reasonstatus.changed onlystringdecision, info_request, pair_change or repair.
data.requestIdAll info_request eventsstring | nullInformation-request ID, not the HTTP request diagnostic ID.
data.requestSeqAll info_request eventsnumber | nullRequest sequence within the application.
data.roundAll info_request eventsnumber | nullResponse round within the request.
data.openItemsinfo_request.raised onlynumber | nullCount of open and reopened items awaiting the applicant.
data.commentinfo_request.raised onlystring | nullApplicant-facing request cover note, or null. Limited to 2000 characters on entry. Not a decision comment.
data.itemsinfo_request.raised onlyobject[]Only items awaiting applicant action. May be empty; a request accepts at most 50 items.
data.items[].itemIdWithin raised itemsstring | nullRequest item identity.
data.items[].typeWithin raised itemsstring | nullquestion, field or document.
data.items[].promptWithin raised itemsstring | nullApplicant-facing prompt, limited to 500 characters on entry. No answer value is included.
data.answeredItemsinfo_request.answered onlynumber | nullCount of answered items awaiting staff review.
data.actorRoleinfo_request.answered onlystringExactly customer.
data.endpointIdwebhook.test onlystringRegistration ID. The only data field on webhook.test.
Examples for the other event variants
application.submitted
{
  "id": "evt_variant_0",
  "type": "application.submitted",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_0",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": null,
    "status": "pending",
    "previousStatus": null,
    "sequence": 1
  }
}
application.status.changed
{
  "id": "evt_variant_1",
  "type": "application.status.changed",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_1",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": "ORDER-88213",
    "status": "pending",
    "previousStatus": "needs_info",
    "sequence": 15,
    "reason": "info_request"
  }
}
application.info_request.answered
{
  "id": "evt_variant_2",
  "type": "application.info_request.answered",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_2",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": "ORDER-88213",
    "status": "pending",
    "previousStatus": "needs_info",
    "sequence": 16,
    "requestId": "request_123",
    "requestSeq": 1,
    "round": 1,
    "answeredItems": 1,
    "actorRole": "customer"
  }
}
application.info_request.closed
{
  "id": "evt_variant_3",
  "type": "application.info_request.closed",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_3",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": "ORDER-88213",
    "status": "pending",
    "previousStatus": "pending",
    "sequence": 17,
    "requestId": "request_123",
    "requestSeq": 1,
    "round": 1
  }
}
application.info_request.cancelled
{
  "id": "evt_variant_4",
  "type": "application.info_request.cancelled",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_4",
  "data": {
    "clientId": "a1b2c3d4-1111-4222-8333-123456789abc",
    "externalRef": "ORDER-88213",
    "status": "pending",
    "previousStatus": "pending",
    "sequence": 18,
    "requestId": "request_123",
    "requestSeq": 1,
    "round": 1
  }
}
webhook.test
{
  "id": "evt_variant_5",
  "type": "webhook.test",
  "apiVersion": "v1",
  "occurredAt": "2026-09-10T09:00:00.000Z",
  "tenantId": "tenant_example",
  "idempotencyKey": "evt_variant_5",
  "data": {
    "endpointId": "wh_123"
  }
}

Examples are independent scenarios. API and webhook projections exclude structured form answers, uploaded files, screening results and risk assessments. Names, applicant-facing prompts and free text may contain personal data. Decision comments are only available through application reads when explicitly shared with clients.

Verify before parsing JSON

Capture the exact raw bytes before JSON middleware. Compute HMAC-SHA256 over the decimal timestamp, a literal dot and the raw body, using the returned secret directly as an opaque UTF-8 string. Do not decode it or strip a prefix. Compare lowercase-hex v1 signatures in constant time and reject timestamps more than 300 seconds before or after your clock.

FieldTypeDescription
Aegis-Webhook-IdEvery signed sendstring (HTTP header)Event ID.
Aegis-Webhook-EventEvery signed sendstring (HTTP header)Event type.
Aegis-Webhook-AttemptEvery signed sendstring (HTTP header)Decimal attempt number starting at 1, maximum configured attempts (at most 24). Test uses 1.
Aegis-Webhook-TimestampEvery signed sendstring (HTTP header)Decimal Unix seconds for this delivery attempt.
Aegis-Webhook-SignatureEvery signed sendstring (HTTP header)Space-separated v1=lowercase-hex HMAC values, one per active secret (at most two).
HostEvery signed sendstring (HTTP header)Receiver hostname.
Content-TypeEvery signed sendstring (HTTP header)application/json.
User-AgentEvery signed sendstring (HTTP header)Aegis-Webhooks/1.0.
Content-LengthEvery signed sendstring (HTTP header)Raw request body byte count. Sent over HTTP as decimal text.
ConnectionEvery signed sendstring (HTTP header)close.
Node.js signature verification
import { createHmac, timingSafeEqual } from 'node:crypto';

export function verifyAegis(rawBody, timestamp, signature, secrets, now = Date.now()) {
  if (!Buffer.isBuffer(rawBody) || typeof timestamp !== 'string' || !/^\d+$/.test(timestamp)) return false;
  const seconds = Number(timestamp);
  if (!Number.isSafeInteger(seconds) || Math.abs(now / 1000 - seconds) > 300) return false;
  const candidates = String(signature ?? '').split(/\s+/)
    .filter(value => /^v1=[0-9a-f]{64}$/.test(value))
    .map(value => Buffer.from(value.slice(3), 'hex'));
  return secrets.some(secret => {
    if (typeof secret !== 'string' || !secret) return false;
    const expected = createHmac('sha256', secret)
      .update(timestamp + '.', 'utf8').update(rawBody).digest();
    return candidates.some(candidate =>
      candidate.length === expected.length && timingSafeEqual(candidate, expected));
  });
}

After verification, validate tenantId and the signed id/type against their headers. Atomically deduplicate and enqueue before returning a quick 2xx. Return failure if durable acceptance fails; a previously committed duplicate should receive 2xx without duplicate business work.

Retries, state and automatic disabling

BehaviorContract
Acknowledgement2xx is success. Redirects are failures and are not followed. Keep receiver bodies small; responses are bounded to 8192 bytes and may be discarded.
Timeout5-second connection timeout and 10-second total transport timeout.
Attempt and time boundsDefault 12 attempts including the first; configured bound 1 to 24. Stop at the attempt cap or 24 hours after the first attempt, whichever is reached first.
Backoff30 seconds times 2 to the power of attempts minus 1, capped at 6 hours, with a random delay between half and all of that nominal value.
Retry-AfterFor 429 or 503, one valid seconds value or HTTP date is honored, clamped between zero and 6 hours and within the remaining delivery window. Invalid or duplicate values use normal backoff.
pendingAwaiting the first send or another attempt. attempts > 0 is displayed as retrying in the dashboard.
deliveringAn attempt is in progress.
deliveredReceiver acknowledged successfully.
deadTerminal delivery. Includes exhausted attempts, expired window or lifecycle cancellation. Inspect lastError.
HTTP 410Automatically disables the endpoint with disabledReason http_410. It does not retire the registration or free a slot.
Other automatic disabling20 consecutive terminal delivery failures, or a terminal failure with no success for 24 hours. Invalid health metadata also fails closed. Staff are notified.
Fetch current state for every unseen event
Delivery is at least once and can be out of order. A larger sequence means later event allocation, not necessarily a newer state. Process every unseen verified event ID and GET the application. Serialize the read and save per application across workers. Keep deduplication durable across restarts.

Disable, re-enable, rotate and retire

PATCH status: disabled cancels pending work. Re-enabling allows events whose occurrence time is at or after re-enable. An older event does not become eligible merely because its fanout was delayed. Cancelled and terminal deliveries do not resume. An HTTP request already in flight may still arrive or finish.

Rotation supports up to two active secrets during its bounded grace period. Trust both privately during cutover, remove the old secret after previousSecretExpiresAt, and avoid a second rotation until you intend to discard the oldest version. With zero grace, the old secret ends immediately. If an operation-key replay returns only identity, explicitly rotate with a new key to recover a lost secret.

DELETE retires the registration, releases its slot and keeps an owned record for diagnostics. Save the ID before retirement; it disappears from GET webhooks. Retired endpoints cannot be updated, tested or rotated. No retention period or replay API is promised.

Diagnostic failure tokens

lastError is null or a safe token. HTTP tokens have the form webhook_http_NNN for a status from 100 to 599. Other possible values are listed here; do not treat a token as an instruction to repeat an unsafe operation.

lastError values
webhook_client_erased, webhook_client_mismatch, webhook_client_missing
webhook_delivery_invalid, webhook_delivery_mismatch, webhook_attempt_limit, webhook_delivery_expired
webhook_endpoint_disabled, webhook_endpoint_invalid, webhook_endpoint_mismatch
webhook_endpoint_missing, webhook_endpoint_retired, webhook_event_before_enable
webhook_event_invalid, webhook_event_mismatch, webhook_event_missing
webhook_tenant_inactive, webhook_unsubscribed, webhook_connect_timeout
webhook_connection_failed, webhook_destination_forbidden, webhook_dns_failed
webhook_http_error, webhook_response_failed, webhook_response_limit
webhook_signing_invalid, webhook_timeout, webhook_url_invalid

Recover current state independently

Inspect delivery diagnostics and endpoint health, fix the receiver, test signing, then re-enable if appropriate. Reconcile with an overlapping updatedSince application sweep at least daily, more often when faster recovery matters, independently of receiver availability. Save a checkpoint only after all pages succeed. This restores current state, not lost historical event detail.

Use the quickstart for executable client, receiver and worker patterns.