webhookWebhooks API

Aurinko's Webhooks API enables real-time event notifications for email, calendar, contacts, and task updates by subscribing to specific resources and handling webhook payloads efficiently.

Aurinko Webhooks API

Webhooks allow your apps to receive real-time updates from the Aurinko platform. By registering a webhook URL, you can get notified when specific events happen.

Aurinko retrieves data by either subscribing to provider resources or using a poller for periodic updates. For certain resources, such as Google Pub/Sub, manual configuration is required to ensure the provider’s data is successfully delivered to Aurinko.

Aurinko account setup


First, create your account in the Aurinko portalarrow-up-right, then follow the guide to get Your Developer API Keysarrow-up-right.

Setting up a Webhook


  1. Prepare an endpoint URL on your server.

  2. Ensure your endpoint can handle POST requests with authentication and supports the initial url verification step.

  3. Provide your endpoint to our system through the event subscriptionarrow-up-right process.

Authentication


Webhooks are secured using a shared secret that is used to generate a signature. The signature is sent in the HTTP header of each request, allowing you to verify the authenticity. The signing secret can be found on your app's dashboard page.

For more details, see the documentation: Authenticationarrow-up-right.

Notification URL Verification


When you register a new webhook subscription with Aurinko, the platform performs a Notification URL Verification to ensure that your server is ready to receive and process events. Validate this request as any other requests by authentication. See the documentation for more details: Notification URL Verificationarrow-up-right.

API Resources


The Aurinko webhook events are associated with API resources (parts of the API) and subscriptions are created for those resources. Here is the list of available API resources:

  • /email/messages - events representing mailbox changes.

  • /email/tracking - events representing email tracking changes.

  • /calendars/primary/events, /calendars/{calId}/events - events representing calendar changes.

  • /contacts - events representing address book changes.

  • /tasklists/default/tasks, /tasklists/{tlId}/tasks - events representing todo item changes.

  • /booking/{bookingId} - events representing booking lifecycle changes.

Subscribing


To create a new subscription POST a resource and a notification url to the subscriptions endpointarrow-up-right:

Email messages

Response:

Email tracking

circle-info

For more details on the email tracking fields (opens, threadReplies, trackOpensAfterSendDelay, context, customDomainAlias) and how to include them when sending messages, see the Email Tracking Options section in the Email API documentation.arrow-up-right

Calendar events

or for a specific calendar:

Contacts

Tasks

or for a specific task list:

Booking

Payloads


Each API resource may have its own payload format. Below is a sample payload that is common for email/messages, /contacts, /calendars/{id}/events, /tasklists/{id}/tasks:

Booking have their own payload format. The /booking/{bookingId} webhook delivers a JSON payload only when a booking (meeting) is created.

Next, an example of the email/tracking events (eventType can be open, reply, or replyBounce).

circle-info

For more details on the email tracking fields (opens, threadReplies, trackOpensAfterSendDelay, context, customDomainAlias) and how to include them when sending messages, see the Email Tracking Options section in the Email API documentationarrow-up-right.

When an email is first processed for tracking, an ‘Initial’ event is triggered. This event occurs only once when tracking begins, typically upon sending the email, and is not included in subsequent tracking updates:

Handling Webhooks


When you receive a webhook:

  1. Validate the signature to ensure it's from the Aurinko platform.

  2. Respond with a 200 OK as quickly as possible.

  3. Process the event data asynchronously.

Retries


If your endpoint responds with any HTTP status other than 200 OK or 422 Unprocessable, Aurinko will attempt to resend the webhook 1, 2, 4, 8 ... etc seconds (the interval won't increase beyond 10mins). Responding with the 422 HTTP status results in removing the subscription.

Lifecycle events


If for some reason your webhook subscription becomes problematic (i.e. because account credentials have expired), Aurinko will send a lifecycle event like this:

When the subscription comes back to life, Aurinko will send:

Deleting a webhook


Last updated

Was this helpful?