LogMyCalls Public API

LogMyCalls provides a flexible and powerful API for users to programmatically manage their account. The endpoint for all methods is

https://api.logmycalls.com/services/methodName

All calls must be made over https using the HTTP POST or GET verbs.

Note: Any requests with criteria parameters must be passed as a nested array. If you are forming a URL request it must be in the form of criteria[ouid]=5. Posted as a JSON body it must be in the form of a nested array named "criteria".

Example (getCallDetails)

{
  "api_key":'API_KEY', 
  "api_secret":'API_SECRET', 
  "criteria": 
  {
    "ouid":"1"
  }  
}

Methods

  • insertUser - Create user and assign it to an organization.

  • insertGroup - Create group and assign it to a parent organization.

  • insertTag - Insert tag for call detail record.

  • updateCallDetail - Update data for a specific call detail.

  • updateUser - Update data for a specific user.

  • updateGroup - Update data for a specific group.

  • getCallDetails - Returns a single, or list of, call detail record(s) based on search criteria.

  • getGroups - Returns a single, or list of, groups within an organizational unit based on search criteria.

  • getSubscriptionInfo - Returns information about your subscription.

  • getUsers - Returns a single, or list of, users within a group or ogranization based on search criteria.

  • getTags - Get all tags for a specified call detail or organizational unit.

  • getCallScore - Returns the score for a specific call detail.

  • deleteRecord - Deletes record from account.

  • getNumbers - See what phone numbers are available for provisioning.

  • reserveNumber - Reserves a number

  • getRoutes - Returns array of route names, route ids, tracking numbers

  • createRoute - Creates a provisioned routes.

  • editRoute - Edits a provisioned route.

  • deleteRoute - Deletes a provisioned route.

  • uploadCall - Uploads audio file and creates a call detail record.

  • uploadGreeting - Uploads greeting audio file.

  • insertDNI - Insert a Dynamic Number Insertion (DNI) settings.

  • updateDNI - Update existing Dynamic Number Insertion (DNI) settings.

  • getDNI - This method returns all the dni settings for the specified organizational unit in a multidimensional array as JSON.

  • setDNICustomParams - Insert custom DNI parameter for ouid. It accept comma separated string.

  • getDNICode - Return DNI Code.


insertUser

Description: Insert a user into the designated organization.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

email (required)
Email address (username) of user to create. Must be unique.

first_name (required)
First name of user to create.

last_name (required) Last name of user to create.

ouid (required)
Organizational unit user belongs to.

group_id (required)
Role user belongs to.
Accessible Group ID's

14 - Company Admin
15 - Multi-group Admin
16 - Group Admin
17 - Standard User

external_ouid (required)
Organizational unit user belongs to.

external_id (optional)
The foreign key that links the record to your database. This is useful when you want to search using our api using the id of the record in your database. Must be unique to your company.

Example Response

If user creation was successful, the following json is returned: {"status": "success", "user_id": "453"}

If creation was unsuccessful, the following json is returned (as an example): {"status": "error", "error_message": "Email address exists."}


insertGroup

Description: Insert a group as a child of an organization.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

parent_ouid (required)
Parent ID of the organization to create under.

name (optional)
The name of the organizational unit. Can specify partial names to return an array of results matching that string.

address_line_1 (optional)
Address organization is in. Not required for non-physical locations.

address_line_2 (optional)
Address organization is in. Not required for non-physical locations.

city (optional)
City organization is in. Not required for non-physical locations.

state (optional)
State organization is in. Not required for non-physical locations.

zip (optional)
Zipcode organization is in. Not required for non-physical locations.

stores_only (optional)
Mark the location as a physical location. Options are 1 or 0

master_node (optional)
Mark the location as a master node. Options are 1 or 0

external_id (optional)
The foreign key that links the record to your database. This is useful when you want to search using our api using the id of the record in your database. Must be unique to your company.

phone_number (optional)
Phone Number of the organizational unit.

Example Response

If group creation was successful, the following json is returned: {"status": "success", "group_id": "45"}

If creation was unsuccessful, the following json is returned (as an example): {"status": "error", "error_message": "External ID already exists."}


insertTag

Description: Add tag to specified call detail.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

