Email Gateway API Reference (1.0.0)

Download OpenAPI specification:Download

Welcome to the Email gateway API reference.

The Email Gateway API is a REST based API, and it uses resource-oriented URLs, and common HTTP response codes to indicate API errors. All requests are authenticated using an x-api-key header.

Authentication

key

Security Scheme Type API Key
Header parameter name: x-api-key

Email

Send email

Send email

Authorizations:
Request Body schema: application/json

Email subject line

subject
required
string

The subject line

body
required
string

The body of the email

bodyType
required
string

The bodyType of the email (text | html)

from
required
string

The from email address

to
required
Array of strings
applicationId
required
string

The application Id used for verification

statusCallback
string

Location to send email status updates

Responses

Request samples

Content type
application/json
{
  • "subject": "This is the subject line",
  • "body": "This is the email body",
  • "bodyType": "text",
  • "from": "from@phsa.ca",
  • "to": [
    ],
  • "applicationId": "Application1",
  • "statusCallback": "http://site.com"
}

Response samples

Content type
application/json
{
  • "ResponseMetadata": {
    },
  • "MessageId": "010d0179aaa67b7d-af3a19d8-259e-482d-975b-f24b38170eff-000000"
}

Key

Creates a new API key

Creates a new API key

Authorizations:

Responses

Response samples

Content type
application/json
{
  • "id": "715rx8xy1m",
  • "value": "qNpqGcBt3Y1J75RrY7qzLBqVXTDEsGg7p2H1dWa1",
  • "name": "ApplicationId-Application1-162207675310",
  • "enabled": true,
  • "createdDate": "2021-05-27T17:44:00.507Z",
  • "lastUpdatedDate": "2021-05-27T17:44:00.507Z",
  • "stageKeys": [
    ]
}

Delete an API key

Delete an API key

Authorizations:
path Parameters
keyId
required
string

keyId for the API key

Responses

Response samples

Content type
application/json
{
  • "message": "key deleted"
}