Recordings
Recordings are stored by Talk and exposed in the corresponding ticket in a voice comment.
JSON format
Recordings are represented as JSON objects with the following properties:
| Name | Type | Read-only | Mandatory | Description |
|---|---|---|---|---|
| call_id | number | false | true | ID of a Talk call |
| recording_type | string | false | false | Valid types are call or voicemail |
Delete Recording
DELETE /api/v2/channels/voice/calls/{call_id}/recordings
Allowed For
- Admins
The id parameter should be replaced with a call ID, which you can get from the call_id property in Voice Comments.
Two recordings can be associated to the same call ID. This endpoint deletes all recordings associated with the call ID. To delete only a specific type of recording, see Delete Recording By Type.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| call_id | integer | Path | true | ID of a Talk call |
Code Samples
curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/calls/{call_id}/recordings.json \-v -u {email_address}/token:{api_token} \-X DELETE
Go
import ("fmt""io""net/http")func main() {url := "https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings"method := "DELETE"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("DELETE", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'DELETE',url: 'https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("DELETE",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings")request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
204 No Content
// Status 204 No Contentnull
Delete Recording By Type
DELETE /api/v2/channels/voice/calls/{call_id}/recordings/{recording_type}
Allowed For
- Admins
The id parameter should be replaced with a call ID, which you can get from the call_id property in Voice Comments.
The recording_type is also present for Voice Comments created after January 10, 2020. For older comments, the Delete recording endpoint should be used.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| call_id | integer | Path | true | ID of a Talk call |
| recording_type | string | Path | true | Call recording type. Allowed values are "call", or "voicemail". |
Code Samples
curl
curl https://{subdomain}.zendesk.com/api/v2/channels/voice/calls/{call_id}/recordings/{recording_type}.json \-v -u {email_address}/token:{api_token} \-X DELETE
Go
import ("fmt""io""net/http")func main() {url := "https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings/voicemail"method := "DELETE"req, err := http.NewRequest(method, url, nil)if err != nil {fmt.Println(err)return}req.Header.Add("Content-Type", "application/json")req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "{email_address}/token:{api_token}"client := &http.Client {}res, err := client.Do(req)if err != nil {fmt.Println(err)return}defer res.Body.Close()body, err := io.ReadAll(res.Body)if err != nil {fmt.Println(err)return}fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings/voicemail").newBuilder();String userCredentials = "your_email_address" + "/token:" + "your_api_token";String basicAuth = "Basic " + java.util.Base64.getEncoder().encodeToString(userCredentials.getBytes());Request request = new Request.Builder().url(urlBuilder.build()).method("DELETE", null).addHeader("Content-Type", "application/json").addHeader("Authorization", basicAuth).build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');var config = {method: 'DELETE',url: 'https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings/voicemail',headers: {'Content-Type': 'application/json','Authorization': 'Basic <auth-value>', // Base64 encoded "{email_address}/token:{api_token}"},};axios(config).then(function (response) {console.log(JSON.stringify(response.data));}).catch(function (error) {console.log(error);});
Python
import requestsfrom requests.auth import HTTPBasicAuthurl = "https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings/voicemail"headers = {"Content-Type": "application/json",}email_address = 'your_email_address'api_token = 'your_api_token'# Use basic authenticationauth = HTTPBasicAuth(f'{email_address}/token', api_token)response = requests.request("DELETE",url,auth=auth,headers=headers)print(response.text)
Ruby
require "net/http"require "base64"uri = URI("https://support.zendesk.com/api/v2/channels/voice/calls/900016500386/recordings/voicemail")request = Net::HTTP::Delete.new(uri, "Content-Type": "application/json")email = "your_email_address"api_token = "your_api_token"credentials = "#{email}/token:#{api_token}"encoded_credentials = Base64.strict_encode64(credentials)request["Authorization"] = "Basic #{encoded_credentials}"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|http.request(request)end
Example response(s)
204 No Content
// Status 204 No Contentnull