Use this API to create a new incoming email activity. Users can only create one activity at a time.
Note:
Actor | Permission |
---|---|
User | Must have 'Manage partition resources' privilege. |
Client Application | No additional permission required. |
Customer |
Accept-Language required | string Default: en-US Language locale accepted by client (used for locale specific fields in resource representation and in error responses). |
Accept required | string Default: application/json Content type accepted by client. |
Content-Type required | string Default: application/json Media type sent by the client. |
The request body is mandatory. Request body can be in either XML or JSON format.
Actor | Name | Description |
---|---|---|
User / Client Application | department.name | Name of the department in which the activity should be created. |
User / Client Application | payload.email.emailAddresses.from | Specifies the customer's email address. This must be a single email address. If "Customer departmentalization" setting is enabled, this API tries to find the customer in the department of the activity, otherwise it tries to find the customer across the application. If a customer with this email address does not exist:
|
Customer | payload.email.messageCenter.id | Specifies an active message center in the application. If customer departmentalization setting is enabled, the message center must be in the same department as the customer. |
User / Client Application / Customer | type.value | Type of the activity. Must be "email". |
User / Client Application / Customer | type.subtype.value | Subtype of the activity. Must be "general". |
User / Client Application / Customer | subject or attachments or content | Must have at least one of subject, attachments or content. |
User / Client Application / Customer | payload.email.emailAddresses.receiver | Specifies the email address of an active email alias in application. The email activity is associated with this email alias. Must be a single email address. This email address must match an active alias in the specified department. If actor is customer and customer departmentalization setting is enabled, the alias must be in the same department as the customer. |
Note: For customer, one of payload.email.emailAddresses.receiver or payload.email.messageCenter.id must be provided. The department of the activity is derived based on the value of payload.email.emailAddresses.receiver or payload.email.messageCenter.id.
| User / Client Application | secure | Flag to indicate whether the activity is a secure activity or not. Must be "true" or "false". If "true", the created activity is a secure email. Default value is "false".
If "Enable secure messaging" setting is disabled in the application, the customer cannot create a secure email and receives 400 error response code.|
| User / Client Application | payload.email.emailAddresses.to | All addresses must be in the valid email address format.|
| User / Client Application | payload.email.emailAddresses.cc | All addresses must be in the valid email address format.|
| User / Client Application | customer | This is used to create a new customer only if a customer with the email address provided using "payload.email.emailAddresses.from" attribute does not exist in the application. Otherwise, this attribute is ignored.
This API does not allow specifying "department.name" attribute in the customer element. Instead, when creating a new customer, customer's department is determined as follows:
Each attachment must be present within a separate attachment element. It must have the following representation:
Name | Description |
---|---|
altId | Alternate ID of the attachment. |
Name | Description |
---|---|
inline | Flag to indicate if this is an inline attachment or not. Must be set to true for inline attachments. |
contentId | This represents the identifier for the attachment. This is required only for inline attachments. |
Note about inline attachments: Inline attachments are supported using the cid URL scheme. The cid URL scheme allows references to attachments from the email content.
Array of objects (link) >= 0 items Link to the current activity. | |
object (_case) Brief information about the cases of the activity. | |
object (department) Department of the activity. | |
object (mode) Mode of the activity. | |
object (type) Type of the activity. | |
secure | boolean (secure) Indicates whether the activity is secure or not. |
sentOnBehalf | boolean (sentOnBehalf) Indicates whether the activity was created by a customer on behalf of another customer. |
object (status) Status of the activity. | |
priority | string (priority) Indicates the priority of the activity. |
created | string <date-time> (created) Date of creation of the activity. |
object (created) Activity creation details (user info). | |
lastModified | string <date-time> (lastModified) Date of modification of the activity. |
object (lastModifiedBy) Details of the last modification of the activity (user info). | |
dueDate | string <date-time> (dueDate) Due date of this activity. |
subject | string (subject) <= 255 characters Subject of this activity. |
object (language) Language of the activity. | |
object (userLastWorked) User who last worked on this activity. | |
object (customer) Customer of this activity. | |
object (classifications) Classifications of the activity. | |
object (queue) Queue associated with this activity. | |
object (attachments) Attachments of this activity. | |
object (notes) Notes of this activity. | |
contactPointData | string (contactPointData) Contains the contact point information. |
object (lastDepartment) Information about the previous department of this activity. | |
object (issueType) Issue type of the activity. | |
contentPurged | boolean (contentPurged) Indicates whether the activity content is purged. |
object (payload) Payload of the activity. | |
object (customAttributes) Custom attributes of the activity. | |
object (virtualAssistant) Virtual assistant information. | |
object (channel) Channel for the activity. | |
id | string (id) Id of the activity. |
Created
Bad Request
Unauthorized
Forbidden
Not Acceptable
Internal server error
{- "department": {
- "name": "service"
}, - "type": {
- "value": "email",
- "subtype": {
- "value": "general"
}
}, - "subject": "laptop issue",
- "payload": {
- "email": {
- "emailAddresses": {
- "from": "jhenry@customer.com",
- "receiver": "support@business.com"
}
}
}
}
{- "code": "400-101",
- "developerMessage": "Unsupported query parameter(s) supplied: '<query_parameter>'."
}