GETTING STARTED - MENU
Créditos e Limites
Componentes Status Page
TES

E-mail API

Documentação técnica: E-mail API.

E-mail API

Essa API permite automatizar solicitações de mensagens únicas e em massa e a recuperação do status enviado por meio de seus terminais. Ele usa o protocolo HTTP com TLS e aceita solicitações GET com parâmetros de string de consulta e solicitações POST com parâmetros JSON.

Autenticação do usuário

Para usar com êxito nossa API, você é obrigado a apresentar um nome de usuário válido - ou e-mail - e o token de autenticação associado. Ao criar a solicitação, você precisa fornecer os seguintes parâmetros:

Field

Details

Data Type

UserName

Your username or email

String

AuthenticationToken

Your authentication token. Get yours here

String

Detalhes de conexão

Hostname

api-messaging.wavy.global

APIs

SendEmail /v1/email/send SearchEmail /v1/email/status/search ListEmail /v1/email/status/list

Port

443 (https)

Protocol

HTTPS (TLS encryption)

Authentication

username + token

Portal

messaging.wavy.global

SendEmail

SendEmail request

curl --request POST \
--url https://api-messaging.movile.com/v1/email/send \
--header 'authenticationtoken: <authenticationtoken>' \
--header 'content-type: application/json' \
--header 'username: <username>' \
--data '{
"fromEmail": "[email protected]",
"fromName": "Notifications",
"replyTo": "[email protected]",
"subject": "Marketing e-mail",
"campaignAlias": "MyCampaign",
"recipients": [{
"correlationId": "1234",
"emailAddress": "[email protected]",
"emailName": "Recipient-1",
"extraInfo": "Extra e-mail info1",
"substitutionData": {
"name": "Recipient-1"
}
},
{
"correlationId": "567",
"emailAddress": "[email protected]",
"emailName": "Recipient-2",
"extraInfo": "Extra e-mail info2"
}
],
"emailHtml": "<html> Hi, {{name}}, this is the email HTML body </html>",
"emailText": "Email text body",
"substitutionData": {
"name": "Recipient-1"
},
"attachments": [{
"data": "Q29uZ3JhdHVsYX2FuIGJhc2U2NCBkZWNvZGUh",
"name": "billing.pdf",
"type": "application/pdf"
}]
}'

POST https://api-messaging.wavy.global/v1/email/send Content-Type: application/json

O corpo da solicitação deve conter um objeto JSON no qual as informações são envelopadas com os seguintes campos. Campos com * são obrigatórios.

Field

Details

Type

fromEmail*

Email’s sender address. Ex. [email protected]

String

fromName*

Email’s sender name. Ex. Notification.

String

replyTo

Email address used to compose the email’s “Reply-To” header.

String

subject

Email subject line.

String

campaignAlias

Campaign name.

String

recipients*

Array of recipients.

correlationId

Identifier generated by the client.

String

emailAddress*

Valid email address of a recipient.

String

emailName

Name of the recipient, associated to the emailAddress

String

extraInfo

Any extra info set by the user when the email was sent.

String

emailHTML

HTML content for the email’s text/html MIME part.

String

emailText

Text content for the email’s text/plain MIME part.

String

substitutionData

Mapping of tags, within {{}} marks, that should be replaced on html body.

attachments

Array of attachment files.

data

The content of the attachment as a Base64 encoded string. The string should not contain \r\n line breaks.

String

name

The filename of the attachment (for example, document.pdf).

String

type

The MIME type of the attachment; e.g., text/plain, image/jpeg, audio/mp3, video/mp4, application/msword, application/pdf, etc., including the charset parameter (ex: text/html; charset=“UTF-8”) if needed. The value will apply as-is to the Content-Type header of the generated MIME part for the attachment.

String

SendEmail response

