Delete bookmarks
This page describes how to delete a bookmark using the Async API, and the message format for deleting a bookmark with the Streaming API.
For more information about the Bookmarks feature, see Bookmarks.
Bookmarks - Async API
This section provides a basic example of how to delete a bookmark using the Async API. This request requires a conversation ID. You receive a conversation ID when you process a conversation with the Symbl.ai APIs.
Authentication
These requests require an access token, as described in Authenticate.
Delete a bookmark
To get a bookmark in a conversation, use the DELETE /v1/conversations/{conversationId}/bookmarks/{bookmarkId}
operation.
import fetch from 'node-fetch';
const accessToken = '<ACCESS_TOKEN>';
const conversationId = '<CONVERSATION_ID>';
const bookmarkId = '<BOOKMARK_ID>';
const fetchResponse = await fetch(`https://api.symbl.ai/v1/conversations/${conversationId}/bookmarks/${bookmarkId}`, {
method: 'delete',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
});
const responseBody = await fetchResponse.json();
console.log(responseBody);
Where:
<ACCESS_TOKEN>
is a valid API access token.<CONVERSATION_ID>
is the ID of a conversation that you previously processed.<BOOKMARK_ID>
is the ID of a bookmark that you previously created.
Response
If the request is successful, the operation returns a 204 success response.
Bookmarks - Streaming API
This section provides the message format for deleting a bookmark using WebSockets and the Streaming API.
Delete a bookmark
To delete a bookmark with the Streaming API during a conversation, send the following WebSocket message:
ws.send(JSON.stringify({
"type": "bookmark_request",
"operation": "delete",
"id": "<BOOKMARK_ID>",
}));
Where:
<BOOKMARK_ID>
is the ID of a bookmark that you created during the conversation.
Message parameters
The following table describes the parameters that can be used with this message.
Parameter | Required | Description |
---|---|---|
type | Yes | Value must be bookmark_request . |
operation | Yes | Value must be delete . |
id | Yes | ID of the bookmark to delete. |
Response
The following table describes the response body that is returned by this request.
Field | Description |
---|---|
type | The value is bookmark_response . |
operation | The value is delete . |
id | The unique identifier of the bookmark. |
label | A short label for the bookmark. |
description | A description of the bookmark. |
user | An object that contains details about the user that created the bookmark. |
user.name | The name of the user that created the bookmark. |
user.userId | The unique ID of the user that created the bookmark. |
user.email | The email address of the user that created the bookmark. |
beginTimeOffset | In seconds from the beginning of the conversation, when the bookmark starts capturing messages. |
duration | In seconds, how long the bookmark captures messages. |
messageRefs | A list of the messages that occurred during the duration of the bookmark. |
Example response
{
"type": "bookmark_response",
"operation": "delete",
"id": "6428584355823616",
"label": "pain point",
"description": "Customer found the interface difficult to use.",
"user": {
"name": "natalie",
"userId": "[email protected]",
"email": "[email protected]"
},
"beginTimeOffset": 10,
"duration": 15
}
Updated 4 months ago