{
  "openapi": "3.0.1",
  "info": {
    "title": "SMTP Email Sender for Workflow Notifications",
    "description": "Send a plain text or HTML email through your own SMTP account from an Apify run. Supports multiple recipients, CC/BCC, Reply-To, and file attachments.",
    "version": "1.0",
    "x-build-id": "mX5wE5AOnSOfsXi8M"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nimbryxo-studio~smtp-email-sender-for-workflow-notifications/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nimbryxo-studio-smtp-email-sender-for-workflow-notifications",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/nimbryxo-studio~smtp-email-sender-for-workflow-notifications/runs": {
      "post": {
        "operationId": "runs-sync-nimbryxo-studio-smtp-email-sender-for-workflow-notifications",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/nimbryxo-studio~smtp-email-sender-for-workflow-notifications/run-sync": {
      "post": {
        "operationId": "run-sync-nimbryxo-studio-smtp-email-sender-for-workflow-notifications",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "to",
          "subject",
          "smtpHost",
          "smtpUser",
          "smtpPassword"
        ],
        "properties": {
          "to": {
            "title": "To",
            "type": "string",
            "description": "Recipient email address(es). Separate multiple addresses with commas. Example: 'user@example.com' or 'alice@example.com, bob@example.com'"
          },
          "cc": {
            "title": "CC",
            "type": "string",
            "description": "Carbon copy recipient(s). Separate multiple addresses with commas."
          },
          "bcc": {
            "title": "BCC",
            "type": "string",
            "description": "Blind carbon copy recipient(s). Separate multiple addresses with commas. BCC addresses are hidden from other recipients."
          },
          "subject": {
            "title": "Subject",
            "type": "string",
            "description": "Email subject line."
          },
          "text": {
            "title": "Plain Text Body",
            "type": "string",
            "description": "Plain text email body. At least one of 'Plain Text Body' or 'HTML Body' must be provided. If both are set, email clients choose which to display."
          },
          "html": {
            "title": "HTML Body",
            "type": "string",
            "description": "HTML email body. Takes priority over plain text in most email clients. Example: '<h1>Hello</h1><p>This is a test.</p>'"
          },
          "replyTo": {
            "title": "Reply-To",
            "type": "string",
            "description": "Reply-to email address. When recipients reply, their response goes to this address instead of the sender."
          },
          "attachments": {
            "title": "Attachments",
            "type": "array",
            "description": "File attachments as base64-encoded objects. Each item needs 'filename' (string) and 'data' (base64 string). Example: [{\"filename\": \"report.pdf\", \"data\": \"base64data...\"}]"
          },
          "smtpHost": {
            "title": "SMTP Host",
            "type": "string",
            "description": "SMTP server hostname. Examples: smtp.gmail.com, smtp.office365.com, smtp.mail.yahoo.com, smtp.mailgun.org, smtp.sendgrid.net"
          },
          "smtpPort": {
            "title": "SMTP Port",
            "minimum": 1,
            "maximum": 65535,
            "type": "integer",
            "description": "SMTP server port. Use 587 for STARTTLS (recommended), 465 for SSL/TLS, or 25 for unencrypted.",
            "default": 587
          },
          "smtpUser": {
            "title": "SMTP Username",
            "type": "string",
            "description": "SMTP login username. Usually your full email address. For SendGrid, use 'apikey' as the username."
          },
          "smtpPassword": {
            "title": "SMTP Password",
            "type": "string",
            "description": "SMTP login password. For Gmail, use an App Password (Google Account > Security > App Passwords). For SendGrid/Mailgun, use your API key."
          },
          "useTls": {
            "title": "Use TLS/SSL",
            "type": "boolean",
            "description": "Enable TLS encryption. Port 587 uses STARTTLS, port 465 uses direct SSL. Recommended: always keep enabled.",
            "default": true
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}