<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1822615684631785&amp;ev=PageView&amp;noscript=1"/>

How to use the GMass API

We’ve launched a beta version of the GMass API that can handle basic GMass functionality around creating lists and sending campaigns. Over time, we’ll be adding more functionality, like accessing reporting data.

Our API is the only API we know of that allows you to completely create and send a cold email campaign all from within the API, without ever having to do anything in the user interface.

Getting Started

All endpoints begin with https://api.gmass.co/api/. The API is mostly RESTful and conforms to OpenAPI standards. To get started with the API:

  1. Create an API Key in your Dashboard. Go to the “API Keys” section.
  2. Visit the API homepage, which serves as a reference for all API methods.
  3. You can perform a test API call to retrieve all the Google Sheet titles in your account with this URL: https://api.gmass.co/api/sheets?apikey=your-api-key
  4. You can access test forms for all methods using our Swagger-generated site here. Note that the Swagger site does include descriptions of methods, but the more comprehensive documentation is at https://api.gmass.co/docs.

Authentication

You can authenticate into the API using your API key and passing it either:

  1. Via the query string as “apikey”
  2. Via an HTTP header using X-apikey

Note that it must be passed as “apikey” and not any other variation of that. api-key and api_key will not work.

How to send a campaign

The basic steps of sending a campaign through the API are similar to the steps you would take in the Gmail interface with the Chrome extension.

  1. Determine the Google Sheet and the corresponding Worksheet that your email list is in using the /api/sheets and api/sheets/{sheetid}/worksheets endpoints.
  2. Create a GMass list address (for example: [email protected]) using the /api/lists endpoint, in which you’ll use the spreadsheetId and worksheetId from step 1.
  3. Create a campaign DRAFT using the /api/campaigndrafts endpoint. You can add CC and BCC addresses here, as well as file attachments. This will return a Gmail DRAFT Id, which you can then use to send a campaign.
  4. Send the campaign with the /api/campaigns endpoint and pass in the Gmail DRAFT Id from step 3, plus other campaign settings.

You can store the GMass alias addresses and reuse them in campaigns, and thereby skip steps 1 and 2 most of the time.

We’ll be adding endpoints, functionality, and better documentation with time.

What else can you do?

Retrieve a list of all your campaigns using the campaigns method.

Retrieve the lists of recipients, opens, clicks, replies, unsubscribes, and bounces for a particular campaign.

Send a transactional email through your Google account. You can view a log of your transactional emails inside your dashboard.

Error handling

All calls to the API will return an HTTP 200 OK status code if the method call is successful.

If you don’t get an HTTP 200 OK status code, your code can assume there has been an error. Error codes include:

  • HTTP 401 Unauthorized: Passing in an invalid API key
  • HTTP 400 Bad Request: Passing in an invalid spreadsheet ID or invalid campaign ID
  • HTTP 404 Not Found: Calling a method that doesn’t exist. For example, https://api.gmass.co/api/invalidmethodname will return a 404
  • HTTP 500 Internal Server Error: Calling a method where the result is an error that is unexpected

Al API errors are logged and reported to our sysadmins. If we see a lot of errors from your account, you’ll likely be hearing from our support team.

Webhooks

The API described above allows you to poll GMass for information related to your campaigns and account. You might also be interested in our webhooks API which can “push” notifications to your server upon events like sends, opens, clicks, replies, unsubscribes, and bounces.

Ready to send better emails and save a ton of time?


GMass is the only tool for marketing emails, cold emails, and mail merge — all inside Gmail. Tons of power but easy to learn and use.


TRY GMASS FOR FREE

Download Chrome extension - 30 second install!
No credit card required
Love what you're reading? Get the latest email strategy and tips & stay in touch.
   


11 Comments
  1. I am setting up a platform for my sales team, which will be 20 reps at first and then grow as ill be marketing it to others.

    What is your pricing for 100-2000 accounts?

    This would flow thru my portal. but we will using gmass for the engine as it pertains to emails.

    Is this be something you would be interested in?

  2. I have learned newer and more effective things via your blog. One other thing I’d prefer to say is that often newer laptop or computer operating systems are inclined to allow much more memory to be used, but they furthermore demand more storage simply to function. If one’s computer cannot handle extra memory and the newest program requires that storage increase, it may be the time to shop for a new PC. Thanks

  3. I?ve read some good stuff here. Certainly worth bookmarking for revisiting. I wonder how much effort you put to make such a great informative site.

  4. I have been absent for a while, but now I remember why I used to love this web site. Thank you, I will try and check back more frequently. How frequently you update your website?

  5. Gerçek bir sonuç veren en iyi medyumu halu hoca ile sizlerde çalışınız. İletişim: +49 157 59456087 Aşık Etme Büyüsü, Bağlama Büyüsü gibi çalışmaları sizlerde yaptırabilirsiniz.

  6. Köln’de Gerçek bir sonuç veren en iyi medyumu halu hoca ile sizlerde çalışınız. İletişim: +49 157 59456087 Aşık Etme Büyüsü, Bağlama Büyüsü gibi çalışmaları sizlerde yaptırabilirsiniz.

  7. I have really learned new things through your blog. One other thing I’d really like to say is the fact that newer computer system os’s are inclined to allow more memory to be played with, but they furthermore demand more storage simply to work. If a person’s computer cannot handle extra memory as well as newest program requires that memory increase, it may be the time to buy a new Computer. Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

Find out why GMass is the most popular Gmail mail merge tool in the world

Easy to learn. Easy to use. Packed with time saving, email enhancing features.

Try GMass for free Then check out the quickstart guide to send your first mail merge email in minutes!

GMass

Share This