If no call_detail_id is specified, a tag will be created. If a tag by that name already exists, you will be returned that tag. No changes to existing tags can be made using this method.

If a call_detail_id is specified the above behavior will occur along with an association being created for that call.

user_id (optional) ID of user to assign tag to. May specify either user_id OR external_user_id.

external_user_id (optional) ID of user to assign tag to. May specify either user_id OR external_user_id.

ouid (optional) Organization to assign newly created tag to. If this is not specified, the tag will be assigned to your master node.

call_detail_id (required)
ID of call detail to assign comment to. Must specify either call_detail_id OR external_call_detail_id.

external_call_detail_id (required)
ID of call detail to assign comment to. Must specify either call_detail_id OR external_call_detail_id.

is_public (optional)
Determines if tag can be seen by entire organization or only by user tag is assigned to. Default is public.

tag (required)
Tag to insert.


updateCallDetail

Description: Update information about a call detail.

Arguments

Meta data

api_key (required)

api_secret (required)

id (optional)
ID of the call detail to update. If this id is not specified an external_id must be specified.

external_id (optional)
The foreign key that links the record to your database. This is useful when you want to search using our api using the id of the record in your database.

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

calldate (optional)
Time the call started. Format: YYYY-MM-DD HH:MM:SS.
example: 2011-08-24 00:00:00

ouid (optional)
ID of the organizational unit to reassign call to.

external_ouid (optional)
External ID of the organizational unit to reassign call to.

caller_id (optional)

tracking_number (optional)
The tracking number to reassign this call to. Note: if the tracking number you specify already belongs to an organization you do not have access to, an error will be returned. If a tracking number isn't specified it will be sortable as "Uploaded" in the "filter by" widget.
Format: 2223334444.

ringto_number (optional)
The number that was called.
Format: 2223334444

is_outbound (optional)
Specify whether the call was inbound or outbound.
Options: 1 (true), 0 (false)

assign_to (optional)
The email address of the user to assign this call to.
Format: user@domain.com

Example Response

If the update was successful, the following json is returned: {"status": "success", "call_detail_id": "56342"}

If the update was unsuccessful, the following json is returned: {"status": "error", "error_message": "Wrong file format"}


updateUser

Description: Update a specific user by id.

Arguments

Meta data

api_key (required)

api_secret (required)

id (optional)
ID of user to update. If this field is not specified, external_id must be specified or the update will fail.

external_id (optional)
The foreign key that links the record to your database. Must be unique to all users within your company.

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

email (optional)
Email address (username) of user to update. Must be unique.

first_name (optional)
First name of user to update.

last_name (optional) Last name of user to update.

ouid (optional)
Organizational unit user belongs to.

external_ouid (optional)
Organizational unit user belongs to.

group_id (optional)
Role user belongs to.
Accessible Group ID's

14 - Company Admin
15 - Multi-group Admin
16 - Group Admin
17 - Standard User

status (optional)
You can set the user status to active or inactive

Example Response

If user update was successful, the following json is returned: {"status": "success", "user_id": "453"}

If creation was unsuccessful, the following json is returned (as an example): {"status": "error", "error_message": "Email address exists."}


updateGroup

Description: Update a group in your company by id.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

id (optional)
ID of group to update. If this field is not specified, external_id must be specified or update will fail.

external_id (optional)
The foreign key that links the record to your database. Must be unique to all groups within your company.

Criteria

name (optional)
The name of the organizational unit.

address_line_1 (optional)
Address organization is in. Not required for non-physical locations.

address_line_2 (optional)
Address organization is in. Not required for non-physical locations.

state (optional)
State organization is in. Not required for non-physical locations.

zip (optional)
Zipcode organization is in. Not required for non-physical locations.

master_node (optional)
Mark the location as a master node. Options are 1 or 0

parent_ouid (optional)
Parent ID of the group to update.

phone_number (optional)
Phone Number of the organizational unit.

Example Response

If group update was successful, the following json is returned: {"status": "success", "group_id": "45"}

If creation was unsuccessful, the following json is returned (as an example): {"status": "error", "error_message": "External ID already exists."}


getCallDetails

Description: Returns a single, or list of, call detail record(s), dynamic number information, and Conversation Analytics data based on passed criteria.

Arguments

Meta data

api_key (required)

