Skip to main content
All CollectionsCRM Integrations
How to Use Salestrail Pull API

How to Use Salestrail Pull API

Pull api

Yvonne Pulkkinen avatar
Written by Yvonne Pulkkinen
Updated this week

Step 1: Generate Pull API credentials

Go to https://callanalytics.salestrail.io/integration/apidocs and generate the username and password at the top of the page. Save these credentials, since the password won't be shown again.

Step 2: Call the APIs.

There are several endpoints for you to call to fetch your organisations data. - /export/calls/byCreated/csv: Retrieve call data based on the created datetime resulting in CSV formatted data - /export/calls/byCreated/json: Retrieve call data based on the created datetime resulting in JSON formatted data - /export/calls/csv: Retrieve call data based on the call start time (datetime) resulting in CSV formatted data - /export/calls/json: Retrieve call data based on the call start time (datetime) resulting in JSON formatted data - /export/calls/{callId}/recording: Retrieve a recording for a call identified by callId Authentication for these endpoints uses Basic scheme (https://en.wikipedia.org/wiki/Basic_access_authentication) with the username and password generated in step 1. The data returned depends on what data you are allowed to see in the dashboard. This means, as a USER you'd only get your own data, and as an OWNER, you'd get all data.

Step 2.1: Call endpoints -- The first four endpoints require HTTP request parameters 'from' and 'to' to filter the results to specific time - either using created timestamp or start timestamp of the call. All timestamps are given out in UTC timestamps. Example call using cURL: curl -u username:password --basic 'https://standalone-api.salestrail.io/export/calls/byCreated/json?from=2025-02-01T00%3A00%3A00.000Z&to=2025-03-01T00%3A00%3A00.000Z' This would fetch JSON data of the calls that were created between 2025-02-01 00:00:00.000Z and 2025-02-28 23:59:59.999Z

Step 2.2: Recording endpoint -- With this endpoint, you can fetch a recording. Calling this endpoint requires a call id from the call APIs. Example call using cURL: curl -u username:password --basic 'https://standalone-api.salestrail.io/export/calls/12345678-1234-1234-1234-123456781234/recording'

This API returns 404 if a recording isn't found or if you don't have access to this recording. On success, the returned HTTP status is 302, and the Location header will give a blob storage URL that you can use to download the recording. Usually this is done directly using a "follow redirects" option on the client/library you are using (cURL: -L/--location). Or, you can parse the response and execute another query.

Did this answer your question?