{
"id": "abcd-1234-efgh-5678-ijkl-9999",
"recipients": [
{
"correlationId": "5678",
"id": "9i9j9k9l-5e6f7g8h-0i0j0k0l-1a2b3c4d"
},
{
"correlationId": "5678",
"id": "9i9j9k9l-5e6f7g8h-0i0j0k0l-1a2b3c4d"
}
]
}

O corpo da resposta conterá um objeto JSON com informações de rastreamento relacionadas à solicitação de email:

Field

Details

Type

id

UUID generated for this email request.

String

correlationId

The same correlationId from the request.

String

recipients

Tag corresponding of a id and correlationId for every request recipient.

SearchEmailStatus request

Example:
{
"correlationIds": ["1234", "5678", "7890"],
"ids": ["1234-5678-9asd-fghj", "qwer-1234-asdf-0987",
"zxcv-4567-ghjk-6789"],
"startDate": "2017-04-27T10:00:00Z",
"endDate": "2017-04-28T10:00:00Z"
}

POST https://api-messaging.wavy.global/v1/email/status/search Content-Type: application/json

Recupera informações sobre um email enviado anteriormente, dados seus IDs, correlationIds e uma data de intervalo.

Field

Details

Type

ids*

UUID generated for this email. Must correspond to the respective correlationId.

String

correlationIds

The same correlationId from the request. Must corresponds to the respective id.

String

startDate

Start date for search interval. Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

String

endDate

End date to search interval. Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

String

ListEmailStatus request

POST https://api-messaging.wavy.global/v1/email/status/list Content-Type: application/json

Recupera informações sobre um email enviado anteriormente, considerando seu usuário e token. Este método retorna todos os emails que ainda não foram verificados.

List and Search EmailStatus response

[{
"recipient": {
"id": "1234-5678-9asd-fghj",
"correlationId": "1234",
"emailAddress": "[email protected]",
"emailName": "Recipient-1",
"extraInfo": "Extra e-mail info1"
},
"fromEmail": "[email protected]",
"fromName": "Notificactions",
"createdAt": 12345678910,
"createdDate": "2017-04-28T13:10:10.336Z",
"sent": true,
"sentStatusCode": 2,
"sentStatus": "SENT_SUCCESS",
"sentAt": 9638527410,
"sentDate": "2017-04-28T13:10:10.336Z",
"delivered": true,
"deliveredStatusCode": 2,
"deliveredStatus": "SENT_SUCCESS",
"deliveredAt": 9876543210,
"deliveredDate": "2017-04-28T13:10:10.336Z",
"opened": true,
"openedAt": 9638527410,
"openedDate": "2017-04-28T13:10:10.336Z",
"clicked": true,
"clickedAt": 741258963,
"clickedDate": "2017-04-28T13:10:10.336Z",
"campaignId": 1,
"campaignAlias": "demo1"
}, {
"recipient": {
"id": "qwer-1234-asdf-0987",
"correlationId": "5678",
"emailAddress": "[email protected]",
"emailName": "Recipient-1",
"extraInfo": "Extra e-mail info1"
},
"fromEmail": "[email protected]",
"fromName": "Notificactions",
"createdAt": 12345678910,
"createdDate": "2017-04-28T13:10:10.336Z",
"sent": true,
"sentStatusCode": 2,
"sentStatus": "SENT_SUCCESS",
"sentAt": 9876543210,
"sentDate": "2017-04-28T13:10:10.336Z",
"delivered": true,
"deliveredStatusCode": 2,
"deliveredStatus": "SENT_SUCCESS",
"deliveredAt": 9876543210,
"deliveredDate": "2017-04-28T13:10:10.336Z",
"opened": true,
"openedAt": 9638527410,
"openedDate": "2017-04-28T13:10:10.336Z",
"clicked": true,
"clickedAt": 741258963,
"clickedDate": "2017-04-28T13:10:10.336Z",
"campaignId": 1,
"campaignAlias": "demo1"
}, {
"recipient": {
"id": "zxcv-4567-ghjk-6789",
"correlationId": "0987",
"emailAddress": "[email protected]",
"emailName": "Recipient-1",
"extraInfo": "Extra e-mail info1"
},
"fromEmail": "[email protected]",
"fromName": "Notificactions",
"createdAt": 12345678910,
"createdDate": "2017-04-28T13:10:10.336Z",
"sent": true,
"sentStatusCode": 2,
"sentStatus": "SENT_SUCCESS",
"sentAt": 9876543210,
"sentDate": "2017-04-28T13:10:10.336Z",
"delivered": true,
"deliveredStatusCode": 2,
"deliveredStatus": "SENT_SUCCESS",
"deliveredAt": 9876543210,
"deliveredDate": "2017-04-28T13:10:10.336Z",
"opened": true,
"openedAt": 9638527410,
"openedDate": "2017-04-28T13:10:10.336Z",
"clicked": true,
"clickedAt": 741258963,
"clickedDate": "2017-04-28T13:10:10.336Z",
"campaignId": 1,
"campaignAlias": "demo1"
}]