api_secret (required)

start (optional)
The nth record to start from. For example, specifying "30" would get results starting at the 30th result

limit (optional)

sort_by (optional)
The field to sort by. Options: id, tracking_number, ringto_number

sort_order (optional)
What order to sort results by. Options: desc, asc

Criteria

id (optional) The id of the call detail. Will return a single call detail or "not found".

external_id (optional)

ouid (required)
The id of the organization the call belongs to. external_ouid can alternatively be used.

external_ouid (required)
The id of the organization the call belongs to. ouid can alternatively be used.

tracking_number (optional) The tracking number the call was assigned to. If you only want to see calls that were uploaded, specify "uploaded" as the tracking number.
A minimum of 3 and maximum of 11 digits is required.

extended (optional)
Whether to return a field called extended_data that contains a great deal of 3rd party information

ringto_number (optional)
The number that was called.
A minimum of 3 and maximum of 11 digits is required.

start_calldate (optional)
The date the call took place. You may pass any portion of the date starting with the year. For example:


      
2012-01-16 14:22:10 - All calls at that specific time
2012-01-16 - All calls on that day
2012 - All calls in 2012

end_calldate (optional)
If this parameter is included along with start_calldate, it will look for calls in the range between start_calldate and end_calldate.
Unlike start_calldate, this should be exact to the day, or day + time


      
2012-01-16 14:22:10 Valid
2012-01-16 Valid
2012 Would set an endpoint of 2012-01-01 00:00:00

tag (optional)
Search for calls tagged with this criteria. You can also search for multiple tags by separating them by commas, such as "Good Call,Proper Greeting" This will find all calls tagged with BOTH of those tags.

dni (optional)
Whether to return data about DNI Logs that contains information about phone calls from web visits.

Example Response

    
{
    "status": "success",
    "matches": 5,
    "results": [
        {
            "call_mine_status": "not mined",
            "cdr_source": null,
            "tracking_number": "4352670486",
            "disposition": "ANSWERED",
            "duration": 106,
            "external_id": null,
            "id": 144276,
            "is_outbound": 0,
            "ouid": 170,
            "repeat_call": true,
            "caller_id": "4356749158",
            "calldate": "2012-01-01 04:55:01",
            "ringto_number": "4356746700",
            "title": null,
            "user_id": null,
            "scored": false,
            "indicator": {
                "active_indicators": [],
                "custom_indicators": []
            },
            "tagged": false,
            "mine_error": "",
            "call_recorded": "demo_call",
            "file_url": "http://s3.amazonaws.com/LogMyCalls/call_recordings/demo_call.mp3?AWSAccessKeyId=AKIAJWS7DTIUUZPEGWCQ&Expires=1409789686&Signature=MwW%2FYlfAe04xsVf6PbO7Tk657nc%3D"
        }
    ]
}
    

The "results" response will always represent an array, even if only one result is returned. Results will return a maximum of 100 results.


getGroups

Description: Returns a single, or list of, groups within an organizational unit based on search criteria.

Arguments

Meta data

api_key (required)

api_secret (required)

start (optional)
The nth record to start from. For example, specifying "30" would get results starting at the 30th result

limit (optional)

sort_by (optional)
The field to sort by. Options: ouid, name, state, zip

sort_order (optional)
What order to sort results by. Options: desc, asc

Criteria

ouid (optional)
The id of the organization to search in.

external_ouid (optional)
The id of the organization to search in.

name (optional)
The name of the organizational unit. Can specify partial names to return an array of results matching that string.

state (optional)
State organization is in. Format: CA

zip (optional)
Zipcode group is in. Format: 92136

stores_only (optional)
Limit search to groups which have been marked as a Store in Users/Groups setup page. Options: 1 (true), 0 (default)

include_subgroups (optional)
Whether to return result including all subgroups of a group. Options: 1 (true), 0 (default)

Example Response

[
"status": "success",
"matches": "1",
"results":
    {
        "id": "56342", 
        "parent_id": "34",
        "name": "Bob's Fat Tacos",
        "address_line_1": "125 Main St",
        "address_line_2": "Suite 102",
        "city": "San Diego",
        "state": "CA",
        "zip": "92136",
        "is_store": "true",
        "latitude": "32.6822",
        "longitude": "-117.1094",
        "phone_number": "6192547848",
        "status": "active"
    }
]

