NAV Navbar


This is the documentation for the Phonewagon API. Currently, you can query companies, campaigns, and calls using the API.

Requests are rate-limited at 50 requests per minute.


To authorize, use this code:

curl -u client-id:client-secret

Make sure to fill in the client ID and secret for your account.

Phonewagon provides a client ID and secret for each account to authorize API requests. Your account must be an Administrator to access these.

To find your client ID and secret:

You can find your ID and secret under the "Credentials" tab in Account Settings.

The ID and secret must be supplied as the basic auth username and password in each API request. The client id should be the username and the client secret should be the password.


Fetch companies for an account

curl -u client-id:client-secret

Example response:

  "companies": [
      "id": 1001,
      "name": "Phonewagon"
      "id": 9812,
      "name": "Jake's rake company"

This endpoint retrieves all companies.

HTTP Request



Fetch campaigns for a company

curl -u client-id:client-secret

Example response:

  "campaigns": [
      "id": "s2212",
      "name": "Facebook"

This endpoint retrieves all campaigns for a company.

HTTP Request



Query calls for an account

curl -u client-id:client-secret

Example response:

  "calls": [
      "account_id": 696,
      "ad_position": "",
      "campaign_name": "Dummy name",
      "company_id": 1386,
      "contact_name": "Bronx        Ny",
      "device": "",
      "direction": "inbound",
      "duration": 54,
      "fbclid": "",
      "from_number": "+19295559999",
      "gclid": ""
      "id": 6315,
      "is_first_time_caller": false,
      "keyword": "",
      "landing_page": "",
      "match_type": "",
      "msclkid": "",
      "network": "",
      "recording_url": "",
      "referral_value": "",
      "sid": "CA9d0462dd32f10134829dde342c1ec85c",
      "start_time": 1575322416000,
      "status": "completed",
      "to_number": "+18445551234",
      "unbounce_page_id": "",
      "unbounce_variant_id": "",
      "unbounce_visitor_id": "",
      "user_source": "Yahoo organic",
      "utm_campaign": "",
      "utm_content": "",
      "utm_medium": "",
      "utm_source": "",
      "utm_term": "",
  "next": ""

No parameters are required. If none are supplied, the endpoint will return all of the calls for an account.


The endpoint is capped at returning 1000 call records. You can decrease this cap by supplying the page_size param. If there are more records that fulfill the query, the endpoint will include a next key in the response. This can be use to get the next "page" of records for the query. To get all the records for a query, keep requesting the successive next urls until one is not supplied.

HTTP Request


URL Parameters

Parameter Type Required? Default Notes
company_id integer no Returned from /companies endpoint
start_time integer no 0 Epoch time in milliseconds
end_time integer no Current time Epoch time in milliseconds
page_size integer no 1000 Will truncate to 1000 if greater than 1000
campaign_id string no Returned from /campaigns endpoint

Some clarifications for fields: