Skip to content

Latest commit

 

History

History
103 lines (79 loc) · 3.37 KB

File metadata and controls

103 lines (79 loc) · 3.37 KB

Send Livechat Transcript

This endpoint is used by agents and managers to schedule an email transcript to be sent once the chat is closed.

{% hint style="info" %}

  • It requires the send-omnichannel-chat-transcript permission.
  • The room must be opened. {% endhint %}
URL Requires Auth HTTP Method
/api/v1/livechat/transcript/:rid YES POST

Headers

Argument Example Required Description
X-User-Id myuser-name Required The authenticated user ID.
X-Auth-Token myauth-token Required Auth token.

Path Parameters

ArgumentExampleRequiredDescription
ridtcbbSmWSLR5uo5PBWRequiredThe Id of the Live Chat room.

Payload Parameters

ArgumentExampleRequiredDescription
emailfim@rocket.chatRequiredThe email address where the transcript should be sent.
subjectTest request TranscriptRequiredThe subject of the email.

Example Payload

{
    "email":"funke@test.com",
    "subject":"Test request Transcript"
}

Example Call

curl -L -X POST 'http://localhost:3000/api/v1/livechat/transcript/AHsFiNLYWQK35jgtS" \
-H 'x-auth-token: qlHA60g5JQjJJG7C_8MgXoFnOiRQ8X9TWVVq4AcQeFb' \
-H 'x-user-id: rbAXPnMktTFbNpwtJ' \
-H 'Content-Type: application/json' \
--data-raw '{
    "email":"funke@test.com",
    "subject":"Livechat Transcript"
}'

Example Result

Success

{
  "success": true
}

Error

Any of the following errors can occur on the endpoint.

  • Authorization: Requires an authentication token for the request to be made.
  • No Permission: Occurs when the authenticated user doesn't have send-omnichannel-chat-transcript permission.
  • Transcript Requested: Occurs when a transcript has been requested for this room. See livechat-transcript-2.md and delete the current request before requesting for the transcript again.

{% tabs %} {% tab title="Authorization" %}

{
    "status": "error",
    "message": "You must be logged in to do this."
}

{% endtab %}

{% tab title="No Permission" %}

{
    "success": false,
    "error": "User does not have the permissions required for this action [error-unauthorized]"
}

{% endtab %}

{% tab title="Transcript Requested" %}

{
    "success": false,
    "error": "Transcript already requested [error-transcript-already-requested]",
    "errorType": "error-transcript-already-requested"
}

{% endtab %} {% endtabs %}

Change Log

Version Description
6.4.0 Added