The "results" response will always represent an array, even if only one result is returned. Results will return a maximum of 50 results.


getSubscriptionInfo

Description: Returns information about your subscription.

Arguments

Meta data

api_key (required)

api_secret (required)

Example Response


{
"status": "success"
"matches": "1"
"results": 

 [{
   "id":"4"
   "organizational_unit_id":"170",
   "product_id" : "7"
   "quantity": "2"
   "addon_id": "1"
   "quantity": "1"
 }]
}

getUsers

Description: Returns a single, or list of, users within an organizational unit based on search criteria.

Arguments

Meta data

api_key (required)

api_secret (required)

start (optional)
The nth record to start from. For example, specifying "30" would get results starting at the 30th result

limit (optional)
How many records to return. Maximum of 100.

sort_by (optional)
The field to sort by. Options: id, first_name, last_name, group_id

sort_order (optional)
What order to sort results by. Options: desc, asc

Criteria

email (optional)
Email address (username) of user to search for. Can be a partial string.

first_name (optional)
First name of user to search for. Can be a partial string.

last_name (optional)
Last name of user to search for. Can be a partial string.

group_id (optional)
Role user belongs to.
Accessible Group ID's

14 - Company Admin 
15 - Multi-group Admin
16 - Group Admin
17 - Standard User

ouid (optional)
Organizational unit user belongs to.

external_ouid (optional)
Organizational unit user belongs to. This id must have been previously set via the API using one of the update/insert methods.

Example Response

[
    "status": "success",
    "results":
        {
            "username": "user@yoohoo.com",
            "first_name": "John",
            "last_name": "Smith",
            "group_id": "5",
            "ouid": "32.6822",
            "status": "active",
            "created": "2010-12-14T10:24:02Z",
        }
    ]
    

getTags

Description: Get all tags for a specified call detail or organizational unit.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

Either a call_detail_id, external_id, ouid is required.

call_detail_id
ID of call detail to retrieve tags for.

external_id
External ID of call detail to retrieve tags for.

ouid
ID of the organizational unit.

public_only
If set to 1, will return only the keywords marked public; otherwise public and private keywords will be returned. (default = 0)


getCallScore

Description: Gets score for a specified call detail. Will return both summary information on the score, and the full scores for each scorecard criteria.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

Either a call_detail_id or an external_id is required.

call_detail_id
ID of call detail to retrieve the score for.

external_id
External ID of call detail to retrieve the score for.


deleteRecord

Description: Deletes a single, or list of, records within an organizational unit.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

type (required)
Record type to delete. Options: tag, group, user , dni. If a group has children groups, delete will not succeed.

id (required)
ID of object to delete

ouid (required)
ID of organization


getNumbers

Description: This method will look for numbers available to provision (local or toll-free). Besides returning a list of numbers matching your search criteria that is available, it will also show any reserved numbers belonging to your account.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

searchpattern (required)
What kind of phone numbers to look for; examples would be 800******* or 216***AUTO

include_number_pools (optional)
Returns number pool. If you want to return number pool then give true otherwise false.

Example Response

  
{
    "status": "success",
    "reserved": [],
    "available": [
        "6782164523",
        "6787651699",
        "6782573000",
        "6782573000",
        "6782573000"
    ],
    "available_number_pools": [],
    "transaction_id": 7767
}
  

reserveNumber

Description: Reserves a number for up to 2 days so you can provision a route later.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

number (requiredP)
The number you wish to reserve for later provisioning

Example Response


"status": "success"

getRoutes

Description: Returns array of route names, route ids, tracking numbers and array of tracking numbers from pool based on passed criteria.

Arguments

Meta data

api_key (required)

api_secret (required)

start (optional)
The nth record to start from. For example, specifying "30" would get results starting at the 30th result

limit (optional)

sort_by (optional)
The field to sort by. Options: id, tracking_number

sort_order (optional)
What order to sort results by. Options: desc, asc

Criteria

ouid (required)
The id of the organization the call belongs to.

