Generate signed URL to upload an attachment

Overview

This API allows to generate signed URL to upload one attachment at a time.

Actor can upload attachments using 'contentUrl' returned in the response of this API.

Licenses

The logged in user must have the following licenses:

  • eGain Advisor Desktop or eGain MailPlus: To upload an attachment for email app.
  • eGain Advisor Desktop or eGain CallTrackPlus: To upload an attachment for calltrack app.
  • Any User License: To upload an attachment for task app. Refer Licenses section for more information.
SecurityoAuthUser or oAuthClient
Request
path Parameters
id
required
string

ID of the department for which upload attachment pre signed URL is needed.

Example: 999
header Parameters
Accept
required
string
Default: application/json

The content type accepted by the client.

Enum: "application/json" "application/xml"
Accept-Language
required
string

The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).

Enum: "en-US" "es-ES" "fr-FR" "it-IT" "de-DE" "nl-NL" "pt-BR" "pt-PT" "da-DK" "ru-RU" "fr-CA" "zh-CN" "ja-JP" "ko-KR" "sv-SE"
Request Body schema: application/json
object (link)

Self link that can be used to retrieve this attachment

fileName
string (fileName)

File name of the attachment

name
required
string [ 1 .. 255 ] characters [a-zA-Z0-9]|@|\s|:|.|_|-|&|[\x80-\xFF]

Name of file with extension.

contentType
required
string (contentType)

Mime-type of the attachment

size
required
integer <int64> (size)

Attachment size in bytes

app
required
string

Application type

Enum: "email" "task" "calltrack"
type
required
string

Attachment type

Enum: "attachment.inbound" "attachment.outbound" "attachment"
signedUrlExpiry
string <date-time>

Signed URL expiry time in GMT.

encodingType
string (encodingType)

Content-transfer-encoding of the attachment

charset
string (charset)

character-set encoding of the attachment

blocked
boolean (blocked)

Field to convey if the attachment is blocked

inline
boolean (inline)

Field to convey if the attachment is an inline attachment

contentId
string (contentId)

Cid of the inline attachment

contentUrl
string (contentUrl)

Url of the content

created
string <date-time>

Created time in GMT

content
string (content)

content of the attachment

messageText
string (messageText)

Informational text about the attachment.

id
string (id)

ID of the attachment

altId
string (altId)

Alternate ID of the attachment

Responses
200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

500

Internal server error

post/department/{id}/assets/preupload
Request samples
application/json
{
  • "app": "email",
  • "type": "attachment.inbound",
  • "name": "bird.jpg",
  • "contentType": "image/jpeg",
  • "size": 17245
}