Only show these results:
public-beta-v3

v3 Webhook schema reference

The Nylas API v3 is in public beta. It might contain bugs, and might change before it is generally available. See the v3 Beta documentation for more information.

This page provides a schema reference for each type of webhook the Nylas API v3 sends.

You can also use the /v3/webhook/mock-payload endpoint to get samples of these payloads on demand.

calendar.created

A new calendar was created.

{
"specversion": "1.0",
"type": "calendar.created",
"source": "gma/nylas_core_sync/google/events/realtime",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"grant_id": "mock-grant-id",
"description": "Mock Description",
"id": "[email protected]",
"is_primary": false,
"location": "Mock Location",
"name": "Mock Calendar",
"object": "calendar",
"read_only": false,
"timezone": "America/New_York",
"is_owned_by_user": false
}
}
}

calendar.updated

A calendar was updated or modified.

{
"specversion": "1.0",
"type": "calendar.updated",
"source": "gma/nylas_core_sync/google/events/realtime",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"grant_id": "mock-grant-id",
"description": "Mock Description",
"id": "[email protected]",
"is_primary": false,
"location": "Mock Location",
"name": "Mock Calendar",
"object": "calendar",
"read_only": false,
"timezone": "America/New_York",
"is_owned_by_user": false
}
}
}

calendar.deleted

A calendar was deleted.

{
"specversion": "1.0",
"type": "calendar.deleted",
"source": "gma/nylas_core_sync/google/events/incremental",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"grant_id": "mock-grant-id",
"id": "[email protected]",
"is_primary": false,
"name": "Mock Calendar",
"object": "calendar",
"read_only": false,
"timezone": "America/Los_Angeles",
"is_owned_by_user": false
}
}
}

event.created

A new event on a calendar was created.

{
"specversion": "1.0",
"type": "event.created",
"source": "gma/nylas_core_sync/google/events/incremental",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"grant_id": "mock-grant-id",
"busy": true,
"calendar_id": "mock-name%40nylas.com",
"created_at": 1234567890,
"description": "mock description",
"hide_participants": false,
"ical_uid": "[email protected]",
"id": "mock-data-id",
"object": "event",
"owner": "Mock Owner <[email protected]>",
"organizer": {
"name": "mock organizer name",
"email": "[email protected]"
},
"participants": [
{
"email": "[email protected]",
"name": "mockParticipantsA",
"status": "yes"
},
{
"email": "[email protected]",
"name": "mockParticipantsB",
"status": "noreply"
}
],
"read_only": false,
"reminders": null,
"status": "confirmed",
"title": "mock_title",
"updated_at": 1234567890,
"when": {
"start_time": 1234567890,
"start_timezone": "America/Edmonton",
"end_time": 1234567890,
"end_timezone": "America/Edmonton",
"object": "timespan"
}
}
}
}

event.updated

An existing event on a calendar was updated or modified.

{
"specversion": "1.0",
"type": "event.updated",
"source": "gma/nylas_core_sync/google/events/incremental",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"busy": true,
"calendar_id": "",
"description": "mock description",
"grant_id": "mock-grant-id",
"hide_participants": false,
"ical_uid": "[email protected]",
"id": "mock-data-id",
"message_id": "mock-message-id",
"object": "event",
"organizer": {
"email": "[email protected]",
"name": "Mock Organizer Name"
},
"owner": "Mock Organizer Name <[email protected]>",
"participants": [
{
"email": "[email protected]",
"name": "mockParticipantsA",
"status": "yes"
},
{
"email": "[email protected]",
"name": "mockParticipantsB",
"status": "noreply"
}
],
"read_only": true,
"recurrence": {
"rrule": [
"RRULE:FREQ=MONTHLY;BYDAY=3TH"
],
"timezone": "America/Toronto"
},
"reminders": null,
"status": "confirmed",
"title": "Engineering All Hands & Demo Day",
"updated_at": 1234567890,
"when": {
"end_time": 1234567991,
"end_timezone": "America/Toronto",
"object": "timespan",
"start_time": 1234567890,
"start_timezone": "America/Toronto"
}
}
}
}

event.deleted

