Skip to content

Latest commit

 

History

History
322 lines (222 loc) · 11.3 KB

File metadata and controls

322 lines (222 loc) · 11.3 KB

DialMyCalls\Contacts

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

Method HTTP request Description
createContact POST /contact Add Contact
deleteContactById DELETE /contact/{ContactId} Delete Contact
getContactById GET /contact/{ContactId} Get Contact
getContacts GET /contacts List Contacts
getContactsByGroupId GET /contacts/{GroupId} List Contacts in Group
updateContactById PUT /contact/{ContactId} Update Contact

createContact

object createContact($createContactParameters)

Add Contact

Add a contact to your contact list.

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

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$createContactParameters = new \DialMyCalls\Models\CreateContactParameters(); // \DialMyCalls\Models\CreateContactParameters | Request body

try {
    $result = $api_instance->createContact($createContactParameters);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->createContact: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
CreateContactParameters \DialMyCalls\Models\CreateContactParameters Request body

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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

deleteContactById

object deleteContactById($contactId)

Delete Contact

Delete a contact from your contact list.

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/contact/$CONTACT_ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$contactId = "contactId_example"; // string | ContactId

try {
    $result = $api_instance->deleteContactById($contactId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->deleteContactById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
ContactId string ContactId

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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

getContactById

object getContactById($contactId)

Get Contact

Retrieve a contact to your contact list.

Returns a contact 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/contact/$CONTACT_ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$contactId = "contactId_example"; // string | ContactId

try {
    $result = $api_instance->getContactById($contactId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->getContactById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
ContactId string ContactId

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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

getContacts

object getContacts($range)

List Contacts

Retrieve a list of contacts.

Returns a list of contact objects.

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$range = "range_example"; // string | Range (ie \"records=201-300\") of contacts requested

try {
    $result = $api_instance->getContacts($range);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->getContacts: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
Range string Range (ie &quot;records=201-300&quot;) of contacts requested [optional]

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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

getContactsByGroupId

object getContactsByGroupId($groupId)

List Contacts in Group

Retrieve a list of contacts in a contact group.

Returns a list of contact objects.

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

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$groupId = "groupId_example"; // string | GroupId

try {
    $result = $api_instance->getContactsByGroupId($groupId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->getContactsByGroupId: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
GroupId string GroupId

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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

updateContactById

object updateContactById($updateContactByIdParameters, $contactId)

Update Contact

Update an existing contact in your contact list.

Returns a contact 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 "{\"phone\": \"5555555555\"}" https://$API_KEY@api.dialmycalls.com/2.0/contact/$CONTACT_ID

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: api_key
DialMyCalls\Configuration::getDefaultConfiguration()->setApiKey('X-Auth-ApiKey', 'YOUR_API_KEY');
// Configure HTTP basic authorization: basicAuth
DialMyCalls\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
DialMyCalls\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');

$api_instance = new \DialMyCalls\Api\Contacts();
$updateContactByIdParameters = new \DialMyCalls\Models\UpdateContactByIdParameters(); // \DialMyCalls\Models\UpdateContactByIdParameters | Request body
$contactId = "contactId_example"; // string | ContactId

try {
    $result = $api_instance->updateContactById($updateContactByIdParameters, $contactId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Contacts->updateContactById: ', $e->getMessage(), PHP_EOL;
}
?>

Parameters

Name Type Description Notes
UpdateContactByIdParameters \DialMyCalls\Models\UpdateContactByIdParameters Request body
ContactId string ContactId

Return type

object

Authorization

api_key, basicAuth

HTTP request headers

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

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