[POST] Task Speaker
Use this request to create a speaker in a specific task and workspace.
Task Speaker
POST/api/v1.0/external/transcripts/speakers/tasks/{taskId}/{workspaceId}
Path Parameters
taskId
integer
The ID that identifies the task to retrieve data on. This ID is always unique and never changes after it has been created.
workspaceId
integer
The ID that identifies the workspace to retrieve data on. This ID is always unique and never changes after it has been created.
Body application/json ExternalTaskSpeakerModel
ExternalTaskSpeakerModelspeakerId
string
The unique identifier of your Speaker.
speakerName
string
The name of your Speaker.
speakerPrefix
string (optional)
Optional prefix for your Speaker.
speakerSuffix
string (optional)
Optional suffix for your Speaker.
isDefault
boolean
Defines whether the Speaker is the default
Example Request
curl -X 'POST' \
'https://cloud.smartdocumentor.net/api/v1.0/external/transcripts/speakers/tasks/1234/5678' \
--header 'Authorization: Bearer {your access token here}' \
--header 'accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"speakers": [
{
"speakerId": "90edf137-ea2a-4b59-bf51-45446299d47e",
"speakerName": "Some Name",
"speakerPrefix": "",
"speakerSuffix": "",
"isDefault": false
}
]
}'var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://cloud.smartdocumentor.net/api/v1.0/external/transcripts/speakers/tasks/1234/5678");
request.Headers.Add("Authorization", "Bearer {your access token here}");
request.Headers.Add("Accept", "application/json");
var content = new StringContent("{\r\n \"speakers\": [\r\n {\r\n \"speakerId\": \"90edf137-ea2a-4b59-bf51-45446299d47e\",\r\n \"speakerName\": \"Some Name\",\r\n \"speakerPrefix\": \"\",\r\n \"speakerSuffix\": \"\",\r\n \"isDefault\": false\r\n }\r\n ]\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());import requests
import json
url = "https://cloud.smartdocumentor.net/api/v1.0/external/transcripts/speakers/tasks/1234/5678"
payload = json.dumps({
"speakers": [
{
"speakerId": "90edf137-ea2a-4b59-bf51-45446299d47e",
"speakerName": "Some Name",
"speakerPrefix": "",
"speakerSuffix": "",
"isDefault": False
}
]
})
headers = {
'Authorization': 'Bearer {your access token here}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {your access token here}");
myHeaders.append("Content-Type", "application/json");
myHeaders.append("Accept", "application/json");
var raw = JSON.stringify({
"speakers": [
{
"speakerId": "90edf137-ea2a-4b59-bf51-45446299d47e",
"speakerName": "Some Name",
"speakerPrefix": "",
"speakerSuffix": "",
"isDefault": false
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw
};
fetch("https://cloud.smartdocumentor.net/api/v1.0/external/transcripts/speakers/tasks/1234/5678", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));Responses
{
"speakerId": "90edf137-ea2a-4b59-bf51-45446299d47e",
"speakerName": "Some Name",
"speakerPrefix": "",
"speakerSuffix": "",
"isDefault": false
}Response Body ExternalTaskSpeakerModel
ExternalTaskSpeakerModelspeakerId
string
The unique identifier of your Speaker.
speakerName
string
The name of your Speaker.
speakerPrefix
string (optional)
Optional prefix for your Speaker.
speakerSuffix
string (optional)
Optional suffix for your Speaker.
isDefault
boolean
Defines whether the Speaker is the default
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "SpeakerIdRequired",
"status": 400,
"detail": "All speakers must have a valid ID.",
"instance": null,
"extensions": {
"traceId": "00-de637cdee9a55d62de690f00efeb27ee-a498fdae355af2be-01"
}
}Response Body Problem Detail JSON Object
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.6.1",
"title": "InternalError",
"status": 500,
"detail": "An unexpected error occurred while retrieving speakers.",
"instance": null,
"extensions": {
"traceId": "00-e1ce801f984167f0dd6fff048dae36f1-aecdff59f7c6abf9-01"
}
}Response Body Problem Detail JSON Object
Last updated