Endpoint API

A Plivo endpoint, also known as SIP endpoint, can be any IP phone, mobile phone, wireless device, PDA, laptop or desktop PC that uses the Session Initiation Protocol (SIP) to perform communications operations.

Endpoints are used to make or receive calls from a SIP phone, webSDK and our mobile SDKs. They support use-cases which involve an agent taking to a client, call centers, etc.

The following actions can be performed using the Endpoint API:

BaseURI: https://api.plivo.com/v1/Account/{auth_id}/Endpoint/

Prerequisites

  1. Sign up for a free Plivo trial account.
  2. Check out our Helper Libraries page and install the right helper based on the programming language you want to use.
  3. Buy a Plivo phone number. A phone number is required to receive calls. You can buy a Plivo phone number in over 20+ countries through the Buy Numbers tab on your Plivo account UI. Check the Voice API coverage page for all the supported countries.
  4. Use a web hosting service to host your web application. There are many inexpensive cloud hosting providers that you can use for just a few dollars a month. Follow the instructions of your hosting provider to host your web application.

Create an Endpoint

This API lets you create a new endpoint on Plivo. Check out our tutorial on getting started with SIP endpoints.

POST https://api.plivo.com/v1/Account/{auth_id}/Endpoint/

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import plivo

auth_id = "Your AUTH_ID"
auth_token = "Your AUTH_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)

# Create an Endpoint
params = {
    'username': 'testuser', # The username for the endpoint to be created
    'password': 'test123', # The password for your endpoint username
    'alias': 'Test' # Alias for this endpoint
}

response = p.create_endpoint(params)
print str(response)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require 'rubygems'
require 'plivo'
include Plivo

AUTH_ID = "Your AUTH_ID"
AUTH_TOKEN = "Your AUTH_TOKEN"
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)

# Create an Endpoint
params = {
    'username' => 'testuser', # The username for the endpoint to be created
    'password' => 'test123', # The password for your endpoint username
    'alias' => 'Test' # Alias for this endpoint
}

response = p.create_endpoint(params)
print response
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var p = plivo.RestAPI({
  authId: 'Your AUTH_ID',
  authToken: 'Your AUTH_TOKEN'
});

// Create a new endpoint
var params = {
    'username': 'testuser', // The username for the endpoint to be created
    'password': 'test123', // The password for your endpoint username
    'alias': 'Test' // Alias for this endpoint
};