Example Response


  {
    "status": "success",
    "matches": 4,
    "routes": [
      {
          "name": "Route",
          "id": 2,
          "tracking_numbers": [
        "7709999027"
          ],
          "repeat_interval": 72,
          "call_value": 0
      },
      {
          "name": "Real Number 1",
          "id": 16,
          "tracking_numbers": [],
          "repeat_interval": 72,
          "call_value": 0
      },
      {
          "name": "Test pool",
          "id": 17,
          "tracking_numbers": [],
          "repeat_interval": 72,
          "call_value": 0
      },
      {
          "name": "Real Number 1",
          "id": 20,
          "tracking_numbers": [
        "8325142574",
        "8325142618",
        "8325142644",
        "8325146651",
        "8325146714",
        "8325146716",
        "8325142593",
        "8325146718",
        "8325142564",
        "8325142569"
          ],
          "repeat_interval": 154,
          "call_value": 2
      }
    ]
  }

createRoute

Description: Creates a provisioned route for provided tracking number.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

route_type
simple
ivr
geo
schedule
outbound

ouid (required)

tracking_number (required)

OR

phone_number_pool_id (required)

name (required)

ringto_ouid (optional)

default_ringto (optional)

message (optional)

play_disclaimer (optional)

country_code (optional)

play_disclaimer (optional)

record_until (optional)

whisper_enabled (optional)

whisper_message (optional)

status (optional)

options (optional)

call_value (optional)
Assign an integer value to the route.

repeat_interval (optional)
Designate a repeat call interval for a route. Default value is 72 hours. The field is an integer that can support up to 4 digits; it must be greater than zero and no greater than 8760.

simple route

ringto_ouid (required)

default_ringto (required)

ivr route

options (required)

repeat_greeting (optional)

options params

value (required)

ouid (required)
ouid for target_did

target_did (required)

geo route

stratagy (required)
zipcode
npa

radius (optional)

play_branding (optional)

allow_manual_entry (optional)

schedule route

time_zone (required)

options (required)

repeat_greeting (optional)

options params

target_did (required)

ouid (required)
ouid for target_did

day (required)
1-monday
.
.
7-sunday

from_time (required)
HHMM-0815 => 8:15 am

to_time (required)
HHMM-1830 => 6:30 pm

outbound

pin (required)
1111-4 digits

caller_id (optional)

Example Response


    [
        {
            "status": "success",
            "call_flow": {
                "caller_to_sms": null,
                "country_code": 1,
                "default_ringto": "7894561230",
                "dnis": null,
                "email_to_notify": null,
                "message": "This is simple test route",
                "ouid": 170,
                "play_disclaimer": "before",
                "status": "active",
                "whisper_enabled": "false",
                "whisper_message": "This is test whisper message for simple route",
                "call_value": 72,
                "created": "2014-10-11T13:53:36Z",
                "id": 479,
                "modified": "2014-10-13T22:50:07Z",
                "name": "api 1 pool",
                "repeat_interval": 72,
                "route_type": "simple"
            },
            "transaction_id": 11918
        }
    ]
    

editRoute

Description: Edits a provisioned route for provided tracking number.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

route_type
simple
ivr
geo
schedule
outbound

tracking_number (required)

OR

phone_number_pool_id (required)

ouid (optional)

name (optional)

ringto_ouid (optional)

default_ringto (optional)

message (optional)

play_disclaimer (optional)

country_code (optional)

play_disclaimer (optional)

record_until (optional)

whisper_enabled (optional)

whisper_message (optional)

status (optional)

options (optional)

call_value (optional)
Assign an integer value to the route.

repeat_interval (optional)
Designate a repeat call interval for a route. Default value is 72 hours. The field is an integer that can support up to 4 digits; it must be greater than zero and no greater than 8760.

simple route

ringto_ouid (optional)

default_ringto (optional)

ivr route

options (optional)

repeat_greeting (optional)

options params

value (optional)

ouid (optional)
ouid for target_did

target_did (optional)

geo route

strategy (optional)
zipcode
npa

radius (optional)

play_branding (optional)

allow_manual_entry (optional)

schedule route

time_zone (optional)

options (optional)

repeat_greeting (optional)

options params

target_did (optional)

ouid (optional)
ouid for target_did

day (optional)
1-monday
.
.
7-sunday

from_time (optional)
HHMM-0815 => 8:15 am

to_time (optional)
HHMM-1830 => 6:30 pm

