Send Mailer Endpoint
    • Dark
      Light
    • PDF

    Send Mailer Endpoint

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/mailer

    Send emails to users from your workspace.

    VersionDescription
    5.4.0Added
    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example
    {
      "from": "[email protected]",
      "subject": "Welcome to the Test Newsletter",
      "body": "Thank you for subscribing to the Test Newsletter. If this was not you feel free to unsubscribe by hitting the following button [unsubscribe]",
      "dryrun": "true"
    }
    object
    from
    string Required

    A valid email address to send mails from.

    subject
    string Required

    The subject of the email.

    body
    string

    The body of the email. You must use [unsubscribe] for the unsubscription link. You may use [name], [fname], [lname] for the user's full name, first name or last name, respectively. You may use [email] for the user's email.

    dryrun
    string

    A boolean value. If true, will only send one email to the same address as in the From parameter.

    Responses
    200

    OK

    Success
    {
      "success": true
    }
    object
    success
    boolean
    400

    Bad Request

    Invalid From Address
    {
      "success": false,
      "error": "Invalid from address [error-invalid-from-address]",
      "errorType": "error-invalid-from-address",
      "details": {
        "function": "Mailer.sendMail"
      }
    }
    Expand All
    object
    success
    boolean
    error
    string
    errorType
    string
    details
    object
    function
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.