Agendize Calls API

Calls API Reference

The Calls API empowers you to access your call history, create call records and create Free Callback buttons to spread through your entire web presence. To make a call you have to use the Click-to-Call action API.


Resource representation

{ "id": {string}, "buttonId": {string}, "clientId": {string}, "callerNumber": {string}, "calledNumber": {string}, "trackingNumber": {string}, "start": { "dateTime": {datetime}, "timeZone": {string} }, "duration": {integer}, "status": {string}, "externalId": {string}, "type": {string}, "record": { "mimeType": {string}, "url": {string} } }
Parameter name Value Description
id string Identifier of the call. Read-only.
buttonId string Button identifier of the call
clientId string Client identifier of the call
callerNumber string Caller number of the call.
calledNumber string Called number of the call.
trackingNumber string Call tracking number of the call.
start object The start time of the call.
start.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information).
start.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company.
duration string Duration of the call.
status string Status of the call. Values are: completed, noAnswered, message, wrongNumber, busy, abandoned.
externalId string External Identifier. Your own identifier if you create your own call, on Agendize Identifier if you use click to call or call tracking fetaures.
type string Type of the call. Values are: "clickToCall", "callTracking"
record object Voice record of the call. Only if call recording is available and enable.
record.mineType string Mime type of the call recording. Value: "audio/mpeg".
record.url string Link to the call record.

Delete

Deletes an entry on the call list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

DELETE https://api.agendize.com/api/2.0/calls/{callId}

Parameters

Parameter name Value Description
Path parameters
callId string Call identifier.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns an empty response body.


Get

Returns an entry of the call list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

GET https://api.agendize.com/api/2.0/calls/{callId}

Parameters

Parameter name Value Description
Path parameters
callId string Call identifier.

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a Call resource in the response body.


List

Returns entries on the call list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

GET https://api.agendize.com/api/2.0/calls

Parameters

.
Parameter name Value Description
Optional query parameters
startDate datetime Upper bound (exclusive) for a call's start time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by start time.
endDate datetime Lower bound (exclusive) for a call's end time (as a RFC 3339 timestamp) to filter by. Optional. The default is not to filter by end time.
search string Free text search terms to find calls that match callerNumber, calledNumber or trackingNumber.
syncToken string Token obtained from the nextSyncToken field returned on the last page of results from the previous list request.
toolId string Tool identifier

Request body

Do not supply a request body with this method.

Response

If successful, this method returns a response body with the following structure:

{ items: [Call Resource] }

Insert

Adds an entry to the call list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

POST https://api.agendize.com/api/2.0/calls

Request body

In the request body, supply a Call Resource with the following properties:

Parameter name Value Description
Required Properties
callerNumber string Caller number of the call.
calledNumber string Called number of the call.
start object The start time of the call.
start.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information).
start.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company.
Optional Properties
duration list Duration of the call.
buttonId string Button identifier of the call
clientId string Client identifier of the call

Response

If successful, this method returns a Call resource in the response body.


Update

Updates an entry on the call list.

Authentication is required to execute this request. Please refer to Authentication for more.

Request

HTTP Request

PUT https://api.agendize.com/api/2.0/calls/{callId}

Parameters

Parameter name Value Description
Path parameters
callId string Call identifier.

Request body

In the request body, supply a Call resource with the following properties:

Parameter name Value Description
Optional Properties
buttonId string Button identifier of the call
clientId string Client identifier of the call
callerNumber string Caller number of the call.
calledNumber list Called number of the call.
start object The start time of the call.
start.dateTime string The time, as a combined date-time value (formatted according to RFC 3339, without time zone information).
start.timeZone string The time zone. Possible values can be found here. The default value is the time zone of the company.
duration list Duration of the call.

Response

If successful, this method returns a Call resource in the response body.


Watch

Watch for changes to Call resources.

Authentication is required to execute this request. Please refer to Authentication for more.

The watch send an Call resource in the request body

Request

HTTP Request

POST https://api.agendize.com/api/2.0/calls/watch

Parameters

Request body

{ "address": {string}, "name": {string}, "basicAuth": { "username": {string}, "password": {string} }, "httpRequestHeader": { {name}: {string} }, "schema": {object} "method": {string}, "status": {string}, "oauth2Auth": { "grantType": {string}, "clientId": {string}, "clientSecret": {string}, "refreshToken": {string}, "authUrl": {string}, "accessTokenUrl": {string}, "redirectUri": {string} }, "signature": { "enabled": {boolean}, "cryptoKeyIds": [ {string} ] } }
Required Properties
address string The address where notifications are delivered for this watch.
Optional Properties
name string Name of the watch.
basicAuth string Credentials parameters for HTTP Basic authentication on the destination watch address. Only if you use this authentication method.
basicAuth.username string Username.
basicAuth.password string Password.
httpRequestHeader string Custom header parameters to send with the http request on the destination watch address.
httpRequestHeader.name string header parameter name.
schema object Custom json schema to apply for resource properties.
method string HTTP Method to use for sending content. DELETE Method doesn't accept body content.
status string Status of the watcher. Values: "enabled", "disabled"
oauth2Auth string Credentials parameters for HTTP OAuth2 authentication on the destination watch address. Only if you use this authentication method.
oauth2Auth.grantType string OAuth2 grant type. Values: "refresh_token" (default), "client_credentials".
oauth2Auth.clientId string OAuth2 client id.
oauth2Auth.refreshToken string OAuth2 refresh token. Only for grantType "refresh_token"
oauth2Auth.authUrl string OAuth2 interactive end point to initiate the generation of the refresh token. Only for grantType "refresh_token"
oauth2Auth.accessTokenUrl string OAuth2 end point to generation an access token from the refresh token.
oauth2Auth.scope string OAuth2 api scope. Only for grantType "refresh_token"
signature object Produces a crypto signature of the watched content.
signature.enabled boolean Sets if the signature is enabled or not.
signature.cryptoKeyIds list Arrays of string of crypto keys identifier.

Response

If successful, this method returns a watch resource in the response body.

Examples of schema:

With JSON, only for string value:

{ "schema": { "my_id_key": "{id}", "dataContent": { "givenName": "{firstName}" } } }

With string to support typed values:

{ "schema": "\"my_id_key\": ${$.id}, \"dataContent\": { \"fullName\": \"${$.firstName} ${$.lastName}\"}" }

Replacement string can by defined with jsonpath expressions.