This is not a generic outbound webhook configuration API. AnswerPal workflow and event automation is covered by the Hooks API. The Webhooks endpoints below exist so Microsoft Graph can call back into AnswerPal when new messages arrive in subscribed mail folders.
GET /api/GraphWebhook – PublicvalidationToken is present, AnswerPal returns that value as text/plain. Without a token the route returns 400 Bad Request.POST /api/GraphWebhook – PublicvalidationToken is echoed as text/plain. Otherwise the JSON body is read and each notification can enqueue an automatic email import job when the subscription, folder and channel match current auto-retrieve settings.GET /api/GraphWebhook?validationToken={token}
200 OK
Content-Type: text/plain
{token}validationTokentext/plain when the query parameter is present.200 OK. Non-empty bodies are deserialized as GraphWebhookPayload.subscriptionId through the Graph subscription service. If that fails, it can parse the Graph resource path and look up the channel folder by mailbox and external folder ID.AutoRetrieveEmails enabled and the channel also has AutoRetrieveEmails enabled./users/{mailbox}/mailFolders('{folderId}')/messages and changeType = created.BackendAPI configuration value as {BackendAPI}/api/graphwebhook.POST /api/GraphWebhook
Content-Type: application/json
{
"value": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resource": "/users/support@example.com/mailFolders('Inbox')/messages",
"resourceData": {
"id": "AAMkAG..."
}
}
]
}GET /api/GraphWebhook and POST /api/GraphWebhookPublic because Microsoft Graph must be able to validate and deliver notifications.subscribe and unsubscribe200 OK400 Bad RequestvalidationToken query value is provided.404 Not FoundGET /api/GraphWebhook?validationToken={token}
200 OK
Content-Type: text/plain
{token} POST /api/GraphWebhook
Content-Type: application/json
{
"value": [
{
"subscriptionId": "00000000-0000-0000-0000-000000000000",
"resource": "/users/support@example.com/mailFolders('Inbox')/messages",
"resourceData": {
"id": "AAMkAG..."
}
}
]
} POST /api/GraphWebhook/subscribe/{channelId}
200 OK POST /api/GraphWebhook/unsubscribe/{channelId}
200 OK The subscribe and unsubscribe routes are operational helpers around the same Microsoft Graph subscription service used by automatic email retrieval.
POST /api/GraphWebhook/subscribe/{channelId} – Operational routeAutoRetrieveEmails on for the channel and its folders, then calls the Graph subscription service. The channel must exist, must not be deleted and must have an email address.POST /api/GraphWebhook/unsubscribe/{channelId} – Operational routeAutoRetrieveEmails off for the channel and its folders, then calls the Graph subscription service so active folder subscriptions are removed or cleared.POST /api/GraphWebhook/subscribe/{channelId}
200 OKPOST /api/GraphWebhook/unsubscribe/{channelId}
200 OKvaluesubscriptionIdresource/users/{mailbox}/mailFolders('{folderId}')/messages.resourceData.idGraphSubscriptionIdGraphSubscriptionExpirationAutoRetrieveEmailsGET /api/GraphWebhook and POST /api/GraphWebhookPublic because Microsoft Graph must be able to validate and deliver notifications.subscribe and unsubscribe200 OK400 Bad RequestvalidationToken query value is provided.404 Not FoundFor customer-configurable workflow actions, hook actions, hook documents and ticket-message runtime hooks, use the Hooks API Reference. For email channel settings, folder management, connection tests and channel translation routes, use the Channels API Reference.
No. The current Webhooks surface is for Microsoft Graph email notification callbacks and subscription toggles. AnswerPal event automation is documented on the Hooks endpoint page.
Microsoft Graph must be able to call the validation and notification callback without an AnswerPal user token. The routes are therefore marked Public.
The callback must resolve a channel folder, and both the folder and channel must have AutoRetrieveEmails enabled. If those conditions match, AnswerPal enqueues an automatic folder import job.
AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
For all support, sales, and partnership inquiries, email us at info@answerpal.eu
AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium
+32.36416685
BE 0862.692.858