POST to that URL whenever one fires (when a call connects, a session ends, and so on). This is how you log calls, kick off post-call processing, or update your own systems for agents you created over REST.
Base URL: https://agents.assemblyai.com. Manage subscriptions with your API key in the Authorization header, same as the rest of the API.
Events
Create a subscription
POST /v1/webhook-subscriptions. Subscribe to one or more events; scope to a single agent with agent_id, or omit it to receive events for all your agents.
The response returns a
secret_version (an integer that increments when you rotate the secret), never the secret itself. Keep your own copy of the secret to verify signatures.Receiving a delivery
When an event fires, AssemblyAI sends aPOST to your url with these headers:
Session events carry a
session object:
call object (with recording/transcript links where available):
2xx status promptly. Failed deliveries are retried with backoff, so make your handler idempotent: dedupe on event_id (or X-AAI-Delivery-Id).
Verify the signature
Always verifyX-AAI-Signature before trusting a delivery. Compute HMAC-SHA256 over the exact raw request body (don’t re-serialize the JSON) using your subscription secret, and compare in constant time:
Manage subscriptions
PATCH accepts any of url, events, secret, enabled. Sending a new secret rotates it and increments secret_version.