{
  "openapi": "3.0.1",
  "info": {
    "title": "Send Email - Your SMTP, Resend or SendGrid, With Attachments",
    "description": "Send transactional notifications and reports through your own SMTP, Resend or SendGrid account - your From address, your deliverability, your provider logs. Attach the run's dataset as CSV/JSON.",
    "version": "1.0",
    "x-build-id": "TSTNOB5Qo2I09bWyg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/feedsmith~send-email/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-feedsmith-send-email",
        "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/feedsmith~send-email/runs": {
      "post": {
        "operationId": "runs-sync-feedsmith-send-email",
        "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/feedsmith~send-email/run-sync": {
      "post": {
        "operationId": "run-sync-feedsmith-send-email",
        "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": [
          "provider"
        ],
        "properties": {
          "provider": {
            "title": "Provider",
            "enum": [
              "smtp",
              "resend",
              "sendgrid"
            ],
            "type": "string",
            "description": "Which service actually sends the message. All three use your own account, so the From address and deliverability are yours, not a shared sender's.",
            "default": "smtp"
          },
          "smtpHost": {
            "title": "SMTP host",
            "type": "string",
            "description": "Provider only when Provider = SMTP. Common presets: Gmail smtp.gmail.com, Outlook/Office 365 smtp.office365.com, Zoho smtp.zoho.com, Brevo smtp-relay.brevo.com, Mailgun smtp.mailgun.org, Amazon SES email-smtp.<region>.amazonaws.com. See the README for step-by-step setup."
          },
          "smtpPort": {
            "title": "SMTP port",
            "type": "integer",
            "description": "587 for STARTTLS (most providers), 465 for implicit TLS, 25 is often blocked by hosting providers - avoid it.",
            "default": 587
          },
          "smtpSecurity": {
            "title": "SMTP security",
            "enum": [
              "starttls",
              "tls",
              "none"
            ],
            "type": "string",
            "description": "How the connection is encrypted. Match this to your provider's documented port (587 = STARTTLS, 465 = implicit TLS).",
            "default": "starttls"
          },
          "smtpUser": {
            "title": "SMTP username",
            "type": "string",
            "description": "Usually your full email address."
          },
          "smtpPassword": {
            "title": "SMTP password",
            "type": "string",
            "description": "For Gmail, this must be an App Password (Google Account > Security > App passwords), not your normal login password."
          },
          "apiKey": {
            "title": "API key",
            "type": "string",
            "description": "Required when Provider = Resend or SendGrid. Create one in your Resend or SendGrid dashboard with send permission."
          },
          "fromEmail": {
            "title": "From email",
            "type": "string",
            "description": "The sender address. Must be a verified domain/sender in Resend or SendGrid, or a mailbox you can authenticate as over SMTP."
          },
          "fromName": {
            "title": "From name",
            "type": "string",
            "description": "Display name shown next to the From address, e.g. \"Acme Alerts\"."
          },
          "replyTo": {
            "title": "Reply-To",
            "type": "string",
            "description": "Optional. Where replies should go, if different from the From address."
          },
          "to": {
            "title": "To",
            "type": "string",
            "description": "Recipient(s), required. Comma, semicolon or newline separated (e.g. \"a@x.com, b@y.com\"), or \"Name <a@x.com>\". Max 20 unique recipients across To+Cc+Bcc combined - this Actor sends notifications/reports, not bulk mail."
          },
          "cc": {
            "title": "Cc",
            "type": "string",
            "description": "Optional. Same format as To."
          },
          "bcc": {
            "title": "Bcc",
            "type": "string",
            "description": "Optional. Same format as To. Bcc addresses are never shown in the run's OUTPUT, only counted."
          },
          "subject": {
            "title": "Subject",
            "type": "string",
            "description": "Required. Supports {{runId}}, {{datasetId}}, {{itemCount}}, {{date}} placeholders."
          },
          "text": {
            "title": "Text body",
            "type": "string",
            "description": "Plain-text body. Provide Text and/or HTML - at least one is required. Supports the same {{...}} placeholders as Subject."
          },
          "html": {
            "title": "HTML body",
            "type": "string",
            "description": "HTML body. If only HTML is given, a plain-text fallback is generated automatically by stripping tags. Placeholder values are HTML-escaped before insertion."
          },
          "datasetId": {
            "title": "Apify dataset ID",
            "type": "string",
            "description": "Optional. Attach and/or preview a run's dataset, e.g. {{resource.defaultDatasetId}} when chaining after another Actor via Integrations."
          },
          "attachmentFormat": {
            "title": "Attachment format",
            "enum": [
              "csv",
              "json",
              "none"
            ],
            "type": "string",
            "description": "Format of the dataset attachment, if \"Apify dataset ID\" is set.",
            "default": "csv"
          },
          "attachmentFileName": {
            "title": "Attachment file name",
            "type": "string",
            "description": "Optional. Default: \"dataset-<id>-<date>.csv\" or \".json\"."
          },
          "maxAttachmentRows": {
            "title": "Max attachment rows",
            "minimum": 1,
            "type": "integer",
            "description": "Stop attaching dataset rows after this many. Lower it if the attachment would exceed the 10 MB total size cap.",
            "default": 50000
          },
          "includeTablePreview": {
            "title": "Include table preview",
            "type": "boolean",
            "description": "Append an HTML table of the first rows of the dataset (see \"Preview rows\" below) to the HTML body, in addition to any attachment.",
            "default": false
          },
          "previewRows": {
            "title": "Preview rows",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "How many dataset rows to show in the table preview (1-100, up to 8 columns each), when \"Include table preview\" is on.",
            "default": 10
          },
          "extraAttachments": {
            "title": "Extra attachments",
            "type": "array",
            "description": "Optional. Array of {\"fileName\", \"url\"} (https only, fetched at run time) or {\"fileName\", \"contentBase64\", \"contentType\"} (inline). Counted in the 10 MB total attachment cap."
          },
          "dryRun": {
            "title": "Dry run",
            "type": "boolean",
            "description": "Validate everything and build the message (recipients, attachment size) without sending. Written to OUTPUT only. Not charged.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}