Subscriptions
Operations
| Operation | Scope | Description |
|---|---|---|
POST /subscriptions | write:webhook-subscriptions | Create a subscription. |
GET /subscriptions | read:webhook-subscriptions | List active subscriptions, oldest first. |
GET /subscriptions/{id} | read:webhook-subscriptions | A single subscription, with its 100 most recent deliveries. |
PUT /subscriptions/{id} | write:webhook-subscriptions | Update a subscription. |
DELETE /subscriptions/{id} | write:webhook-subscriptions | Delete a subscription (204, or 404 if it doesn't exist). |
GET /subscriptions/{id}/deliveries | read:webhook-subscriptions | Delivery history, newest first. |
All paths are relative to /webhooks/{tenantIdentifier}. List operations use page and pageSize. See Pagination.
Creating a subscription
POST /webhooks/acme/subscriptions
Content-Type: application/json
{
"url": "https://integrations.example.com/agencymax/webhooks",
"events": [
"AgencyMax.AgencyManagement.Events.AgentCreated",
"AgencyMax.AgencyManagement.Events.AgentUpdated"
],
"description": "CRM agent sync",
"headers": { "X-Integration": "crm" }
}
| Field | Required | Notes |
|---|---|---|
url | Yes | Your HTTPS endpoint. |
events | Yes | One or more event types. |
description | No | Free text to help you identify the subscription. |
headers | No | Custom headers sent with every delivery, for example a static token your endpoint checks. |
maxRetries | No | Default 3. Stored, but not yet applied. See Retries. |
retryDelayMinutes | No | Default 1. Stored, but not yet applied. See Retries. |
The response is 201 Created:
{
"id": "0d6f3c5e-1f7b-4f0e-8a3c-3a9b8f7e2c10",
"url": "https://integrations.example.com/agencymax/webhooks",
"secret": "q8Vt0m3kz1fW9YhP4cXo2bN7uLrS5aDe6gJiKlMnOpQ=",
"events": [
"AgencyMax.AgencyManagement.Events.AgentCreated",
"AgencyMax.AgencyManagement.Events.AgentUpdated"
],
"isActive": true,
"createdAt": "2026-09-24T15:02:11Z",
"description": "CRM agent sync",
"maxRetries": 3,
"retryDelay": 1,
"headers": { "X-Integration": "crm" }
}
:::important Store the secret
The secret is generated by AgencyMax (32 random bytes, base64-encoded) and used to sign every delivery. Keep it in your secret store.
:::
Updating a subscription
PUT /subscriptions/{id} changes only the properties you send: url, events, isActive, description, headers, maxRetries and retryDelayMinutes. Anything you leave out stays as it is.
To pause deliveries without losing the subscription, set isActive to false. Inactive subscriptions don't appear in GET /subscriptions, but you can still fetch them by id.
Delivery history
GET /subscriptions/{id}/deliveries lists delivery attempts, newest first:
| Field | Description |
|---|---|
id | The delivery id, also sent as X-Webhook-Id. |
eventId | The id of the event delivered. |
url | The URL the delivery was sent to. |
payload | The JSON body that was sent. |
attemptNumber | 1 for the first attempt, increasing with each retry. |
attemptedAt | When the attempt was made (UTC). |
isSuccessful | true if your endpoint returned a 2xx status. |
httpStatusCode | The status code your endpoint returned. |
response | Your endpoint's response body, cut to 10,000 characters. |
responseTime | How long your endpoint took to respond. |
errorMessage | The error for failed attempts, such as a timeout or connection failure. |
Use the delivery history to troubleshoot your endpoint.