GMass API (v1)

Download OpenAPI specification:Download

CampaignDrafts

Creates a new Gmail DRAFT for a campaign that will be sent later.

This will create a DRAFT in your Gmail account and return the actual Gmail DRAFT Id. Then use /campaigns to send the campaign. DO NOT specify a value for campaignDraftId.

Request Body schema:
campaignDraftId
string

This is the DRAFT ID that will be returned. Do not specify it.

fromEmail
string

The from address for the campaign. Must match an authenticated From Address in the Gmail account.

subject
required
string
message
required
string
messageType
string

Set to either "html" or "plain". HTML messages will always result in a plain text message being auto generated by Google and sent along with the HTML MIME part.

listAddress
string

The list address for this campaign. Example: aaa-bbb-ccc@gmass.co

emailAddresses
string
cc
string

One or more Cc addresses, separated by a comma or any other standard delimiter. Cc addresses will receive a copy of each individual email sent as part of the campaign.

bcc
string

One or more Bcc addresses, separated by a comma or any other standard delimiter. Bcc addresses will receive a blind copy of each individual email sent as part of the campaign.

Array of objects (campaignDraftAttachment)

The list of attachments for this message

Responses

Request samples

Content type
{
  • "campaignDraftId": "string",
  • "fromEmail": "string",
  • "subject": "string",
  • "message": "string",
  • "messageType": "string",
  • "listAddress": "string",
  • "emailAddresses": "string",
  • "cc": "string",
  • "bcc": "string",
  • "attachments": [
    ]
}

Response samples

Content type
{
  • "campaignDraftId": "string",
  • "fromEmail": "string",
  • "subject": "string",
  • "message": "string",
  • "messageType": "string",
  • "listAddress": "string",
  • "emailAddresses": "string",
  • "cc": "string",
  • "bcc": "string",
  • "attachments": [
    ]
}

Campaigns

Lists all of your campaigns and their aggregate statistics.

query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
[
  • {
    }
]

Creates a new campaign and sends it.

Set when the campaign should send, along with other options like tracking in the campaignSettings object. You must already have a campaignDraftId value from the /api/campaigndrafts method.

path Parameters
campaignDraftId
required
string
Request Body schema:
openTracking
boolean

Choose whether to track opens. True or False.

clickTracking
boolean

Choose whether to track clicks. True or False.

sendTime
string

Do not specify to send a campaign right now. Otherwise, specify time with an optional time zone offset. Example: "04/27/21 14:30 -04:00" indicates April 27, 2021 at 2:30 PM EST time.

skipWeekends
boolean

Determines whether the scheduler should avoid sending this campaign on the weekend. True or False.

skipHolidays
boolean

Determines whether the scheduler should avoid sending this campaign on designated holidays. True or False.

friendlyName
string

A friendly name by which to identify this campaign.

allowedDays
string

Specify just certain days of the week to send this campaign. Submit a comma separated string where 1=Saturday, 2=Sunday, 3=Monday, 4=Tuesday, and so on.

previewText
string

Optional preview text which displays next to the subject line in most email clients. See https://www.gmass.co/blog/preview-text/

throttling
integer <int32>

Add a pause after each individual email that is sent as part of this campaign. Specify as 1, 2, or 3. See https://www.gmass.co/blog/mail-merge-feature-throttle-your-email-campaign/

suppressionDays
integer <int32>

Filter out recipients that have received another campaign from you in the last X days. Specify the number of days as an integer. 1=5 to 10 seconds.2=10 to 60 seconds.3=1 to 5 minutes. See https://www.gmass.co/blog/suppress-addresses-by-number-of-days-since-last-email/

suppressionCampaigns
string

Filter out recipients of a prior campaign. Specify a comma-separated string of campaign ID numbers. See https://www.gmass.co/blog/new-gmail-mail-merge-feature-use-suppression-lists-to-filter-out-recipients-of-past-campaigns/

sendAsReply
boolean

Specify whether the campaign should be sent as a new thread of an existing thread. True or False. See https://www.gmass.co/blog/send-email-campaign-as-reply-to-recent-conversation/

replyTo
string

Specify a custom Reply-To header for the campaign. If a Reply-To address is already set in your Gmail account, that will be used. This setting can override what's set in your Gmail account. See https://www.gmass.co/blog/reply-to-address/

createDrafts
boolean