Recupera informações sobre um email enviado anteriormente, considerando seu usuário e token. Este método retorna todos os emails previamente não consultados.

Field

Details

Type

emailStatus

Block for each email information.

recipient

Block for recipient email information.

id

The same id from the request.

correlationId

The same correlationId from the request.

emailAddress

Email address of the recipient.

emailName

Name of the recipient, associated to the emailAddress.

extraInfo

Any extra information.

fromEmail

Email’s sender address. Ex. [email protected]

fromName

Email’s sender name. Ex. Notification, Not reply, etc.

createdAt

When the email was created. It is an Epoch Date.

Long

createdDate

When the message was created. Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

sent

Flag indicating if the email was sent.

Boolean

sentStatusCode

Sent status code. Check Sent Status Codes for more information.

Long

sentStatus

Sent status.

String

sentAt

When the email was sent. It is an Epoch Date.

Long

sentDate

When the email was sent.Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

delivered

Flag indicating if the email was delivered to the recipient.

Boolean

deliveredStatusCode

Delivered status code. Check Delivered Status Codes for more information.

Long

deliveredStatus

Delivered status.

String

deliveredAt

When the email was delivered. It is an Epoch Date.

Long

deliveredDate

When the email was delivered. Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

open

Flag indicating if the email was opened by the recipient.

Boolean

openedAt

When the email was opened. It is an Epoch Date.

Long

openedDate

When the email was opened. Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

clicked

Flag indicating if the email was clicked by the recipient.

Boolean

clickedAt

When the email was clicked. It is an Epoch Date.

Long

clickedDate

When the email was clicked by the recipient.Format yyyy-MM-dd’T'HH:mm:ssZ. Date format with time and time zone ISO

campaignId

Campaign identifier.

Long

campaignAlias

Campaign name.

String

Status Codes

Sent Status Codes

Um código de status enviado representa o status de uma mensagem que passa por nosso sistema e é enviada para a operadora.

Success codes

2

SENT_SUCCESS

Sent to Wavy successfully

Wavy error codes

301

INTERNAL_ERROR

Wavy internal error

Delivered Status Codes

Um código de status entregue representa o relatório de status que recebemos do servidor sobre o email.

Success codes

3

DELIVERED_SUCCESS

Delivered to server successfully

Carrier error codes

103

NOT_DELIVERED

Email accepted but has not delivered the e-mail.

Opened Status Codes

A open status code represents the e-mail opened by the customer.

Success codes

4

OPENED_SUCCESS

Delivered to server successfully

Carrier error codes

104

NOT_OPENED

Email accepted but has not opened by the customer

Clicked Status Codes

A clicked status code represents the status report when the customer clicked over the email. |||| |–|–|–| |5|CLICKED_SUCCESS|Clicked by the customer successfully|

Carrier error codes

104

NOT_CLICKED

Email accepted but has not clicked by the customer