Skip to main content

Subscriptions

Operations​

OperationScopeDescription
POST /subscriptionswrite:webhook-subscriptionsCreate a subscription.
GET /subscriptionsread:webhook-subscriptionsList active subscriptions, oldest first.
GET /subscriptions/{id}read:webhook-subscriptionsA single subscription, with its 100 most recent deliveries.
PUT /subscriptions/{id}write:webhook-subscriptionsUpdate a subscription.
DELETE /subscriptions/{id}write:webhook-subscriptionsDelete a subscription (204, or 404 if it doesn't exist).
GET /subscriptions/{id}/deliveriesread:webhook-subscriptionsDelivery 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" }
}
FieldRequiredNotes
urlYesYour HTTPS endpoint.
eventsYesOne or more event types.
descriptionNoFree text to help you identify the subscription.
headersNoCustom headers sent with every delivery, for example a static token your endpoint checks.
maxRetriesNoDefault 3. Stored, but not yet applied. See Retries.
retryDelayMinutesNoDefault 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:

FieldDescription
idThe delivery id, also sent as X-Webhook-Id.
eventIdThe id of the event delivered.
urlThe URL the delivery was sent to.
payloadThe JSON body that was sent.
attemptNumber1 for the first attempt, increasing with each retry.
attemptedAtWhen the attempt was made (UTC).
isSuccessfultrue if your endpoint returned a 2xx status.
httpStatusCodeThe status code your endpoint returned.
responseYour endpoint's response body, cut to 10,000 characters.
responseTimeHow long your endpoint took to respond.
errorMessageThe error for failed attempts, such as a timeout or connection failure.

Use the delivery history to troubleshoot your endpoint.