Latest Legacy

Delete a specific recording

This API lets you delete a recording from your account using the recording ID.

You can retrieve the value of recording_id from List all recordings and Retrieve a recording API and pass them in the API endpoint.

API Endpoint

DELETE https://api.plivo.com/v1/Account/{auth_id}/Recording/{recording_id}/

Arguments

No arguments need to be passed.

Returns

Returns 404 Not Found if the recording is not found for the given recording_id. Else, returns 204 without content.

Response

HTTP Status Code: 204

Example Request

1
2
3
4
5
6
import plivo

client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.recordings.delete(
    recording_id='9684e812-4b88-11e7-b285-02fb5b2555e7', )
print(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# Example for Recording Delete
#
require 'rubygems'
require 'plivo'

include Plivo
include Plivo::Exceptions

api = RestClient.new("<auth_id>","<auth_token>")

begin
  response = api.recordings.delete(
    'c2186400-1c8c-1124-a664-0026b945b522'
  )
  puts response
rescue PlivoRESTError => e
  puts 'Exception: ' + e.message
end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Example for Recording delete

var plivo = require('plivo');

(function main() {
    'use strict';
    
   // If auth id and auth token are not specified, Plivo will fetch them from the environment variables.
    var client = new plivo.Client("<auth_id>","<auth_token>");
    client.recordings.delete(
        "c2186400-1c8c-1124-a664-0026b945b522", // recording id
    ).then(function (response) {
        console.log(response);
    }, function (err) {
        console.error(err);
    });
})();
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * Example for Recording delete
 */
require 'vendor/autoload.php';
use Plivo\RestClient;
use Plivo\Exceptions\PlivoRestException;
$client = new RestClient("<auth_id>","<auth_token>");

try {
    $response = $client->recordings->delete(
        'c2186400-1c8c-1124-a664-0026b945b522'
    );
    print_r($response);
}
catch (PlivoRestException $ex) {
    print_r($ex);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.plivo.api.samples.recording;

import java.io.IOException;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.recording.Recording;

/**
* Example for Recording delete
*/
class RecordingDelete {
    public static void main(String [] args) {
        Plivo.init("<auth_id>","<auth_token>");
        try {
            Recording.deleter("c2186400-1c8c-1124-a664-0026b945b522")
                .delete();

            System.out.println("Deleted successfully.");
        } catch (PlivoRestException | IOException e) {
            e.printStackTrace();
        }
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/**
 * Example for Recording Delete
 */
using System;
using System.Collections.Generic;
using Plivo;
using Plivo.Exception;

namespace PlivoExamples
{
    internal class Program
    {
        public static void Main(string[] args)
        {
            var api = new PlivoApi("<auth_id>","<auth_token>");
            try
            {
                var response = api.Recording.Delete(
                    recordingId:"3ebae784-54fd-11e7-975a-024cb8ab2db9"
                );
                Console.WriteLine(response);
            }
            catch (PlivoRestException e)
            {
                Console.WriteLine("Exception: " + e.Message);
            }
        }
    }
}
1
2
curl -X DELETE --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Recording/{recording_id}/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Example for Recording delete
package main

import (
	"fmt"

	"github.com/plivo/plivo-go/v7"
)

func main() {
	client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	err = client.Recordings.Delete(
		"c2186400-1c8c-1124-a664-0026b945b522",
	)
	if err != nil {
		fmt.Print("Error", err.Error())
		return
	}
	fmt.Println("Deleted successfully.")
}