Jump to: navigation, search

Email API Version 2

Updated in 8.5.110.07

HTTP Method URI
POST /genesys/2/email/{serviceName}
HTTP Header Value
Content-Type
  • multipart/form-data
  • application/x-www-form-urlencoded (starting in 8.5.110.07)
Parameter Name Sample Value Description Required/Optional Comments
firstName "John" first name of the customer Required
lastName "Doe" last name of the customer Required
fromAddress "jdoe@gmail.com" email address of the customer Required
subject "Help with account" email subject

Required

text "I need help with my account" email body as plain text

Required

mailbox "support@company.com" the address to which the email is to be delivered Optional This value takes priority over any configured "mailbox" in the WebAPI application on Config Server
userData key1=value1 User data — can be submitted multiple times Optional
userData key2=value2 User data — can be submitted multiple times Optional
files files to be attached to the email
Important
Use the multipart/form-data Content-Type if you need to attach files. With the application/x-www-form-urlencoded Content-Type, this parameter is ignored.
Optional
Constraints Default Value Configuration Parameter Comments
Max no. of files 10 Options / email / max_files
Max size of the content in bytes 10485760 (for 10MB) or 26214400 (for 25MB). Options / email / max_size
File Types pdf,doc,txt,jpg,png,gif,bmp,zip Options / email / file_types If the parameter "file_types" is configured, it completely overrides the default value
Configuration Parameter Comments
Options / email / mailbox The address to which the email is to be delivered. If no value is set in the incoming request and if this value is set on Config Server then the Config Server value will be set to the mailbox value from the request to Email Server. If neither of these values is set, then Email Server uses its default value.
Options / email / tenant Tenant name which has been assigned to email servers

Request

Content-Type: multipart/form-data; 
boundary="WebKitFormBoundaryE19zNvXGzXaLvS5C"
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="firstName"
 
Name
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="lastName"
 
LastName
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="fromAddress"
 
john@doe.com
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="subject"
 
Hi hello
----WebKitFormBoundaryE19zNvXGzXaLvS5C
Content-Disposition: form-data; name="text"
 
This is the text
----WebKitFormBoundaryE19zNvXGzXaLvS5C


Response

HTTP 200 - success
{
  "statusCode": 0,
  "interactionId":"0000KaA0C8XH003X"
}
HTTP 200 - failure (server down, network failure, etc. Try again)
{
  "statusCode": 1
}
This page was last edited on July 21, 2021, at 15:43.
Comments or questions about this documentation? Contact us for support!