An existing event on a calendar was deleted.

{
"specversion": "1.0",
"type": "event.deleted",
"source": "gma/nylas_core_sync/google/events/incremental",
"id": "mock-id",
"data": {
"application_id": "mock-application-id",
"object": {
"grant_id": "mock-grant-id",
"busy": true,
"calendar_id": "mock-name%40nylas.com",
"created_at": 1234567890,
"description": "mock description",
"hide_participants": false,
"ical_uid": "[email protected]",
"id": "mock-data-id",
"location": "https://us02web.zoom.us/abcdegfg",
"object": "event",
"owner": "Mock Owner <[email protected]>",
"organizer": {
"name": "mock organizer name",
"email": "[email protected]"
},
"participants": [
{
"email": "[email protected]",
"name": "mockParticipantsA",
"status": "yes"
},
{
"email": "[email protected]",
"name": "mockParticipantsB",
"status": "noreply"
}
],
"read_only": true,
"reminders": null,
"status": "cancelled",
"title": "mock_title",
"updated_at": 1234567890,
"when": {
"start_time": 1234567090,
"start_timezone": "America/Los_Angeles",
"end_time": 1234567890,
"end_timezone": "America/Los_Angeles",
"object": "timespan"
}
}
}
}

grant.created

A grant was created. This is the v3 equivalent of the "Account connected" webhook.

{
"specversion": "1.0",
"type": "grant.created",
"source": "/nylas/system",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"object": {
"code": 25012,
"grant_id": "mock-grant-id",
"integration_id": "mock-integration-id",
"login_id": "mock-login-id",
"metadata": {
"parserPreferences": {
"cloudCoreEventsParserEnabled": false,
"cloudCoreParserEnabled": true
},
"runNylasCoreSync": true,
"streamSyncEnabled": true
},
"provider": "google"
}
}
}

grant.updated

An existing grant was modified or updated. This trigger also includes re-authentication.

{
"specversion": "1.0",
"type": "grant.updated",
"source": "/nylas/system",
"id": "mock-id",
"time": 123456789,
"data": {
"application_id": "mock-application-id",
"object": {
"code": 25014,
"grant_id": "mock-grant-id",
"integration_id": "mock-integration-id",
"provider": "microsoft",
"reauthentication_flag" : false
}
}
}

grant.deleted

A grant was deleted by the user calling the "Delete grant" API.

{
"specversion": "1.0",
"type": "grant.deleted",
"source": "/nylas/system",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"object": {
"code": 25013,
"grant_id": "mock-grant-id",
"integration_id": "mock-integration-id",
"metadata": {
"parserPreferences": {
"cloudCoreEventsParserEnabled": false,
"cloudCoreParserEnabled": true
},
"runNylasCoreSync": true,
"streamSyncEnabled": true
},
"provider": "google"
}
}
}

grant.expired

A grant expired, and the end user must re-authenticate. Use this to trigger notifications to administrators or users to take action.

{
"specversion": "1.0",
"type": "grant.expired",
"source": "/nylas/system",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"object": {
"code": 25009,
"grant_id": "mock-grant-id",
"integration_id": "mock-integration-id",
"login_id": "mock-login-id",
"metadata": {
"parserPreferences": {
"cloudCoreEventsParserEnabled": false,
"cloudCoreParserEnabled": true
},
"runNylasCoreSync": true,
"streamSyncEnabled": true
},
"provider": "google"
}
}
}

message.send_success

An email message was sent successfully.

{
"specversion": "1.0",
"type": "message.send_success",
"source": "/nylas/send",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"grant_id": "mock-grant-id",
"object": {
"attachments": [
{
"content": "HASKDJhiuahsdjlkhKJAsd=",
"content_type": "text/plain",
"filename": "myfile.txt",
"id": "mock-attachment-id",
"size": 16
}
],
"bcc": [
{
"email": "[email protected]",
"name": "Mock bcc name "
}
],
"body": "mock-body",
"cc": [
{
"email": "[email protected]",
"name": "Mock cc name"
}
],
"from": [
{
"email": "[email protected]"
}
],
"id": "mock-id",
"reply_to": [
{
"email": "[email protected]",
"name": "Mock reply to name "
}
],
"schedule_id": "mock-schedule-id",
"send_at": 1234567880,
"subject": "Mock Subject",
"to": [
{
"email": "[email protected]",
"name": "Mock Name"
}
],
"use_draft": false
}
}
}

