Skip to content

Latest commit

 

History

History
379 lines (255 loc) · 11.8 KB

File metadata and controls

379 lines (255 loc) · 11.8 KB

DialmycallsJsClient.CallerIds

All URIs are relative to https://api.dialmycalls.com/2.0

Method HTTP request Description
createCallerId POST /callerid Add Caller ID
createUnverifiedCallerId POST /verify/callerid Add Caller ID (Unverified)
deleteCallerIdById DELETE /callerid/{CalleridId} Delete Caller ID
getCallerIdById GET /callerid/{CalleridId} Get Caller ID
getCallerIds GET /callerids List Caller IDs
updateCallerIdById PUT /callerid/{CalleridId} Update Caller ID
verifyCallerIdById PUT /verify/callerid/{CalleridId} Verify Caller ID

createCallerId

Object createCallerId(createCallerIdParameters)

Add Caller ID

Add a caller ID.

Returns a caller ID object on success, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X POST -d "{\"phone\": \"5555555555\", \"name\": \"New Number\"}" https://$API_KEY@api.dialmycalls.com/2.0/callerid

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var createCallerIdParameters = new DialmycallsJsClient.CreateCallerIdParameters(); // CreateCallerIdParameters | Request body


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createCallerId(createCallerIdParameters, callback);

Parameters

Name Type Description Notes
createCallerIdParameters CreateCallerIdParameters Request body

Return type

Object

Authorization

api_key

HTTP request headers

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

createUnverifiedCallerId

Object createUnverifiedCallerId(createUnverifiedCallerIdParameters)

Add Caller ID (Unverified)

Initiate adding a new caller ID when you need to go through the verification process. You will receive a phone call at the phone number provided and will need to make a subsequent API call with the PIN code that you are provided.

Returns a caller ID object on success, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X POST -d "{\"phone\": \"5555555555\", \"name\": \"New Number\"}" https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var createUnverifiedCallerIdParameters = new DialmycallsJsClient.CreateUnverifiedCallerIdParameters(); // CreateUnverifiedCallerIdParameters | Request body


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createUnverifiedCallerId(createUnverifiedCallerIdParameters, callback);

Parameters

Name Type Description Notes
createUnverifiedCallerIdParameters CreateUnverifiedCallerIdParameters Request body

Return type

Object

Authorization

api_key

HTTP request headers

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

deleteCallerIdById

Object deleteCallerIdById(calleridId)

Delete Caller ID

Delete a caller ID.

Returns the following if a valid identifier was provided, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X DELETE https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var calleridId = "calleridId_example"; // String | CalleridId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteCallerIdById(calleridId, callback);

Parameters

Name Type Description Notes
calleridId String CalleridId

Return type

Object

Authorization

api_key

HTTP request headers

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

getCallerIdById

Object getCallerIdById(calleridId)

Get Caller ID

Retrieve a caller ID.

Returns a caller ID object if a valid identifier was provided, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var calleridId = "calleridId_example"; // String | CalleridId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getCallerIdById(calleridId, callback);

Parameters

Name Type Description Notes
calleridId String CalleridId

Return type

Object

Authorization

api_key

HTTP request headers

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

getCallerIds

Object getCallerIds(opts)

List Caller IDs

Retrieve a list of caller IDs.

Returns a list of caller ID objects.

curl -i -H "Content-Type: application/json" -X GET https://$API_KEY@api.dialmycalls.com/2.0/callerids

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var opts = { 
  'range': "range_example" // String | Range (ie \"records=201-300\") of callerids requested
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getCallerIds(opts, callback);

Parameters

Name Type Description Notes
range String Range (ie "records=201-300") of callerids requested [optional]

Return type

Object

Authorization

api_key

HTTP request headers

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

updateCallerIdById

Object updateCallerIdById(updateCallerIdByIdParameters, calleridId)

Update Caller ID

Update an existing caller ID.

Returns a caller ID object if a valid identifier was provided and input validation passed, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X PUT -d "{\"name\": \"New Number Updated\"}" https://$API_KEY@api.dialmycalls.com/2.0/callerid/$CALLERID_ID

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var updateCallerIdByIdParameters = new DialmycallsJsClient.UpdateCallerIdByIdParameters(); // UpdateCallerIdByIdParameters | Request body

var calleridId = "calleridId_example"; // String | CalleridId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateCallerIdById(updateCallerIdByIdParameters, calleridId, callback);

Parameters

Name Type Description Notes
updateCallerIdByIdParameters UpdateCallerIdByIdParameters Request body
calleridId String CalleridId

Return type

Object

Authorization

api_key

HTTP request headers

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

verifyCallerIdById

Object verifyCallerIdById(verifyCallerIdByIdParameters, calleridId)

Verify Caller ID

Verify a new caller ID.

Returns a caller ID object if a valid identifier was provided, and returns an error otherwise.

curl -i -H "Content-Type: application/json" -X POST -d "{\"phone\": \"5555555555\", \"name\": \"New Number\"}" https://$API_KEY@api.dialmycalls.com/2.0/verify/callerid/$CALLERID_ID

Example

var DialmycallsJsClient = require('dialmycalls-js-client');
var defaultClient = DialmycallsJsClient.ApiClient.instance;

// Configure API key authorization: api_key
var api_key = defaultClient.authentications['api_key'];
api_key.apiKey = 'YOUR API KEY';

var apiInstance = new DialmycallsJsClient.CallerIds();

var verifyCallerIdByIdParameters = new DialmycallsJsClient.VerifyCallerIdByIdParameters(); // VerifyCallerIdByIdParameters | Request body

var calleridId = "calleridId_example"; // String | CalleridId


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.verifyCallerIdById(verifyCallerIdByIdParameters, calleridId, callback);

Parameters

Name Type Description Notes
verifyCallerIdByIdParameters VerifyCallerIdByIdParameters Request body
calleridId String CalleridId

Return type

Object

Authorization

api_key

HTTP request headers

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