Create an application, give its owner and teammates access, and keep your records up to date with webhooks. Follow one company through the flow, then reuse it for each application in your tenant.
JavaScript examples use the backend helper below. Expand the cURL alternatives to call the API directly. For complete field definitions and errors, use the API reference.
1. Prepare your backend
Arrange your tenant, intake and API key with Aurora Edge. The key needs applications:read, applications:write and webhooks:manage. Save the helper below as aegis-client.mjs, set AEGIS_API_KEY in your server environment, and initialize it once:
JavaScript
import { randomUUID } from 'node:crypto';
import { createAegisClient } from './aegis-client.mjs';
const aegis = createAegisClient(process.env.AEGIS_API_KEY);
const { data: intakes } = await aegis.listIntakes();
const intake = intakes.find(item => item.labelId === 'corporate');
if (!intake) throw new Error('Select an intake configured for your tenant');
Replace corporate with a label returned for your tenant. An empty list requires intake configuration before you can create an application. cURL examples use Bash with AEGIS_API_KEY, CLIENT_ID and other named values supplied by your backend or copied from your own test responses. They omit the optional operation key; add an Idempotency-Key header to supported writes when implementing the replay flow below.
Authenticate your own user and check that they may manage the requested application before issuing links or changing members. The tenant API key can access multiple applications; it does not authorize your individual website users. Keep API keys, signing secrets and sign-in URLs out of browser storage and routine logs.
2. Create the application and owner link
Use the primary owner's email and a stable reference from your database. This single call creates the application and returns its first sign-in link.
JavaScript
const externalRef = 'ORDER-88213';
const ownerEmail = 'cfo@acme.example';
// Generate once when creating the job; persist and reuse it only for this request.
const createKey = randomUUID();
const session = await aegis.createApplicationWithLink({
email: ownerEmail,
companyName: 'Acme Partner FZ-LLC',
externalRef,
labelId: intake.labelId,
redirectPath: '/dashboard'
}, { idempotencyKey: createKey });
const clientId = session.clientId;
// Save externalRef and clientId in your database before handing off the owner.
if (session.replayed) {
// The operation completed, but this response has no loginUrl or expiresAt.
// If the original URL was lost, explicitly request a new link as in step 3.
} else {
// Deliver session.loginUrl privately and show session.expiresAt.
}
// Do not log the session or automatically create another link on a replay.
Aegis does not send the invitation email for this call. Links are single use and live three days; use expiresAt rather than calculating expiry. Keep link-preview services from opening them. Reuse externalRef for the same case, and keep it within 200 characters. A different email with the same reference returns 409. To create without a link, use POST applications.
Keys make a bounded retry refer to the same operation
Idempotency-Key is optional. Save a random key with each write job, then keep its key, credential and request unchanged across bounded retries within 24 hours. A different request with the same key returns 409. Link and secret replays contain identity only; other replays return the prior safe response. Read the replay contract before adding retries. GET needs no key, and webhook.test rejects one.
Use the existing application's clientId. Omit email to select its current owner, or supply the email of an existing member. These examples are alternatives; each new operation mints a fresh link, while a matching keyed replay returns identity only.
JavaScript
// Recovery is a new explicit operation. Persist its new key with this job.
const returnKey = randomUUID();
const ownerSession = await aegis.issueLink(clientId, undefined, '/dashboard', { idempotencyKey: returnKey });
if (!ownerSession.replayed) {
// Privately deliver ownerSession.loginUrl to the current owner.
}
const memberSession = await aegis.issueLink(clientId, 'legal@acme.example');
// Privately deliver memberSession.loginUrl to this existing member.
Show the cURL request
cURL (Bash)
# Current owner. To select a member, add "email":"legal@acme.example" to the body.
curl --silent --show-error "https://aegis-api.theauroraedge.com/v1/applications/$CLIENT_ID/login-sessions" \
-H "Authorization: Bearer $AEGIS_API_KEY" -H 'Content-Type: application/json' \
--data '{"redirectPath":"/dashboard"}'
A first response has clientId, loginUrl and expiresAt. A keyed replay contains only clientId and replayed: true. Reissue does not revoke older unused tickets. Add a person as a member before requesting their link. Apply this operation to any application your backend is authorized to manage within the tenant.
4. Invite, inspect and remove teammates
An invitation has two API steps: add membership, then issue a link for that member. Your system delivers the link.
JavaScript
// Generate and persist two keys once with this invitation job.
const memberKey = randomUUID();
const linkKey = randomUUID();
try {
const invitation = await aegis.inviteMember(clientId, 'legal@acme.example', { memberKey, linkKey });
// Persist invitation.member.uid even if the link response is identity-only.
if (invitation.replayed) {
// Membership and link issuance completed. If the URL was lost,
// explicitly reissue for this email with a new operation key.
} else {
// Privately deliver invitation.loginUrl to legal@acme.example.
}
} catch (error) {
if (error.stage === 'link') {
// Save error.member.uid: membership succeeded.
// Reconcile the roster and retry only link issuance with linkKey.
// If that returns identity-only, recover with an explicit new-key reissue.
}
throw error;
}
const { members } = await aegis.getApplication(clientId);
// Select the memberUid to remove from members[].uid, after user authorization.
Show the cURL request
cURL (Bash)
# Add membership. Save uid from this response.
curl --silent --show-error "https://aegis-api.theauroraedge.com/v1/applications/$CLIENT_ID/members" \
-H "Authorization: Bearer $AEGIS_API_KEY" -H 'Content-Type: application/json' \
--data '{"email":"legal@acme.example"}'
# Issue the invitation link only after membership succeeds.
curl --silent --show-error "https://aegis-api.theauroraedge.com/v1/applications/$CLIENT_ID/login-sessions" \
-H "Authorization: Bearer $AEGIS_API_KEY" -H 'Content-Type: application/json' \
--data '{"email":"legal@acme.example","redirectPath":"/dashboard"}'
When your user chooses to remove a teammate, use the saved member UID:
Remove a teammate
await aegis.removeMember(clientId, memberUid); // 204, no response body.
Show the cURL request
cURL (Bash)
# MEMBER_UID is the uid of the teammate being removed.
curl --silent --show-error -X DELETE \
"https://aegis-api.theauroraedge.com/v1/applications/$CLIENT_ID/members/$MEMBER_UID" \
-H "Authorization: Bearer $AEGIS_API_KEY"
The add response contains uid, email, role and joinedAt. Adding an existing member preserves membership and joinedAt. If adding succeeds but link issuance fails, read the roster and retry only link issuance after resolving the error. The application can have up to 20 members.
Removing the current owner
Name another existing member as the new owner. Save the successful handover in your database: the application read does not expose ownerUid, and role labels do not identify the current owner after a handover.
JavaScript
await aegis.removeMember(clientId, currentOwnerUid, replacementMemberUid);
// The helper sends ?newOwnerUid=<replacementMemberUid> with DELETE.
// Future issueLink(clientId) calls target the replacement owner.
Without a key, a repeat removal returns 400 once the member is gone. A matching completed keyed replay returns 204. After a timeout, inspect the roster before retrying.
5. Retrieve status or all applications
JavaScript
const application = await aegis.getApplication(clientId);
const { status, decision, rejectionReason } = application;
// Save this current snapshot against your own application record.
// The helper follows every cursor and skips duplicate clientIds within this sweep.
for await (const item of aegis.listApplications()) {
// Upsert item against your own record using item.clientId.
}
// Optional alternatives: recover one reference or reconcile a time window.
for await (const item of aegis.listApplications({ externalRef: 'ORDER-88213' })) {
// Recover the clientId associated with your reference.
}
for await (const item of aegis.listApplications({ updatedSince: '2026-09-01T00:00:00.000Z' })) {
// Reconcile applications changed in this window.
}
Show the cURL request
cURL (Bash)
# One application, including status, latest decision and members.
curl --silent --show-error "https://aegis-api.theauroraedge.com/v1/applications/$CLIENT_ID" \
-H "Authorization: Bearer $AEGIS_API_KEY"
# First page. Continue using nextCursor while hasMore is true.
curl --silent --show-error --get 'https://aegis-api.theauroraedge.com/v1/applications' \
-H "Authorization: Bearer $AEGIS_API_KEY" --data-urlencode 'limit=100'
# Next page, with CURSOR set to the exact nextCursor from the previous response.
curl --silent --show-error --get 'https://aegis-api.theauroraedge.com/v1/applications' \
-H "Authorization: Bearer $AEGIS_API_KEY" --data-urlencode 'limit=100' --data-urlencode "cursor=$CURSOR"
Lists return data, nextCursor and hasMore. The final page has nextCursor: null and hasMore: false. Keep filters unchanged while paging. Concurrent updates can move records between pages, so overlap recovery windows and save your checkpoint only after the whole sweep succeeds. Fetch the individual application when you need its full current snapshot.
Status
What your integration should do
pending
Wait for review. Submission can leave this status unchanged.
needs_info
Help the applicant return to their outstanding requests.
hold
Keep the application unresolved while it is on hold.
pending_approval
Wait for the second approver.
active
Treat the application as approved.
rejected
Record rejection and the applicant-visible rejectionReason.
Preserve unknown statuses without treating them as approval. A successful HTTP request is not an onboarding approval. submittedAt can be absent even after submission; do not use its presence or absence as a reliable submission flag. Track submissions through application.submitted events. decision.comment is null unless staff explicitly shared it with clients.
6. Register and update status webhooks
Prepare the receiver below, then register its public HTTPS URL on port 443. Create one registration for the workflow, not one for every applicant. Store the returned endpoint ID and its one-time signing secret.
JavaScript
const registrationKey = randomUUID(); // Persist once with the registration job.
const endpoint = await aegis.registerWebhook({
url: 'https://integrations.example.com/aegis/events',
events: [
'application.submitted',
'application.status.changed',
'application.info_request.raised'
],
description: 'Onboarding updates'
}, { idempotencyKey: registrationKey });
const endpointId = endpoint.id;
if (endpoint.replayed) {
// Save endpointId. The secret is absent: if the first response was lost,
// explicitly rotate using a new operation key, as shown below.
throw new Error('Recover the signing secret before testing the receiver');
} else {
// Save endpointId and securely configure the receiver with endpoint.secret.
}
// Send the test only after the receiver has a known valid secret.
const test = await aegis.testWebhook(endpointId);
if (!test.delivered) throw new Error('Check receiver connectivity and signature verification');
Show the cURL request
cURL (Bash)
curl --silent --show-error 'https://aegis-api.theauroraedge.com/v1/webhooks' \
-H "Authorization: Bearer $AEGIS_API_KEY" -H 'Content-Type: application/json' \
--data '{"url":"https://integrations.example.com/aegis/events","events":["application.submitted","application.status.changed","application.info_request.raised"],"description":"Onboarding updates"}'
# After securely configuring the receiver with the returned secret:
curl --silent --show-error "https://aegis-api.theauroraedge.com/v1/webhooks/$ENDPOINT_ID/test" \
-H "Authorization: Bearer $AEGIS_API_KEY" -H 'Content-Type: application/json' --data '{}'
Submission is a separate event because it need not change status. Status events keep outcomes in sync. Information-request events tell you when to bring an applicant back. The test response's delivered field confirms receiver success; HTTP success of the management call alone is insufficient.
Supply the complete desired events array when changing subscriptions. Update and list responses omit the secret. Use status: disabled to cancel pending work. Re-enable accepts newly occurring events and does not revive cancelled deliveries. After changing the receiver, test again. See the event catalogue for additional subscriptions.
7. Accept events and refresh current status
Connect a public POST route in your server to handleWebhook below. Pass the untouched request body as a Buffer and delivery headers as a Headers object, then send its returned status with an empty body. Capture bytes before JSON middleware and configure request size limits at your server.
The receiver verifies the signature and tenant, commits the event to your queue, and returns 204. Your worker then reads the application and saves the latest state. Duplicate delivery and out-of-order events are normal; event sequence numbers must not decide which application status is current.
Copy the Node.js receiver and worker functions
aegis-webhooks.mjs
import { createHmac, timingSafeEqual } from 'node:crypto';
// acceptEvent must atomically deduplicate and durably queue the event.
// Resolve only after commit, including for an already accepted duplicate.
export function createWebhookHandler({ tenantId, secrets, acceptEvent }) {
if (!tenantId || !Array.isArray(secrets) || !secrets.length ||
secrets.some(secret => typeof secret !== 'string' || !secret) ||
typeof acceptEvent !== 'function') throw new Error('Configure tenant, secrets and durable acceptance');
return async function handleWebhook(rawBody, headers) {
// headers is a standard Headers object. rawBody is the original Buffer.
const timestamp = headers.get('Aegis-Webhook-Timestamp');
if (!Buffer.isBuffer(rawBody) || !/^\d+$/.test(timestamp ?? '')) return { status: 401 };
const seconds = Number(timestamp);
if (!Number.isSafeInteger(seconds) || Math.abs(Date.now() / 1000 - seconds) > 300) {
return { status: 401 };
}
const signatures = (headers.get('Aegis-Webhook-Signature') ?? '').split(/\s+/)
.filter(value => /^v1=[0-9a-f]{64}$/.test(value))
.map(value => Buffer.from(value.slice(3), 'hex'));
const valid = secrets.some(secret => {
const digest = createHmac('sha256', secret)
.update(timestamp + '.', 'utf8').update(rawBody).digest();
return signatures.some(signature => timingSafeEqual(signature, digest));
});
if (!valid) return { status: 401 };
let event;
try { event = JSON.parse(rawBody.toString('utf8')); } catch { return { status: 400 }; }
if (!event || typeof event.id !== 'string' || !event.id ||
typeof event.type !== 'string' || !event.type ||
event.tenantId !== tenantId ||
event.id !== headers.get('Aegis-Webhook-Id') ||
event.type !== headers.get('Aegis-Webhook-Event')) return { status: 400 };
if (event.type.startsWith('application.') &&
(typeof event.data?.clientId !== 'string' || !event.data.clientId)) return { status: 400 };
try {
await acceptEvent(event);
return { status: 204 };
} catch {
return { status: 503 }; // No acknowledgement when durable acceptance fails.
}
};
}
// Call this from your durable queue worker. Retry the job if processing throws.
export function createReconciler({ aegis, withApplicationLock, saveApplication }) {
return async function reconcile(event) {
if (!event.type.startsWith('application.')) return; // Includes webhook.test.
const clientId = event.data.clientId;
await withApplicationLock(event.tenantId + ':' + clientId, async () => {
const application = await aegis.getApplication(clientId);
await saveApplication(application);
});
};
}
Connection you supply
Required behavior
tenantId and secrets
Use your configured Aegis tenant ID and active secret strings. Use secrets directly as UTF-8; do not decode or strip prefixes.
acceptEvent(event)
In one database transaction, insert an event keyed by tenantId and event.id and create its durable processing job. A duplicate resolves successfully. A commit failure throws.
withApplicationLock(key, work)
Serialize work for one application across all workers, holding the lock until both the read and save finish.
saveApplication(application)
Upsert the current API snapshot by clientId. Resolve only after the database write commits.
These are adapter functions for your database and queue. An in-memory set cannot provide durable deduplication. Mark a queue job complete only after reconciliation succeeds; retry failed jobs. The same event can reach multiple registered endpoints, so use a separate deduplication namespace for independent workflows. Keep deduplication for your operational retry/recovery horizon; no automatic retention period is promised.
Connect your storage adapters
import { createWebhookHandler, createReconciler } from './aegis-webhooks.mjs';
// Supply acceptEvent, withApplicationLock and saveApplication from your backend.
const handleWebhook = createWebhookHandler({
tenantId: process.env.AEGIS_TENANT_ID,
secrets: [process.env.AEGIS_WEBHOOK_SECRET],
acceptEvent
});
const processJob = createReconciler({ aegis, withApplicationLock, saveApplication });
// POST route: call handleWebhook(rawBody, headers), send its returned status.
// Queue worker: await processJob(event), then acknowledge the job.
Test valid events, invalid signatures, duplicates and receiver failures. A webhook.test event has no application ID and requires no application read. Run an overlapping updatedSince sweep at least daily, independently of receiver availability, and more often when faster recovery matters. This restores current state, not historical event details. Delivery diagnostics, recovery and secret rotation are covered in the webhook reference.
8. Bring the applicant back for more information
After application.info_request.raised, retrieve the requests and issue a link to the intended current member. Do this in your background workflow after durable event acceptance.
JavaScript
const { data: requests } = await aegis.getInfoRequests(clientId);
const outstanding = requests.filter(request => request.openItems > 0);
if (outstanding.length > 0) {
const followUp = await aegis.issueLink(clientId, undefined, '/requests');
// This example sends no operation key, so a successful response includes loginUrl.
// Privately send followUp.loginUrl to the current owner.
// Pass an existing member email instead of undefined to target that member.
}
Track notification work durably by event ID so worker retries do not send duplicate invitations. Applicants supply answers and documents in the portal. A responded request still needs staff review; it is not approval.
Manage access and webhook lifecycle
These operations are explicit administrative actions. Each supported mutation accepts a final options object with idempotencyKey. Generate and persist a distinct key for each logical operation; do not share one key between methods.
Create without a link, or lock and unlock an application
Separate actions from your backend
const created = await aegis.createApplication({
email: 'cfo@acme.example', companyName: 'Acme Partner FZ-LLC',
externalRef: 'ORDER-88214', labelId: intake.labelId
}); // { clientId, status }; no link.
// When locking is requested:
const locked = await aegis.lock(clientId); // { clientId, accessActive: false }
// When restoring access is requested:
const unlocked = await aegis.unlock(clientId); // { clientId, accessActive: true }
// These actions do not change the onboarding decision. Save access state yourself.
Inspect deliveries and recover from failures
Delivery diagnostics
for await (const delivery of aegis.listDeliveries(endpointId, { state: 'dead' })) {
// Inspect delivery.lastError and lastStatusCode. event can be null.
// Reconcile the application when delivery.event?.data.clientId is present.
}
// Omit state to inspect all four states: pending, delivering, delivered and dead.
// pending with attempts > 0 is the dashboard's retrying state.
Diagnostics include a safe event envelope when available, without signatures, secrets or receiver bodies. Fix the receiver and reconcile current application state. There is no replay API or promised history-retention period.
Rotate a signing secret or recover a lost secret
Explicit secret rotation
const rotationKey = randomUUID(); // Persist once for this rotation job.
const rotation = await aegis.rotateWebhookSecret(endpointId,
{ gracePeriodSeconds: 86400 }, { idempotencyKey: rotationKey });
if (rotation.replayed) {
// No secret or previousSecretExpiresAt in this variant.
// If the original secret was lost, explicitly rotate again with a new key.
} else {
// Store rotation.secret privately; trust it alongside the old secret.
// Remove the old secret after rotation.previousSecretExpiresAt.
}
// Grace: 0 to 604800 seconds; zero ends the prior secret immediately.
// At most two versions coexist; another rotation removes the oldest.
Disable, re-enable or retire a registration
Separate lifecycle actions
// Cancel pending work, retaining the registration and its occupied slot:
await aegis.updateWebhook(endpointId, { status: 'disabled' });
// When ready to accept newly occurring events:
await aegis.updateWebhook(endpointId, { status: 'enabled' });
// When removing the integration permanently, retire and release the slot:
await aegis.retireWebhook(endpointId); // 204. Save endpointId for diagnostics.
// Run only the action your operator requested, not this entire sequence.
Older events stay cancelled even if their fanout was delayed. An HTTP request already in flight may still arrive. HTTP 410 automatically disables an endpoint; DELETE retires it. Retirement omits the endpoint from listing but retains access to its diagnostics.
Reusable JavaScript backend helper
Copy this module once and use the step examples from your own authenticated backend handlers. The methods follow the API paths and preserve diagnostics. They do not automatically retry writes that might create a new link or endpoint.
Copy aegis-client.mjs
aegis-client.mjs
export function createAegisClient(apiKey, { onResponse } = {}) {
if (!apiKey) throw new Error('Set AEGIS_API_KEY on your server');
const base = 'https://aegis-api.theauroraedge.com';
const id = value => encodeURIComponent(value);
const applicationPath = clientId => '/v1/applications/' + id(clientId);
const endpointPath = endpointId => '/v1/webhooks/' + id(endpointId);
async function request(path, method = 'GET', body, { idempotencyKey } = {}) {
if (idempotencyKey !== undefined &&
(typeof idempotencyKey !== 'string' || !/^[!-~]{1,128}$/.test(idempotencyKey))) {
throw new Error('Idempotency-Key must be 1 to 128 visible ASCII characters');
}
const response = await fetch(base + path, {
method,
headers: {
Authorization: 'Bearer ' + apiKey,
...(body === undefined ? {} : { 'Content-Type': 'application/json' }),
...(idempotencyKey === undefined ? {} : { 'Idempotency-Key': idempotencyKey })
},
body: body === undefined ? undefined : JSON.stringify(body),
signal: AbortSignal.timeout(30000)
});
const text = response.status === 204 ? '' : await response.text();
let data = null;
try { data = text ? JSON.parse(text) : null; } catch { /* proxy response */ }
const diagnostic = {
status: response.status,
requestId: response.headers.get('Aegis-Request-Id') ?? data?.error?.requestId,
replayed: response.headers.get('Aegis-Idempotency-Replayed'),
retryAfter: response.headers.get('Retry-After')
};
if (onResponse) onResponse(diagnostic); // Metadata only; no credentials or body.
if (!response.ok) {
const error = new Error('Aegis request failed');
Object.assign(error, diagnostic, { code: data?.error?.code, details: data?.error?.details });
throw error;
}
if (response.status !== 204 && data === null) throw new Error('Invalid Aegis response');
return data; // Preserve the API body, including identity-only replay variants.
}
async function* pages(path, filters, identity) {
const query = new URLSearchParams({ limit: '100', ...filters });
query.delete('cursor');
const seen = new Set();
const cursors = new Set();
while (true) {
const page = await request(path + '?' + query);
if (!Array.isArray(page?.data) || typeof page.hasMore !== 'boolean') {
throw new Error('Invalid API page');
}
for (const item of page.data) {
if (typeof item?.[identity] !== 'string' || !item[identity]) {
throw new Error('Invalid item identifier');
}
if (!seen.has(item[identity])) {
seen.add(item[identity]);
yield item;
}
}
if (!page.hasMore) return;
if (typeof page.nextCursor !== 'string' || !page.nextCursor || cursors.has(page.nextCursor)) {
throw new Error('Invalid or repeated API cursor');
}
cursors.add(page.nextCursor);
query.set('cursor', page.nextCursor);
}
}
const issueLink = (clientId, email, redirectPath = '/dashboard', options = {}) =>
request(applicationPath(clientId) + '/login-sessions', 'POST', {
...(email === undefined ? {} : { email }), redirectPath
}, options);
const addMember = (clientId, email, options = {}) =>
request(applicationPath(clientId) + '/members', 'POST', { email }, options);
return {
listIntakes: () => request('/v1/intakes'),
createApplication: (fields, options = {}) => request('/v1/applications', 'POST', fields, options),
createApplicationWithLink: (fields, options = {}) => request('/v1/login-sessions', 'POST', fields, options),
getApplication: clientId => request(applicationPath(clientId)),
listApplications: (filters = {}) => pages('/v1/applications', filters, 'clientId'),
issueLink,
addMember,
async inviteMember(clientId, email, { memberKey, linkKey } = {}) {
if (memberKey !== undefined && memberKey === linkKey) {
throw new Error('Membership and link issuance require different operation keys');
}
const member = await addMember(clientId, email, { idempotencyKey: memberKey });
try {
const session = await issueLink(clientId, email, '/dashboard', { idempotencyKey: linkKey });
return { member, ...session }; // A replay may have no loginUrl.
} catch (cause) {
const error = new Error('Member added, but sign-in link could not be obtained', { cause });
Object.assign(error, { stage: 'link', clientId, member,
status: cause.status, code: cause.code, details: cause.details,
requestId: cause.requestId, retryAfter: cause.retryAfter });
throw error; // Never hide the successful first step.
}
},
removeMember(clientId, uid, newOwnerUid, options = {}) {
const query = newOwnerUid === undefined ? '' : '?' + new URLSearchParams({ newOwnerUid });
return request(applicationPath(clientId) + '/members/' + id(uid) + query, 'DELETE', undefined, options);
},
lock: (clientId, options = {}) => request(applicationPath(clientId) + '/lock', 'POST', {}, options),
unlock: (clientId, options = {}) => request(applicationPath(clientId) + '/unlock', 'POST', {}, options),
getInfoRequests: clientId => request(applicationPath(clientId) + '/info-requests'),
listWebhooks: () => request('/v1/webhooks'),
registerWebhook: (fields, options = {}) => request('/v1/webhooks', 'POST', fields, options),
updateWebhook: (endpointId, fields, options = {}) => request(endpointPath(endpointId), 'PATCH', fields, options),
rotateWebhookSecret: (endpointId, fields = {}, options = {}) =>
request(endpointPath(endpointId) + '/rotate-secret', 'POST', fields, options),
retireWebhook: (endpointId, options = {}) => request(endpointPath(endpointId), 'DELETE', undefined, options),
listDeliveries: (endpointId, filters = {}) => pages(endpointPath(endpointId) + '/deliveries', filters, 'id'),
testWebhook(endpointId, options = {}) {
if (options.idempotencyKey !== undefined) throw new Error('Webhook test does not accept Idempotency-Key');
return request(endpointPath(endpointId) + '/test', 'POST', {});
}
};
}
Honor Retry-After on 429 and use bounded backoff for transient failures. A timeout or 5xx can occur after a write committed: read the application or list registrations before repeating the operation. All workers share the per-key budget of 60 requests per minute. See errors and retry guidance.