Specify whether to actually send emails for this campaign or just create DRAFTs which can be reviewed and sent later. True or False. Default value is False. See https://www.gmass.co/blog/no-more-fear-preview-your-emails-as-drafts-then-send-them-with-one-click/

emailsPerDay
integer <int32>

Set a fixed number of emails that should be sent per day.

fromName
string

Specify the From Name that will be seen by your recipients. This will override the From Name set for the From Address in your Gmail account.

useSMTP
boolean

Specify whether the campaign should be sent through your SMTP server or natively through Gmail. True or False.

skipSent
boolean

Specify whether emails should be logged in your SENT folder. True or False.

verify
boolean

Specify whether each recipient address should be verified before sending. True or False.

campaignIdToReplyTo
integer <int32>

To be used in conjunction with sendAsReply. Specify an optional campaign if the replies should be threaded to a prior campaign.

imagesMode
string

Specify how images should be included. d: default, h: hosted, e: embedded

stageOneDays
integer <int32>

Number of days before this stage follow-up is sent

stageOneCampaignText
string

Text to use for the follow-up email.

stageOneCampaignId
integer <int32>

Custom content to be used for the follow-up email. If both stageOneCampaignId and stageOneCampaignText are set, then stageOneCampaignId will be used.

stageOneAction
string

Determines which behavior follow-ups should be sent based on. r=No Reply. o=No Open. c=No Click. s=No Reply or Click. a=Everyone

stageOneTime
string

Optionally, specify the time of day the follow-up should be sent. Specify without a time zone offset, but in the same time zone as sendTime.

stageTwoDays
integer <int32>
stageTwoCampaignText
string
stageTwoCampaignId
integer <int32>
stageTwoAction
string
stageTwoTime
string
stageThreeDays
integer <int32>
stageThreeCampaignText
string
stageThreeCampaignId
integer <int32>
stageThreeAction
string
stageThreeTime
string
stageFourDays
integer <int32>
stageFourCampaignText
string
stageFourCampaignId
integer <int32>
stageFourAction
string
stageFourTime
string
stageFiveDays
integer <int32>
stageFiveCampaignText
string
stageFiveCampaignId
integer <int32>
stageFiveAction
string
stageFiveTime
string
stageSixDays
integer <int32>
stageSixCampaignText
string
stageSixCampaignId
integer <int32>
stageSixAction
string
stageSixTime
string
stageSevenDays
integer <int32>
stageSevenCampaignText
string
stageSevenCampaignId
integer <int32>
stageSevenAction
string
stageSevenTime
string
stageEightDays
integer <int32>
stageEightCampaignText
string
stageEightCampaignId
integer <int32>
stageEightAction
string
stageEightTime
string
ABTest
boolean

Set to true or false, based on whether this campaign is being A/B tested

ABTestDecision
string

Set to m or a, based on whether the winner should be decided manually or automatically

ABTestHoursAfter
integer <int32>

Set to the number of hours after the test portion is sent that a winner should be picked

ABTestPercentage
integer <int32>

Set the percentage of the campaign that should be sent as the test portion

ABTestDecisionFactor
string

Only required if ABTestDecision=a. The parameter by which the winner will be decided. o=opens c=clicks r=replies

MultiSend
string

Specify a comma-separated list of accounts to distribute the volume over. MultiSend accounts must already be connected to your primary account.

Responses

Request samples