message.send_failed

An email message that was sent was not delivered.

{
"specversion": "1.0",
"type": "message.send_failed",
"source": "/nylas/send",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"grant_id": "mock-grant-id",
"object": {
"attachments": [
{
"content": "HASKDJhiuahsdjlkhKJAsd=",
"content_type": "text/plain",
"filename": "myfile.txt",
"id": "mock-attachment-id",
"size": 16
}
],
"bcc": [
{
"email": "[email protected]",
"name": "Mock bcc name "
}
],
"body": "mock-body",
"cc": [
{
"email": "[email protected]",
"name": "Mock cc name"
}
],
"from": [
{
"email": "[email protected]"
}
],
"id": "mock-id",
"reply_to": [
{
"email": "[email protected]",
"name": "Mock reply to name "
}
],
"schedule_id": "mock-schedule-id",
"send_at": 1234567880,
"subject": "Mock Subject",
"to": [
{
"email": "[email protected]",
"name": "Mock Name"
}
],
"use_draft": false
}
}
}

message.bounce_detected

(Gmail and Graph only) Nylas detected that an email message bounced or was not successfully delivered. Use this trigger to create bounce notifications and take appropriate action.

{
"specversion": "1.0",
"type": "message.bounce_detected",
"source": "/nylas/send",
"id": "mock-id",
"time": 1234567890,
"data": {
"application_id": "mock-application-id",
"grant_id": "mock-grant-id",
"object": {
"bounce_reason": "mock bounce reason message",
"bounce_date": "Wed, 25 Jan 2023 10:18:39 -0800",
"bounced_address": "[email protected]",
"type": "mailbox_unavailable",
"code": 550,
"origin": {
"to": ["[email protected]"],
"from": "[email protected]",
"cc": ["[email protected]"],
"bcc": ["[email protected]"],
"subject" : "mock-subject",
"mimeId" : "mock-mime-id"
}
}
}
}

message.created

An email message was created.

{
"specversion": "1.0",
"type": "message.created",
"source": "gma/nylas_core_sync/google/emails/historic",
"id": "mock-id",
"time": 0,
"data": {
"application_id": "mock-application-id",
"object": {
"body": "<p>mock body</p>",
"cc": [
{
"email": "[email protected]",
"name": "mock-cc-name"
},
{
"email": "[email protected]",
"name": "mock-cc-name-2"
}
],
"date": 1234567890,
"folders": [
"INBOX"
],
"from": [
{
"email": "[email protected]",
"name": "mock-from"
}
],
"grant_id": "mock-grant-id",
"id": "mock-id",
"object": "message",
"reply_to_message_id": "<[email protected]>",
"snippet": "mock-snippet",
"starred": false,
"subject": "mock-subject",
"thread_id": "mock-thread-id",
"to": [
{
"email": "[email protected]",
"name": "mock-to-name"
}
],
"unread": true
}
}
}

message.updated

An email message was updated.

{
"specversion": "1.0",
"type": "message.updated",
"source": "gma/nylas_core_sync/google/emails/historic",
"id": "mock-id",
"time": 0,
"data": {
"application_id": "mock-application-id",
"object": {
"body": "<p>mock body</p>",
"cc": [
{
"email": "[email protected]",
"name": "mock-cc-name"
},
{
"email": "[email protected]",
"name": "mock-cc-name-2"
}
],
"date": 1234567890,
"folders": [
"INBOX"
],
"from": [
{
"email": "[email protected]",
"name": "mock-from"
}
],
"grant_id": "mock-grant-id",
"id": "mock-id",
"object": "message",
"reply_to_message_id": "<[email protected]>",
"snippet": "mock-snippet",
"starred": false,
"subject": "mock-subject",
"thread_id": "mock-thread-id",
"to": [
{
"email": "[email protected]",
"name": "mock-to-name"
}
],
"unread": true
}
}
}