outbound

pin (optional)
1111-4 digits

caller_id (optional)

Example Response


    [
        {
            "status": "success",
            "call_flow": {
                "caller_to_sms": null,
                "country_code": 1,
                "default_ringto": "7894561230",
                "dnis": null,
                "email_to_notify": null,
                "message": "This is simple test route",
                "ouid": 170,
                "play_disclaimer": "before",
                "status": "active",
                "whisper_enabled": "false",
                "whisper_message": "This is test whisper message for simple route",
                "call_value": 72,
                "created": "2014-10-11T13:53:36Z",
                "id": 479,
                "modified": "2014-10-13T22:50:07Z",
                "name": "api 1 pool",
                "repeat_interval": 72,
                "route_type": "simple"
            },
            "transaction_id": 11918
        }
    ]
    

deleteRoute

Description: Deletes a provisioned route for provided tracking number.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

tracking_number (required)

OR

phone_number_pool_id (required)

Example Response


      [
        "status":"success",
        "transaction_id":13727101
      ]
    

uploadCall

Description: Uploads an audio file and creates call detail record. Conversation Analytics requires a stereo audio file in wave (.wav) or wavpack (.wv) format.

Arguments

Meta data

api_key (required)

api_secret (required)

calldate (required)
Time the call started. Format: YYYY-MM-DD HH:MM:SS.
example: 2011-08-24 00:00:00

ouid (required)
ID of the organizational unit to assign call to. Either the ouid or external_ouid must be specified for this method.

ringto_number (required)
The number that was called.
Format: 2223334444

audio (required)
A single dual channel audio file. Accepted formats: WAV, WV, MP3

caller_id (required)

tracking_number (optional)
The tracking number to assign this call to. Note: if the tracking number you specify already belongs to an organization you do not have access to, an error will be returned. If a tracking number isn't specified it will be sortable as "Uploaded" in the "filter by" widget.
Format: 2223334444.

external_ouid (optional)

is_outbound (optional)[0,1]
0 indicates inbound call; 1 indicates outbound call.

assign_to (optional)
The email address of the user to assign this call to.
Format: user@domain.com

disposition (optional)
How the call was received; if not passed, will default to answered.
Valid Options: ANSWERED, NO ANSWER, BUSY

external_id (optional)
ID of the organizational unit to assign call to. Either the ouid or external_ouid must be specified for this method.

mine_call (optional)[0,1]
0 indicates not to mine; 1 to mine.

Example Response


    [
        "status":"success",
        "transaction_id":13727091
    ]
    

uploadGreeting

Description: Uploads a greeting file.

Arguments

Meta data

api_key (required)

api_secret (required)

audio (required)
Binary audio file. Accepted formats: WAV

tracking_numbers or provisioned_route_id(s) (required)
The tracking numbers or provisioned routes to assign greeting audio to. If more than one tracking number or provisioned route exists, separate with a comma. Provisioned_route_id must be used for number pools.
Format: 2223334444,5556667777, provisioned_route_id1, provisioned_route_id2

Example Response


    [
        "status":"success",
        "transaction_id":13727091
    ]
    

insertDNI

Description: Insert a Dynamic Number Insertion (DNI) settings. This method allows setup of multiple dni records at a time by passing a nested array of dni settings in one request.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

ouid (required)
ID of the organizational unit to insert DNI settings.

host_url (required)
Host name of the website where DNI code will be embedded.

dni_type (required)
The type of DNI (url, source, session- case sensitive).

class_name (required)
User designated HTML class name to assign to the element.

provisioned_route_id (required)
ID of the provisioned route to associate with DNI setting.

referrer (required)
Referring website.
Example: *.*, google.com or *.google.com

referrer_type (optional)
Specify the type of traffic to track (paid, organic). To track all traffic from referring site, do not populate this value.

custom_params (optional)
User designated custom_params to capture key value pair in url-string.

pool_ttl (optional)
Time to Live value or cookie duration (min) to associate with dni record.

Example Response

