Send Email to Client’s Email Address

To send an email to a client’s email address, the system administrator needs to specify emailAccountId from which the message will be sent.

Permissions

  ----
  Permissions:INTEGRATOR,OPERATOR,SUPERVISOR
  ----

Request Parameters

ParameterTypeDescription
textstringEmail text
email.emailAccountIdlongIdentifier of the email account from which the message will be sent. Requested by the system administrator.
email.emailSubjectstringEmail subject. All messages in the thread are grouped by the subject of the email. This field is required. 
email.emailAddressstring Email address of the client to whom you want to send a message

HTTP Request

POST /api/v1/messages/email HTTP/1.1
Content-Type: application/json
Authorization: Bearer <integrator_token>
Content-Length: 118
Host: localhost: 8080
{
    "text": "message",
    "emailAccountId": 1,
    "emailSubject": "subject",
    "emailAddress": "test@test.ru"
}

Response Parameters

ParameterTypeDescription
idlongUnique identifier of the message in edna Chat Center
threadIdlongUnique identifier of the new thread for the sent message in edna Chat Center
clientIdlongUnique identifier of the client to whom the message was sent
clientExternalIdstringUnique external identifier of the client to whom the message was sent
agentIdlongUnique identifier of the agent from whom the message was sent

Example of a Successful HTTP Response

HTTP/1.1 200 OK
Vary: Origin
Vary: Access-Control-Request-Method
Vary: Access-Control-Request-Headers
Content-Type: application/json
Content-Length: 108
{
    "id": 1,
    "threadId": 2,
    "clientId": 1,
    "clientExternalId": "clientId",
    "agentId": 3
}