v1

latestOpenAPI 3.0.02026-08-0645062.8 KB

Process email updates and deletions

This endpoint processes email updates and deletions based on the provided payload.

post/email-receive-webhook

Request body

triggerTypestring
userIdstring
connectionTypestring
connectionIdstring
isBulkImportboolean

Example request

{
  "triggerType": "updated",
  "userId": "user-123",
  "connectionType": "gmail",
  "connectionId": "conn-123",
  "data": {
    "fields": {
      "id": "msg-123",
      "threadId": "thread-123",
      "from": {
        "emailAddress": {
          "address": "sender@example.com"
        }
      },
      "to": [
        {
          "emailAddress": {
            "address": "recipient@example.com"
          }
        }
      ],
      "cc": [
        {
          "emailAddress": {
            "address": "cc@example.com"
          }
        }
      ],
      "bcc": [
        {
          "emailAddress": {
            "address": "bcc@example.com"
          }
        }
      ],
      "subject": "Email Subject",
      "emailBody": "Email body content",
      "receivedDateTime": "2023-01-01T12:00:00Z",
      "webLink": "https://example.com/email",
      "isRead": true
    },
    "rawFields": {
      "labelIds": [
        "TRASH"
      ],
      "parentFolderId": "folder-123"
    }
  }
}

Response

Successful response

messagestring

Example response

{
  "message": "Email processed successfully"
}