p.create_endpoint(params, function (status, response) {
    console.log('Status: ', status);
    console.log('API Response:\n', response);
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php
    require 'vendor/autoload.php';
    use Plivo\RestAPI;

    $auth_id = "Your AUTH_ID";
    $auth_token = "Your AUTH_TOKEN";
    $p = new RestAPI($auth_id, $auth_token);

    // Create an Endpoint
    $params = array(
            'username' => 'testuser', # The username for the endpoint to be created
            'password' => 'test123', # The password for your endpoint username
            'alias' => 'Test' # Alias for this endpoint
        );
    $response = $p->create_endpoint($params);
    print_r ($response['response']);
?>
 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
package plivoexample;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.application.Application;
import com.plivo.helper.exception.PlivoException;

public class App {
    public static void main(String[] args) throws IllegalAccessException {
        String auth_id = "Your AUTH_ID";
        String auth_token = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(auth_id, auth_token, "v1");

        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        // The username for the endpoint to be created
        params.put("username","testuser");
        // The password for your endpoint username
        params.put("password","test123");
        // Alias for this endpoint
        params.put("alias","Test");
        // Create an Endpoint
        try {
            Endpoint resp = api.createEndpoint(params);
            System.out.println(resp);
        } catch (PlivoException e) {
            System.out.println(e.getLocalizedMessage());
        }
    }
}
 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
using System;
using System.Collections.Generic;
using RestSharp;
using Plivo.API;

namespace apps
{
    class Program
    {
        static void Main(string[] args)
        {
            RestAPI plivo = new RestAPI("Your AUTH_ID", "Your AUTH_TOKEN");

            // Create an endpoint
            IRestResponse<Endpoint> res = plivo.create_endpoint(new Dictionary<string,string>()
            {
              {"username", "testuser"}, // The username for the endpoint to be created
              {"password", "test123"}, // The password for your endpoint username
              {"alias", "Test"} // Alias for this endpoint
            });

            //Prints the response
            Console.Write(res.Content);
        }
    }
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{"username": "testuser", "password": "test123", "alias": "Test"}'  \
    https://api.plivo.com/v1/Account/{auth_id}/Endpoint/

Sample Response

(201, {
        u'username': u'testuser141223061753',
        u'alias': u'Test',
        u'message': u'created',
        u'endpoint_id': u'14608873252694',
        u'api_id': u'6de230bc-8a6b-11e4-ac1f-22000ac51de6'
   }
)

Get Details of All Endpoints

This API lets you get details of all endpoints. This is pretty useful in use-cases where you want statuses of your endpoints and whether they have been registered using a SIP client.

POST https://api.plivo.com/v1/Account/{auth_id}/Endpoint/

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import plivo

auth_id = "Your AUTH_ID"
auth_token = "Your AUTH_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)

# Get details of all existing endpoints
params = {
    'limit': '10', # The number of results per page
    # The number of items by which the results should be offset
    'offset': '0'
}

response = p.get_endpoints(params)
print str(response)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
require 'rubygems'
require 'plivo'
include Plivo

AUTH_ID = "Your AUTH_ID"
AUTH_TOKEN = "Your AUTH_TOKEN"
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)

# Get details of all existing endpoints
params = {
    'limit' => '10', # The number of results per page
    # The number of items by which the results should be offset
    'offset' => '0'
}

response = p.get_endpoints(params)
print response

# Print the total number of apps
print response[1]['meta']['total_count']
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var p = plivo.RestAPI({
  authId: 'Your AUTH_ID',
  authToken: 'Your AUTH_TOKEN'
});

// Get details of all endpoints
var params = {
    'limit' : '2', // The number of results per page
    // The number of items by which the results should be offset
    'offset' : '0'
};

p.get_endpoints(params, function (status, response) {
    console.log('Status: ', status);
    console.log('API Response:\n', response);
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
<?php
    require 'vendor/autoload.php';
    use Plivo\RestAPI;

    $auth_id = "Your AUTH_ID";
    $auth_token = "Your AUTH_TOKEN";
    $p = new RestAPI($auth_id, $auth_token);

    // Get Details of all existing Endpoints
    $params = array(
        'limit' => '10', // The number of results per page
        'offset' => '0' // The number of value items by which the results should be offset
    );
    $response = $p->get_endpoints($params);
    print_r ($response['response']); 

    // Print the total number of Endpoints
    echo "<br> Total count : ";
    echo ($response['response']['meta']['total_count']);
?>
 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
package plivoexample;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.application.ApplicationFactory;
import com.plivo.helper.exception.PlivoException;

public class App {
    public static void main(String[] args) throws IllegalAccessException {
        String auth_id = "Your AUTH_ID";
        String auth_token = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(auth_id, auth_token, "v1");

        // Get details of all existing endpoints
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        params.put("limit","10"); // The number of results per page
        // The number of items by which the results should be offset
        params.put("offset","0");

        try {
            EndpointFactory resp = api.getEndpoints(params);
            System.out.println(resp);
            // Print the total number of endpoints
            System.out.println("Total count: " + resp.meta.total_count);
        } catch (PlivoException e) {
            System.out.println(e.getLocalizedMessage());
        }
    }
}
 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
using System;
using System.Collections.Generic;
using RestSharp;
using Plivo.API;

namespace apps
{
    class Program
    {
        static void Main(string[] args)
        {
            RestAPI plivo = new RestAPI("Your AUTH_ID", "Your AUTH_TOKEN");

            // Get details of all existing applications
            IRestResponse<EndpointList> res = plivo.get_endpoints(new Dictionary<string, string>()
            {
                {"limit","10"}, // The number of results per page
                {"offset","0"} // The number of value items by which the results should be offset
            });

            //Prints the response
            Console.Write(res.Content);

            // Prints the total number of apps
            Console.WriteLine("Total count : " + res.Data.meta.total_count);
        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Endpoint/

Sample Response

(200, {
        u'meta': {
            u'previous': None,
            u'total_count': 7,
            u'offset': 0,
            u'limit': 10,
            u'next': None
       },
       u'objects': [
           {
                u'username': u'testuser141223061753',
                u'application': u'/v1/Account/xxxxxxxxxxxxxxxxx/Application/16632742496743552/',
                u'sip_registered': u'false',
                u'sip_uri': u'sip:testuser141223061753@phone.plivo.com',
                u'alias': u'Test',
                u'endpoint_id': u'14608873252694',
                u'password': u'cc03e747a6afbbcbf8be7668acfebee5',
                u'sub_account': None,
                u'resource_uri': u'/v1/Account/xxxxxxxxxxxxxxxxx/Endpoint/14608873252694/'
           },
           {
                u'username': u'testuser141218101424',
                u'application': u'/v1/Account/xxxxxxxxxxxxxxxxx/Application/16632742496743552/',
                u'sip_registered': u'false',
                u'sip_uri': u'sip:testuser141218101424@phone.plivo.com',
                u'alias': u'Test',
                u'endpoint_id': u'21784177241578',
                u'password': u'cc03e747a6afbbcbf8be7668acfebee5',
                u'sub_account': None,
                u'resource_uri': u'/v1/Account/xxxxxxxxxxxxxxxxx/Endpoint/21784177241578/'
           }
       ]
    }
)

Get Details of a Single Endpoint

This API lets you get details of a single endpoint on your account using the endpoint_id.

GET https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import plivo

auth_id = "Your AUTH_ID"
auth_token = "Your AUTH_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)

# Get details of a single endpoint
params = {
    # ID of the endpoint to retrieve details
    'endpoint_id': '21784177241578'
}

response = p.get_endpoint(params)
print str(response)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require 'rubygems'
require 'plivo'
include Plivo

AUTH_ID = "Your AUTH_ID"
AUTH_TOKEN = "Your AUTH_TOKEN"
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)

# Get details of a single endpoint
params = {
    # ID of the endpoint to retrieve details
    'endpoint_id'=> '21784177241578'
}

response = p.get_endpoint(params)
print response
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
var plivo = require('plivo');
var p = plivo.RestAPI({
  authId: 'Your AUTH_ID',
  authToken: 'Your AUTH_TOKEN'
});

// Get details of a single endpoint
var params = {
    // ID of the endpoint to retrieve details
    'endpoint_id': '21784177241578'
};

p.get_endpoint(params, function (status, response) {
    console.log('Status: ', status);
    console.log('API Response:\n', response);
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php
    require 'vendor/autoload.php';
    use Plivo\RestAPI;

    $auth_id = "Your AUTH_ID";
    $auth_token = "Your AUTH_TOKEN";
    $p = new RestAPI($auth_id, $auth_token);

    // Get details of Single Endpoint
    $params = array(
        // ID of the endpoint to retrieve details
        'endpoint_id' => '21784177241578'
    );

    $response = $p->get_endpoint($params);
    print_r ($response['response']);
?>
 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
package plivoexample;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.application.Application;
import com.plivo.helper.exception.PlivoException;

public class App {
    public static void main(String[] args) throws IllegalAccessException {
        String auth_id = "Your AUTH_ID";
        String auth_token = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(auth_id, auth_token, "v1");

        // Get details of a single endpoint
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        // ID of the endpoint to retrieve details
        params.put("endpoint_id","21784177241578");

        try {
            Endpoint resp = api.getEndpoint(params);
            System.out.println(resp);
        }catch (PlivoException e){
            System.out.println(e.getLocalizedMessage());
        }
    }
}
 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
using System;
using System.Collections.Generic;
using RestSharp;
using Plivo.API;

namespace apps
{
    class Program
    {
        static void Main(string[] args)
        {
            RestAPI plivo = new RestAPI("Your AUTH_ID", "Your AUTH_TOKEN");

            // Get details of a single application
            IRestResponse<Endpoint> res = plivo.get_endpoint(new Dictionary<string, string>()
            {
                // ID of the endpoint to retrieve details
                {"endpoint_id","21784177241578"}
            });

            // Prints the response
            Console.Write(res.Content);
        }
    }
}
1
2
curl -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Endpoint/21784177241578/

Sample Response

(200,
    {
        u'username': u'testuser141218101424',
        u'application': u'/v1/Account/xxxxxxxxxxxxxxxxx/Application/16632742496743552/',
        u'sip_registered': u'false',
        u'api_id': u'f419d274-8a6c-11e4-b153-22000abcaa64',
        u'sip_uri': u'sip:testuser141218101424@phone.plivo.com',
        u'alias': u'Test',
        u'endpoint_id': u'21784177241578',
        u'password': u'cc03e747a6afbbcbf8be7668acfebee5',
        u'sub_account': None,
        u'resource_uri': u'/v1/Account/xxxxxxxxxxxxxxxxx/Endpoint/21784177241578/'
    }
)

Modify an Endpoint

This API lets you modify an endpoint’s password, alias or the application attached to it.

POST https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import plivo

auth_id = "Your AUTH_ID"
auth_token = "Your AUTH_TOKEN"
p = plivo.RestAPI(auth_id, auth_token)

# Modify an endpoint
params = {
    # ID of the endpoint to be modified
    'endpoint_id': '21784177241578',
    'alias': 'New_test' # Values to be updated
}

response = p.modify_endpoint(params)
print str(response)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require 'rubygems'
require 'plivo'
include Plivo

AUTH_ID = "Your AUTH_ID"
AUTH_TOKEN = "Your AUTH_TOKEN"
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)

# Modify an endpoint
params = {
    # ID of the endpoint to be modified
    'endpoint_id' => '21784177241578',
    'alias' => 'New_test' # Values to be updated
}

response = p.modify_endpoint(params)
print response
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
var plivo = require('plivo');
var p = plivo.RestAPI({
  authId: 'Your AUTH_ID',
  authToken: 'Your AUTH_TOKEN'
});

// Modify an endpoint
var params = {
    // ID of the endpoint to be modified
    'endpoint_id' : '21784177241578',
    'alias' : 'New_test' // Values to be updated
};

p.modify_endpoint(params, function (status, response) {
    console.log('Status: ', status);
    console.log('API Response:\n', response);
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
<?php
    require 'vendor/autoload.php';
    use Plivo\RestAPI;

    $auth_id = "Your AUTH_ID";
    $auth_token = "Your AUTH_TOKEN";
    $p = new RestAPI($auth_id, $auth_token);

    // Modify an Endpoint
    $params = array(
        // ID of the endpoint to be modified
        'endpoint_id' => '21784177241578',
        'alias' => 'New_test' // Values to be updated
    );

    $response = $p->modify_endpoint($params);
    print_r ($response['response']);
?>
 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
package plivoexample;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.application.GenericResponse;
import com.plivo.helper.exception.PlivoException;

public class App {
    public static void main(String[] args) throws IllegalAccessException {
        String auth_id = "Your AUTH_ID";
        String auth_token = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(auth_id, auth_token, "v1");

        // Modify an endpoint
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        // ID of the endpoint to be modified
        params.put("endpoint_id","21784177241578");
        params.put("alias","New_test"); // Values to be updated

        try {
            GenericResponse resp = api.editEndpoint(params);
            System.out.println(resp);
        } catch (PlivoException e) {
            System.out.println(e.getLocalizedMessage());
        }
    }
}
 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
using System;
using System.Collections.Generic;
using RestSharp;
using Plivo.API;

namespace apps
{
    class Program
    {
        static void Main(string[] args)
        {
            RestAPI plivo = new RestAPI("Your AUTH_ID", "Your AUTH_TOKEN");

            // Modify an application
            IRestResponse<GenericResponse> res = plivo.modify_endpoint(new Dictionary<string, string>()
            {
                {"endpoint_id","21784177241578"}, // ID of the endpoint to be modified
                {"alias","New_test"} // Values to be updated
            });

            //Prints the response
            Console.Write(res.Content);
        }
    }
}
1
2
3
4
curl -i --user AUTH_ID:AUTH_TOKEN \
    -H "Content-Type: application/json" \
    -d '{"alias": "New_test"}' \
    https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/

Sample Response

(202,
    {
        u'message': u'changed',
        u'api_id': u'424d84ea-8a6d-11e4-a2d1-22000ac5040c'
    }
)

Delete an Endpoint

This API lets you delete an endpoint. This operation cannot be undone.

DELETE https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/

Code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
import plivo

auth_id = "Your AUTH_ID"
auth_token = "Your AUTH_TOKEN"

p = plivo.RestAPI(auth_id, auth_token)

# Delete an endpoint
params = {
    'endpoint_id' : '21784177241578' # ID of the endpoint to be deleted
}

response = p.delete_endpoint(params)
print str(response)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require 'rubygems'
require 'plivo'
include Plivo

AUTH_ID = "Your AUTH_ID"
AUTH_TOKEN = "Your AUTH_TOKEN"
p = RestAPI.new(AUTH_ID, AUTH_TOKEN)

# Delete an endpoint
params = {
    # ID of the endpoint to be deleted
    'endpoint_id' => '21784177241578'
}

response = p.delete_endpoint(params)
print response
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
var plivo = require('plivo');
var p = plivo.RestAPI({
  authId: 'Your AUTH_ID',
  authToken: 'Your AUTH_TOKEN'
});

// Delete an endpoint
var params = {
    'endpoint_id' : '21784177241578' // ID of the endpoint that as to be deleted
};
p.delete_endpoint(params, function (status, response) {
    console.log('Status: ', status);
    console.log('API Response:\n', response);
});
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
<?php
    require 'vendor/autoload.php';
    use Plivo\RestAPI;

    $auth_id = "Your AUTH_ID";
    $auth_token = "Your AUTH_TOKEN";
    $p = new RestAPI($auth_id, $auth_token);

    // Delete an Endpoint
    $params = array(
        # ID of the endpoint to be deleted
        'endpoint_id' => '21784177241578'
    );

    $response = $p->delete_endpoint($params);
    print_r ($response);
?>
 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
package plivoexample;

import java.util.LinkedHashMap;
import com.plivo.helper.api.client.*;
import com.plivo.helper.api.response.application.GenericResponse;
import com.plivo.helper.exception.PlivoException;

public class App {
    public static void main(String[] args) throws IllegalAccessException {
        String auth_id = "Your AUTH_ID";
        String auth_token = "Your AUTH_TOKEN";
        RestAPI api = new RestAPI(auth_id, auth_token, "v1");

        // Delete an Endpoint
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        // ID of the endpoint that as to be deleted
        params.put("endpoint_id","21784177241578");

        try {
            GenericResponse resp = api.deleteEndpoint(params);
            System.out.println(resp);
        } catch (PlivoException e) {
            System.out.println(e.getLocalizedMessage());
        }
    }
}
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using RestSharp;
using Plivo.API;

namespace apps
{
    class Program
    {
        static void Main(string[] args)
        {
            RestAPI plivo = new RestAPI("Your AUTH_ID", "Your AUTH_TOKEN");

            // Delete an application
            IRestResponse<GenericResponse> res = plivo.delete_endpoint(new Dictionary<string,string>()
            {
              {"endpoint_id","21784177241578"}  // ID of the endpoint that as to be deleted
            });

            //Prints the response
            Console.Write(res.Content);
        }
    }
}
1
2
curl -X DELETE -i --user AUTH_ID:AUTH_TOKEN \
    https://api.plivo.com/v1/Account/{auth_id}/Endpoint/{endpoint_id}/

Sample Response

Sample successful endpoint
(204, '')

Sample unsuccessful output
(404, {
        u'api_id': u'b6d258ee-8f64-11e4-b153-22000abcaa64', 
        u'error': u'not found'
    }
)

Next Step

Learn how to manage Plivo Numbers.

  1. Account API
  2. Application API
  3. Endpoint API
  4. Number API
  5. Phone Number API
  6. Pricing API
  7. API Pagination