{
    "status": "success",
    "matches": 1,
    "dni": [
        {
           "id": 17497,
           "master_node_id": "170",
           "host_domain": "www.logmycalls.com",
           "referrer": "google.com",
           "referring_type": organic,
           "dni_type": "session",
           "html_class": "campaign_1",
           "provisioned_route_id": "310",
           "pool_ttl": "60",
           "Tracking number/pool_id": 11254,
           "group_name": "PPC"
        }
    ],
    "transaction_id": 6696
}
       


updateDNI

Description: Update existing Dynamic Number Insertion (DNI) settings. This method allows accept multiple dni records at a time by passing a nested array of dni settings in one request.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

id (required)
ID of DNI record to update.

ouid (optional)
ID of the organizational unit DNI settings are associated with.

host_url (optional)
Host name of the website where DNI code is embedded.

dni_type (optional)
The type of DNI (url, source, session- case sensitive).

class_name (optional)
User designated HTML class name assigned to the element.

provisioned_route_id (optional)
ID of the provisioned route associated with DNI setting.

referrer (optional)
Referring website.
Example: *.*, google.com or *.google.com

referrer_type (optional)
Specify the type of traffic to track (paid, organic). To track all traffic from referring site, do not populate this value.

pool_ttl (optional)
Time to Live value or cookie duration (min) associated with dni record.

Example Response

{
    "status": "success",
    "matches": 1,
    "dni": [
        {
            "id": 17497,
            "master_node_id": "170",
            "host_domain": "www.logmycalls.com",
            "referrer": "*.*",
            "referring_type": organic,
            "dni_type": "session",
            "html_class": "Campaign_2",
            "provisioned_route_id": "310",
            "pool_ttl": "5",
            "Tracking number/pool_id": 1154,
            "group_name": "LogMycalls"
        }
    ],
    "transaction_id": 6697
}
       


getDNI

Description: This method returns all the dni settings for the specified organizational unit in a multidimensional array as JSON.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

ouid (required)
ID of the organizational unit to return data from.

Example Response

    {
        "status": "success",
        "matches": 2,
        "dni": [
                    {
                        "id": 17331,
                        "master_node_id": 170,
                        "host_domain": "*.*",
                        "referrer": "*.*",
                        "dni_type": "Url",
                        "html_class": "lmc_track",
                        "provisioned_route_id": 3358,
                        "pool_ttl": "",
                        "phone_number": "6782164526",
                        “group_name: "LogMycalls Banner"
                    },
                    {
                        "id": 17332,
                        "master_node_id": 170,
                        "host_domain": "www.logmycalls.com",
                        "referrer": "*.*",
                        "dni_type": "session",
                        "html_class": "real3",
                        "provisioned_route_id": 21,
                        "pool_ttl": 10,
                        "tracking number/pool_id": 3584,
                        “group_name”: "LogMycalls PPC"
                    }
                ],
        "transaction_id": 6700
    }
        


setDNICustomParams

Description: Insert custom DNI parameter for ouid. It accept comma separated string.

Arguments

Meta data

api_key (required)

api_secret (required)

dry_run (optional)
If dry_run is 1, no changes will be made to the database. The method will return expected data without any effect on actual data. Options: 1, 0

Criteria

ouid (required)
ID of the organizational unit to set custom parameters.

custom_params (required)
accept comma separated string.

Example Response

{
    "status": "success",
    "dni_custom_parameter": {
        "custom_params": "test1,test2",
        "id": 1,
        "ouid": 170
    },
    "transaction_id": 7840
}
    


getDNICode

Description: Return DNI Code.

Arguments

Meta data

api_key (required)

api_secret (required)

Criteria

ouid (required)
ID of the organizational unit to get DNI code.

Example Response

    
<!-- LogMyCalls Script Begins -->
<script defer src="https://stag.dni.logmycalls.com/dni.js"></script>
<script type="text/javascript">
  function dniLoadingTimer() { 
      if (typeof getDNIRecord == "function") { 
          getDNIRecord("149e9677a5989fd342ae44213df68868", "stag.dni.logmycalls.com");
      } else { 
          setTimeout(dniLoadingTimer, 100); 
      } 
  } 
  setTimeout(dniLoadingTimer, 100); 
</script>
<!-- LogMyCalls Script Ends -->
    
  


An alternative to cURL


Note: PHP must be configured with "allow_url_fopen" true and configured to support OpenSSL when using this method. Be cautious, "allow_url_fopen" will lower security.