Skip to content

Get started with the Go-Mailer API

The Go-Mailer API is structured around REST and lets you manage important resources in your account from your own applications.

It uses predictable URL structures and supports the most common HTTP verbs and error codes.

  • REST
  • Bearer authentication
  • v1

Making requests

Every request is made to an endpoint path on the Go-Mailer API host.

Request
curl https://api.go-mailer.com/<endpoint-path>

Client libraries

You can use our utility packages for Node.js, Python and PHP.

Install
yarn add @go-mailer/go-mailer

Authentication

The Go-Mailer API uses API keys to authenticate every request. You'll find your keys under Security settings in your account. Requests are authenticated using Bearer auth.

Your API key has elevated privileges in your account, so keep it safe. Don't share it in publicly accessible places such as client-side code or public repositories.

Authenticated request
curl https://api.go-mailer.com/<endpoint-path> -H "Authorization: Bearer <API_KEY>"

Response body

Every response has the same shape.

Response body fields
FieldTypeDescription
errorstring | null

A message describing any error that occurred while processing the request. It's null when there's no error.

payloadobject | null

key => value pairs returned with successful responses. It's null when an error occurs while processing the request.

payload.dataResource | Resource[]

The object, or list of objects, the request was made for.

payload.meta.sizenumber

The number of instances of the resource that match the query.

Response codes

  • 200 OKEverything worked as expected.
  • 400 Bad RequestThe request was unacceptable, often due to a missing required parameter.
  • 403 UnauthorizedThe request does not have the required authorization, usually because of an incorrect API key.
  • 404 Not FoundThe requested resource doesn't exist.
  • 500 Server ErrorSomething went wrong on the Go-Mailer servers.