Overview
When an endpoint is deprecated, compromised, or temporarily offline, you can disable its deliveries by calling thehook_unsubscribe Graph action. The action requires the subscription’s UUID, which is returned whenever you create or list subscriptions. Tenant and platform administrators can perform this operation; other roles are denied.
Unsubscription Workflow
- Identify the subscription – retrieve the
uuidfrom your records. - Call
hook_unsubscribe– send the Graph mutation with theuuidpayload. - Confirm the response – inspect the returned
Hook_Subscribe_Outputto verify the intended subscription was disabled.
Unsubsribing API Inputs
hook_unsubscribe expects a single field:
- uuid: String
Unsubscibing Payload Response Shape
The action mirrors the subscribe response so you can confirm which event and endpoint were affected.Unsubscribing Response Example
The action returns the now-unsubcribed subscription, including its unique identifiers and the event metadata snapshotMutation Example
Use the mutation below with admin credentials. The mutation simply forwards theuuid variable to the action.
Managing the Lifecycle
- Bulk clean-up: Iterate through stored UUIDs in automation to remove multiple endpoints; rate limits apply per Graph API policy.
- Rollback/Resubscribe: If you unsubscribed by mistake, call
hook_subscribeagain with the same event type and endpoint—new IDs will be issued. - Auditing: Keep the unsubscribe response and mutation request ID for compliance logs; the
created_at/updated_atvalues remain available via the subscription tables even after disabling.
Testing & Verification
- After unsubscribing, trigger the original event to confirm your endpoint no longer receives calls.
- Monitor delivery logs; you should see a “disabled target” status associated with the
uuid. - In staging, create a fresh subscription, unsubscribe it, and ensure automation handles both states before promoting to production.
Troubleshooting
- Unknown UUID:
422 Unprocessable Entityindicates the UUID is missing or malformed; validate the identifier format and ensure it exists. - Permission denied: use a token scoped to
TENANT_ADMINorPLATFORM_ADMIN. - Race conditions: if events arrive between creating a new subscription and unsubscribing the old one, design idempotent consumers to handle duplicate deliveries.
- Record not found: the backend returns a not-found error if the subscription was already removed—safe to ignore if you intended a no-op.
Related Resources
docs/graph-api-reference/webhooks/subscribing.mdx– how to onboard endpoints and capture subscription UUIDs.docs/graph-api-reference/webhooks/overview.mdx– retry semantics and event catalog.