Content type
{
  • "openTracking": true,
  • "clickTracking": true,
  • "sendTime": "string",
  • "skipWeekends": true,
  • "skipHolidays": true,
  • "friendlyName": "string",
  • "allowedDays": "string",
  • "previewText": "string",
  • "throttling": 0,
  • "suppressionDays": 0,
  • "suppressionCampaigns": "string",
  • "sendAsReply": true,
  • "replyTo": "string",
  • "createDrafts": true,
  • "emailsPerDay": 0,
  • "fromName": "string",
  • "useSMTP": true,
  • "skipSent": true,
  • "verify": true,
  • "campaignIdToReplyTo": 0,
  • "imagesMode": "string",
  • "stageOneDays": 0,
  • "stageOneCampaignText": "string",
  • "stageOneCampaignId": 0,
  • "stageOneAction": "string",
  • "stageOneTime": "string",
  • "stageTwoDays": 0,
  • "stageTwoCampaignText": "string",
  • "stageTwoCampaignId": 0,
  • "stageTwoAction": "string",
  • "stageTwoTime": "string",
  • "stageThreeDays": 0,
  • "stageThreeCampaignText": "string",
  • "stageThreeCampaignId": 0,
  • "stageThreeAction": "string",
  • "stageThreeTime": "string",
  • "stageFourDays": 0,
  • "stageFourCampaignText": "string",
  • "stageFourCampaignId": 0,
  • "stageFourAction": "string",
  • "stageFourTime": "string",
  • "stageFiveDays": 0,
  • "stageFiveCampaignText": "string",
  • "stageFiveCampaignId": 0,
  • "stageFiveAction": "string",
  • "stageFiveTime": "string",
  • "stageSixDays": 0,
  • "stageSixCampaignText": "string",
  • "stageSixCampaignId": 0,
  • "stageSixAction": "string",
  • "stageSixTime": "string",
  • "stageSevenDays": 0,
  • "stageSevenCampaignText": "string",
  • "stageSevenCampaignId": 0,
  • "stageSevenAction": "string",
  • "stageSevenTime": "string",
  • "stageEightDays": 0,
  • "stageEightCampaignText": "string",
  • "stageEightCampaignId": 0,
  • "stageEightAction": "string",
  • "stageEightTime": "string",
  • "ABTest": true,
  • "ABTestDecision": "string",
  • "ABTestHoursAfter": 0,
  • "ABTestPercentage": 0,
  • "ABTestDecisionFactor": "string",
  • "MultiSend": "string"
}

Response samples

Content type
{
  • "campaignId": 0,
  • "subject": "string",
  • "friendlyName": "string",
  • "stage": 0,
  • "creationTime": "2019-08-24T14:15:22Z",
  • "fromLine": "string",
  • "statistics": {
    },
  • "status": "string",
  • "lists": [
    ],
  • "autoFollowups": [
    ]
}

For Zapier campaign dropdowns: Lists all of your campaigns and their aggregate statistics.

Responses

Response samples

Content type
{ }

Gets a single campaign and its aggregate statistics.

path Parameters
campaignId
required
integer <int32>

Responses

Response samples

Content type
{
  • "campaignId": 0,
  • "subject": "string",
  • "friendlyName": "string",
  • "stage": 0,
  • "creationTime": "2019-08-24T14:15:22Z",
  • "fromLine": "string",
  • "statistics": {
    },
  • "status": "string",
  • "lists": [
    ],
  • "autoFollowups": [
    ]
}

Lists

Lists_Lists

query Parameters
limit
integer <int32>
offset
integer <int32>
page
integer <int32>
search
string
q
string

Responses

Response samples

Content type
{
  • "count": 0,
  • "offset": 0,
  • "limit": 0,
  • "total": 0,
  • "lists": [
    ]
}

Creates a new email list

Creates a new list and returns a GMass list address alias

Request Body schema:
listAddress
string

The GMass-generated address to represent an email list. Looks like aaabbb-cccc@gmass.co

object (listSource)

Responses

Request samples

Content type
{
  • "listAddress": "string",
  • "listSource": {
    }
}

Response samples

Content type
{
  • "listAddress": "string",
  • "listSource": {
    }
}

Reports

Gets the recipients for a campaign.

Specify the numeric campaign ID to retrieve the recipients for that campaign.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>
stage
integer <int32>
date
string <date-time>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the recipients that opened a campaign.

Specify the numeric campaign ID to retrieve the "opens" for that campaign. Open tracking must have been enabled.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the recipients that clicked a URL in this campaign.

Specify the numeric campaign ID to retrieve the recipients that clicked in this campaign. Click tracking must have been enabled.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the recipients that unsubscribed from this campaign.

Specify the numeric campaign ID to retrieve the recipients that unsubscribed. Unsubscribed addresses apply account-wide and are eliminated from future campaigns. Use campaignId=0 for all account unsubscribes.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the recipients that bounced as a result of this campaign.

Specify the numeric campaign ID to retrieve the recipients that bounced. Bounced addresses apply account-wide and are eliminated from future campaigns.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the blocked recipients as a result of this campaign.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Gets the recipients that replied to this campaign.

Specify the numeric campaign ID to retrieve the recipients that replied.

path Parameters
campaignId
required
integer <int32>
query Parameters
limit
integer <int32>
offset
integer <int32>

Responses

Response samples

Content type
{
  • "metadata": {
    },
  • "data": [
    ]
}

Sample

Retrieves sample data for opens, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Retrieves sample data for clicks, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Retrieves sample data for unsubscribes, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Retrieves sample data for bounces, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Retrieves sample data for sends, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Retrieves sample data for replies, for use by third party platforms like Zapier and Integromat.

