Skip to content

dialmycalls/php-sdk-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DialMyCalls The DialMyCalls API

For more information, please visit https://www.dialmycalls.com

Requirements

PHP 5.4.0 and later

Installation & Usage

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/dialmycalls/php-sdk-v2.git"
    }
  ],
  "require": {
    "dialmycalls/php-sdk-v2": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

    require_once('/path/to/DialMyCalls/autoload.php');

Tests

To run the unit tests:

composer install
./vendor/bin/phpunit lib/Tests

Getting Started

Please follow the installation procedure and then run the following:

<?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\Accounts();
$createAccessAccountParameters = new \DialMyCalls\Models\CreateAccessAccountParameters(); // \DialMyCalls\Models\CreateAccessAccountParameters | Request body

try {
    $result = $api_instance->createAccessAccount($createAccessAccountParameters);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling Accounts->createAccessAccount: ', $e->getMessage(), PHP_EOL;
}

?>

Documentation for API Endpoints

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

Class Method HTTP request Description
Accounts createAccessAccount POST /accessaccount Add Access Account
Accounts deleteAccessAccountById DELETE /accessaccount/{AccessAccountId} Delete Access Account
Accounts getAccessAccountById GET /accessaccount/{AccessAccountId} Get Access Account
Accounts getAccessAccounts GET /accessaccounts List Access Accounts
Accounts getAccount GET /account Get Account
Accounts updateAccessAccountById PUT /accessaccount/{AccessAccountId} Update Access Account
CallerIds createCallerId POST /callerid Add Caller ID
CallerIds createUnverifiedCallerId POST /verify/callerid Add Caller ID (Unverified)
CallerIds deleteCallerIdById DELETE /callerid/{CalleridId} Delete Caller ID
CallerIds getCallerIdById GET /callerid/{CalleridId} Get Caller ID
CallerIds getCallerIds GET /callerids List Caller IDs
CallerIds updateCallerIdById PUT /callerid/{CalleridId} Update Caller ID
CallerIds verifyCallerIdById PUT /verify/callerid/{CalleridId} Verify Caller ID
Calls cancelCallById DELETE /service/call/{CallId} Cancel Call
Calls createCall POST /service/call Create Call
Calls getCallById GET /service/call/{CallId} Get Call
Calls getCallRecipientsByCallId GET /service/call/{CallId}/recipients Get Call Recipients
Calls getCalls GET /service/calls List Calls
Contacts createContact POST /contact Add Contact
Contacts deleteContactById DELETE /contact/{ContactId} Delete Contact
Contacts getContactById GET /contact/{ContactId} Get Contact
Contacts getContacts GET /contacts List Contacts
Contacts getContactsByGroupId GET /contacts/{GroupId} List Contacts in Group
Contacts updateContactById PUT /contact/{ContactId} Update Contact
DoNotContacts getDoNotContacts GET /donotcontacts List DoNotContacts
Groups createGroup POST /group Add Group
Groups deleteGroupById DELETE /group/{GroupId} Delete Group
Groups getGroupById GET /group/{GroupId} Get Group
Groups getGroups GET /groups List Groups
Groups updateGroupById PUT /group/{GroupId} Update Group
Keywords deleteKeywordByID DELETE /keyword/{KeywordId} Delete Keyword
Keywords getKeywordByID GET /keyword/{KeywordId} Get Keyword
Keywords getKeywords GET /keywords List Keywords
Recordings createRecording POST /recording/tts Create Recording (Text-to-Speech)
Recordings createRecordingByPhone POST /recording/phone Create Recording (Phone)
Recordings createRecordingByUrl POST /recording/url Create Recording (URL)
Recordings deleteRecordingById DELETE /recording/{RecordingId} Delete Recording
Recordings getRecordingById GET /recording/{RecordingId} Get Recording
Recordings getRecordings GET /recordings List Recordings
Recordings updateRecordingById PUT /recording/{RecordingId} Update Recording
Texts cancelTextById DELETE /service/text/{TextId} Cancel Text
Texts createText POST /service/text Create Text
Texts deleteIncomingTextById DELETE /incoming/text/{TextId} Delete Incoming Text
Texts getIncomingTextById GET /incoming/text/{TextId} Get Incoming Text
Texts getIncomingTexts GET /incoming/texts List Incoming Texts
Texts getShortCodes GET /shortcodes List Shortcodes
Texts getTextById GET /service/text/{TextId} Get Text
Texts getTextRecipientsByTextId GET /service/text/{TextId}/recipients Get Text Recipients
Texts getTexts GET /service/texts List Texts
VanityNumbers deleteVanityNumberById DELETE /vanitynumber/{VanityNumberId} Delete Vanity Number
VanityNumbers getVanityNumberById GET /vanitynumber/{VanityNumberId} Get Vanity Number
VanityNumbers getVanityNumbers GET /vanitynumbers List Vanity Numbers
VanityNumbers updateVanityNumberById PUT /vanitynumber/{VanityNumberId} Update Vanity Number

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key
  • API key parameter name: X-Auth-ApiKey
  • Location: HTTP header

basicAuth

  • Type: HTTP basic authentication

Author

support@dialmycalls.com