Jump to: navigation, search
(added text, messageType, and treatAs parameters)
m (Reverted edits by Xavier (talk) to last revision by KrisMcG)
 
(One intermediate revision by the same user not shown)
Line 19: Line 19:
  
 
==Parameters==
 
==Parameters==
{{Chgbar_open}}
 
 
{|
 
{|
 
! Parameter
 
! Parameter
Line 29: Line 28:
 
| fileId
 
| fileId
 
| The document's identity in the chat.
 
| The document's identity in the chat.
|-
 
|text
 
|(Optional) The text to send to the customer.
 
|-
 
|messageType
 
|(Optional) Defines the message type. Note that this parameter must be provided together with the '''text''' parameter.
 
|-
 
|treatAs
 
|(Optional) Specifies how the message should be treated: Normal or System. Note that this parameter must be provided together with the '''text''' parameter.
 
|-
 
 
|}
 
|}
{{Chgbar_close}}
 
 
  
 
==Sample==
 
==Sample==

Latest revision as of 11:20, June 15, 2017

DeleteFile

This operation is part of the Chat API section of the Web Services API.

Important
After you execute this operation, use the RemoveAttachment operation in to remove the unused document from Universal Contact Server database. If the related document is no longer referenced by any attachment in any interaction or standard response, the document record is removed from database.

Overview

This request deletes an uploaded document from the specified chat.

Request URL /api/v2/me/chats/{id}
HTTP Method POST
Required Features api-multimedia

Parameters

Parameter Value
operationName DeleteFile
fileId The document's identity in the chat.

Sample

Request

POST api/v2/me/chats/0001PaBMYY3600R8 
 
{
 "operationName": "DeleteFile", 
 "fileId": "009F5790DAD80068"
}

Response

{
  "statusCode": 0
}

Notification

{
    "chatPath": "/chats/0001PaBMYY3600R8",
    "chatUri": "http://.../api/v2/chats/0001PaBMYY3600R8",
    "messageType": "MessageLogUpdated",
    "messages": [
        {
            "attachment": {
                "fileId": "009F5790DAD80068"
            },
            "from": {
                "id": "009F5790DA8D0066",
                "nickname": "TestName",
                "participantId": "009F5790DA8D0066",
                "path": "/users/0bcb93c9854f41d6ad89344047ec3223",
                "type": "Agent",
                "uri": "http://.../api/v2/users/0bcb93c9854f41d6ad89344047ec3223",
                "visibility": "All"
            },
            "index": 8,
            "noticeText": "file-deleted",
            "timestamp": "2016-07-21 17:24:06.000+0300",
            "timestampSeconds": 1469111046000,
            "type": "SystemCommand",
            "visibility": "All"
        }
    ],
    "notificationType": "NewMessages"
}
This page was last edited on June 15, 2017, at 11:20.
Comments or questions about this documentation? Contact us for support!