Call Logs API

Overview

Plum offers four services for its Call Log REST API:

All of the Call Log REST APIs have the same return format that includes a status (success or failure), error message and the result data.

Sample Responses

{
  "status":"success",
  "error":"",
  "result": {
    // SAMPLE RESULT DATA
  }
}

Recent Call Logs

GET https://hosting.vxml.sharpencx.com/ws/calls/logs/{start_timestamp}/{end_timstamp}

Returns a filtered list of recent calls for which logs exist. Call logs are only retained for the previous 5 days.

Path Parameters

Name
Type
Description

start_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting on or after this timestamp Note: The start_timestamp must be within the last year.

end_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting before this timestamp Note: The end_timestamp must be after the start_timestamp.

Query Parameters

Name
Type
Description

number

string

Filters the list of call logs for only calls to this phone number.

offset

integer

Number of call logs to skip before returning results. Default: 0

limit

integer

Maximum number of call logs to return. Default: 1000, Minimum: 1, Maximum: 10000

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

accept

string

application/json (default), application/xml

Sample Code

The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.

Call Log

GET https://hosting.vxml.sharpencx.com/ws/calls/log/{log_id}

Returns a recent call log using a log_id returned in the calls/logs response. To fetch all logs for your account you should call calls/logs to get the list of calls then loop through those results calling calls/log/{log_id} to fetch each individual call log.

Path Parameters

Name
Type
Description

log_id

integer

The ID of the log we are fetching. The log_id value is provided in the response from the calls?logs REST service.

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

accept

string

application/json (default), application/xml

Sample Code

The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.

Session Logs

GET https://hosting.vxml.sharpencx.com/ws/calls/sessions/{start_timestamp}/{end_timstamp}

Returns a filtered list of session logs. Unlike call logs, session logs are stored for up to 1 year.

Path Parameters

Name
Type
Description

start_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting on or after this timestamp Note: The start_timestamp must be within the last year.

end_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting before this timestamp Note: The end_timestamp must be after the start_timestamp.

Query Parameters

Name
Type
Description

number

string

Filters the list of call logs for only calls to this phone number.

offset

integer

Number of call logs to skip before returning results. Default: 0

limit

integer

Maximum number of call logs to return. Default: 1000, Minimum: 1, Maximum: 10000

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

accept

string

application/json (default), application/xml

Sample Code

The following code sample is written in PHP but any language that can connecting to a JSON or XML REST service can utilize this API.

Error Logs

GET https://hosting.vxml.sharpencx.com/ws/calls/errors/{start_timestamp}/{end_timstamp}

Returns a filtered list of error logs. Error logs are stored for up to 1 year.

Path Parameters

Name
Type
Description

start_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting on or after this timestamp Note: The start_timestamp must be within the last year.

end_timestamp

integer

UNIX timestamp filters the list of call logs for all calls starting before this timestamp Note: The end_timestamp must be after the start_timestamp.

Query Parameters

Name
Type
Description

number

string

Filters the list of call logs for only calls to this phone number.

offset

integer

Number of call logs to skip before returning results. Default: 0

limit

integer

Maximum number of call logs to return. Default: 1000, Minimum: 1, Maximum: 10000

Headers

Name
Type
Description

content-type

string

application/x-www-form-urlencoded

accept

string

application/json (default), application/xml

Sample Code

The following code sample is written in PHP but any language that can connect to a JSON or XML REST service can utilize this API.

Last updated