Responses

Response samples

Content type
[
  • {
    }
]

Sheets

Lists all of your Google Sheets

Responses

Response samples

Content type
[
  • {
    }
]

Lists all the worksheets in a given Google Sheet

path Parameters
sheetid
required
string

Responses

Response samples

Content type
[
  • {
    }
]

Transactional

Send a single transactional email through your Gmail/Google Workspace account

If you need to send a transactional email to just one recipient as opposed to a campaign, use this method. You can also send transactional email via the SMTP relay at smtp.gmass.co.

Request Body schema:
transactionalEmailId
string
fromEmail
string
fromName
string
to
string
cc
string
bcc
string
subject
string
message
string
messageRaw
string
object (transactionalSettings)

Responses

Request samples

Content type
{
  • "transactionalEmailId": "string",
  • "fromEmail": "string",
  • "fromName": "string",
  • "to": "string",
  • "cc": "string",
  • "bcc": "string",
  • "subject": "string",
  • "message": "string",
  • "messageRaw": "string",
  • "settings": {
    }
}

Response samples

Content type
{
  • "transactionalEmailId": "string",
  • "fromEmail": "string",
  • "fromName": "string",
  • "to": "string",
  • "cc": "string",
  • "bcc": "string",
  • "subject": "string",
  • "message": "string",
  • "messageRaw": "string",
  • "settings": {
    }
}

Unsubscribes

Adds an address to your account-wide unsubscribe list.

Request Body schema:
emailAddress
string
unsubscribeTime
string <date-time>

Responses

Request samples

Content type
{
  • "emailAddress": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "emailAddress": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z",
  • "sender": "string"
}

Deletes an email address from your unsubscribe list (resumes sending to the address).

query Parameters
emailAddress
required
string

Responses

Response samples

Content type
{
  • "emailAddress": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z",
  • "sender": "string"
}

Suppresses an email address for just a particular email campaign.

path Parameters
campaignId
required
integer <int32>
Request Body schema:
emailAddress
string
unsubscribeTime
string <date-time>

Responses

Request samples

Content type
{
  • "emailAddress": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z"
}

Response samples

Content type
{
  • "emailAddress": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z",
  • "sender": "string"
}

Unsubscribes a domain from your account (stops sending to this domain).

path Parameters
domain
required
string

Responses

Response samples

Content type
{
  • "domain": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z"
}

Deletes an unsubscribed domain from your account (resume sending to the domain).

path Parameters
domain
required
string

Responses

Response samples

Content type
{
  • "domain": "string",
  • "unsubscribeTime": "2019-08-24T14:15:22Z"
}

Retrieves all unsubscribed domains for your account.

Responses

Response samples

Content type
[
  • {
    }
]

User

Gets your account information

Responses

Response samples

Content type
{ }

Get a user's warm-up statistics.

Responses

Response samples

Content type
[
  • {
    }
]

Webhook

Method for platforms like Zapier and Integromat to create webhooks. This method cannot be used by an end GMass user. End users can manage webhooks from the dashboard.

Request Body schema:
id
integer <int32>
platformSource
string

Must be one of: Opens, Clicks, Replies, Bounces, Unsubscribes, Sends

eventType
string
Url
string
dataFormat
string
enabled
boolean

Responses

Request samples

Content type
{
  • "id": 0,
  • "platformSource": "string",
  • "eventType": "string",
  • "Url": "string",
  • "dataFormat": "string",
  • "enabled": true
}

Response samples

Content type
{
  • "id": 0,
  • "platformSource": "string",
  • "eventType": "string",
  • "Url": "string",
  • "dataFormat": "string",
  • "enabled": true
}

/// Method for platforms like Zapier and Integromat to remove webhooks. This method cannot be used by an end GMass user. End users can manage webhooks from the dashboard.

Request Body schema:
id
integer <int32>
platformSource
string

Must be one of: Opens, Clicks, Replies, Bounces, Unsubscribes, Sends

eventType
string
Url
string
dataFormat
string
enabled
boolean

Responses

Request samples

Content type
{
  • "id": 0,
  • "platformSource": "string",
  • "eventType": "string",
  • "Url": "string",
  • "dataFormat": "string",
  • "enabled": true
}

Response samples

Content type
{
  • "id": 0,
  • "platformSource": "string",
  • "eventType": "string",
  • "Url": "string",
  • "dataFormat": "string",
  • "enabled": true
}