Skip to content

Latest commit

 

History

History
657 lines (506 loc) · 17.9 KB

VoiceApi.md

File metadata and controls

657 lines (506 loc) · 17.9 KB

IO.ClickSend.ClickSend.Api.VoiceApi

All URIs are relative to https://rest.clicksend.com/v3

Method HTTP request Description
VoiceCancelAllPut PUT /voice/cancel-all Update all voice messages as cancelled
VoiceCancelByMessageIdPut PUT /voice/{message_id}/cancel Update voice message status as cancelled
VoiceHistoryExportGet GET /voice/history/export Export voice history
VoiceHistoryGet GET /voice/history Get all voice history
VoiceLangGet GET /voice/lang Get all voice languages
VoicePricePost POST /voice/price Calculate voice price
VoiceReceiptsGet GET /voice/receipts Get all delivery receipts
VoiceReceiptsPost POST /voice/receipts Add a delivery receipt
VoiceReceiptsReadPut PUT /voice/receipts-read Mark delivery receipts as read
VoiceSendPost POST /voice/send Send voice message(s)

VoiceCancelAllPut

string VoiceCancelAllPut ()

Update all voice messages as cancelled

Update all voice messages as cancelled

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceCancelAllPutExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();

            try
            {
                // Update all voice messages as cancelled
                string result = apiInstance.VoiceCancelAllPut();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceCancelAllPut: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceCancelByMessageIdPut

string VoiceCancelByMessageIdPut (string messageId)

Update voice message status as cancelled

Update voice message status as cancelled

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceCancelByMessageIdPutExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var messageId = messageId_example;  // string | Your voice message id

            try
            {
                // Update voice message status as cancelled
                string result = apiInstance.VoiceCancelByMessageIdPut(messageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceCancelByMessageIdPut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
messageId string Your voice message id

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceHistoryExportGet

string VoiceHistoryExportGet (string filename)

Export voice history

Export voice history

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceHistoryExportGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var filename = filename_example;  // string | Filename to export to

            try
            {
                // Export voice history
                string result = apiInstance.VoiceHistoryExportGet(filename);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceHistoryExportGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
filename string Filename to export to

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceHistoryGet

string VoiceHistoryGet (int? dateFrom = null, int? dateTo = null, int? page = null, int? limit = null)

Get all voice history

Get all voice history

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceHistoryGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var dateFrom = 56;  // int? | Timestamp (from) used to show records by date. (optional) 
            var dateTo = 56;  // int? | Timestamp (to) used to show records by date (optional) 
            var page = 56;  // int? | Page number (optional)  (default to 1)
            var limit = 56;  // int? | Number of records per page (optional)  (default to 10)

            try
            {
                // Get all voice history
                string result = apiInstance.VoiceHistoryGet(dateFrom, dateTo, page, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceHistoryGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
dateFrom int? Timestamp (from) used to show records by date. [optional]
dateTo int? Timestamp (to) used to show records by date [optional]
page int? Page number [optional] [default to 1]
limit int? Number of records per page [optional] [default to 10]

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceLangGet

string VoiceLangGet ()

Get all voice languages

Get all voice languages

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceLangGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();

            try
            {
                // Get all voice languages
                string result = apiInstance.VoiceLangGet();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceLangGet: " + e.Message );
            }
        }
    }
}

Parameters

This endpoint does not need any parameter.

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoicePricePost

string VoicePricePost (VoiceMessageCollection body)

Calculate voice price

Calculate voice price

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoicePricePostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var body = new VoiceMessageCollection(); // VoiceMessageCollection | VoiceMessageCollection model

            try
            {
                // Calculate voice price
                string result = apiInstance.VoicePricePost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoicePricePost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body VoiceMessageCollection VoiceMessageCollection model

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceReceiptsGet

string VoiceReceiptsGet (int? page = null, int? limit = null)

Get all delivery receipts

Get all delivery receipts

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceReceiptsGetExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var page = 56;  // int? | Page number (optional)  (default to 1)
            var limit = 56;  // int? | Number of records per page (optional)  (default to 10)

            try
            {
                // Get all delivery receipts
                string result = apiInstance.VoiceReceiptsGet(page, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceReceiptsGet: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
page int? Page number [optional] [default to 1]
limit int? Number of records per page [optional] [default to 10]

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceReceiptsPost

string VoiceReceiptsPost (Url body)

Add a delivery receipt

Add a delivery receipt

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceReceiptsPostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var body = new Url(); // Url | Url model

            try
            {
                // Add a delivery receipt
                string result = apiInstance.VoiceReceiptsPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceReceiptsPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body Url Url model

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceReceiptsReadPut

string VoiceReceiptsReadPut (DateBefore body = null)

Mark delivery receipts as read

Mark delivery receipts as read

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceReceiptsReadPutExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var body = new DateBefore(); // DateBefore | DateBefore model (optional) 

            try
            {
                // Mark delivery receipts as read
                string result = apiInstance.VoiceReceiptsReadPut(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceReceiptsReadPut: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body DateBefore DateBefore model [optional]

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

VoiceSendPost

string VoiceSendPost (VoiceMessageCollection body)

Send voice message(s)

Send a voice call

Example

using System;
using System.Diagnostics;
using IO.ClickSend.ClickSend.Api;
using IO.ClickSend.Client;
using IO.ClickSend.ClickSend.Model;

namespace Example
{
    public class VoiceSendPostExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new VoiceApi();
            var body = new VoiceMessageCollection(); // VoiceMessageCollection | VoiceMessageCollection model

            try
            {
                // Send voice message(s)
                string result = apiInstance.VoiceSendPost(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling VoiceApi.VoiceSendPost: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body VoiceMessageCollection VoiceMessageCollection model

Return type

string

Authorization

BasicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]