The CallOnTheGo API is a REST based JSON API. It's not a strict REST API, because that is silly. We want to keep down the number of requests as much as possible.
After creating an account, obtain your API Key by clicking your username in the upper right corner of the site and then clicking the show link under API Key.
When making requests, include the API Key as a header called x-cotg-authtoken.
https://app.callonthego.com/api/v1
id
integer
name
string
description
text
user_id
integer
contact_size
integer
oid
string
created_at
datetime
updated_at
datetime
deleted_at
datetime
id
integer
first_name
string
last_name
string
number
string
company
string
email
string
notes
text
oid
string
user_id
integer
created_at
datetime
updated_at
datetime
deleted_at
datetime
id
integer
call_time
integer
prev_call_id
integer
start_time
datetime
end_time
datetime
oid
string
contact_id
integer
list_id
integer
user_id
integer
created_at
datetime
updated_at
datetime
deleted_at
datetime
Authenticated requests made to the following urls will result in the following behavior.
Root URL: https://app.callonthego.com/api/v1
Create User
POST: /user/appregister
https://app.callonthego.com/api/v1/user/appregister
creates a new user on CallOnTheGo App
Input
{
"email" => "[email protected]",
"password" => "15as@sd8"
}
Output
{
success: true,
email: "[email protected]",
token: "7e8262334f1338930ac92b98964d5",
tokenExpire: 1473518119
}
Google Authentication
POST: /google/authorcreate
https://app.callonthego.com/api/v1/user/google/authorcreate
creates a new user on CallOnTheGo App using google token
Input
{
"email" => "[email protected]",
"token" => "01b1650a43cb5b",
"refreshtoken" => "72465465465"
}
Output
{
"authToken": {
"token": "01b1650a43cb5b",
"tokenExpire": 7246546546
}
}
Get User Token
POST: /user/token
https://app.callonthego.com/api/v1/user/token
returns user's
token
Input
{
"email" => "[email protected]",
"password" => "15as@sd8"
}
Output
{
success: true,
email: "[email protected]",
token: "7e8262334f1338930ac92b98964d5",
tokenExpire: 1473518119
}
Get All Lists
GET: /lists
https://app.callonthego.com/api/v1/lists
returns all the lists for an authenticated user
Output
{"lists"=>
[{
"id"=>1,
"name"=>"All Contacts",
"description"=>"Reiciendis quo quidem ipsam laboriosam.",
"oid"=>nil,
"deleted_at"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T06:31:18.580Z",
"updated_at"=>"2016-08-17T06:31:18.580Z",
"contact_size"=>8
},
{
"id"=>5,
"name"=>"CallOnTheGo Support",
"description"=>"Suscipit officia ratione id aut repellendus.",
"oid"=>nil,
"deleted_at"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T06:31:18.598Z",
"updated_at"=>"2016-08-17T06:31:18.598Z",
"contact_size"=>4
}]
}
Create List
POST: /lists
https://app.callonthego.com/api/v1/lists
returns a newly created list
Input
{
"name" => "Front-line",
"description" => "Aut autem quia."
}
Output
{
"id"=>6,
"name"=>"Front-line",
"description"=>"Aut autem quia.",
"oid"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T06:51:18.022Z",
"updated_at"=>"2016-08-17T06:51:18.022Z",
"deleted_at"=>nil,
"contact_size"=>0
}
Update List
PUT: /lists/:id
https://app.callonthego.com/api/v1/lists/6
returns a updated list
Input
{
"name" => "Morning Call"
}
Output
{
"id"=>6,
"name"=>"Morning Call",
"description"=>"Aut autem quia.",
"oid"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T06:51:18.022Z",
"updated_at"=>"2016-08-17T07:01:23.205Z",
"deleted_at"=>nil,
"contact_size"=>25
}
Get List
GET: /lists/:id
https://app.callonthego.com/api/v1/lists/5
returns a list for requested id 5
Output
{
"id"=>5,
"name"=>"CallOnTheGo Support",
"description"=>nil,
"oid"=>nil,
"deleted_at"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T07:35:33.779Z",
"updated_at"=>"2016-08-17T07:35:33.779Z",
"contact_size"=>8
}
Delete List
DELETE: /lists/:id
https://app.callonthego.com/api/v1/lists/8
deletes a list for requested id 8
Output
{
"success"=>"Deleted successfully"
}
Get Recent Lists
GET: /lists/recent
https://app.callonthego.com/api/v1/lists/recent
returns last three lists
Output
{"lists"=>
[{
"id"=>5,
"name"=>"CallOnTheGo Support",
"description"=>nil,
"oid"=>nil,
"deleted_at"=>nil,
"user_id"=>1,
"created_at"=>"2016-08-17T07:48:46.002Z",
"updated_at"=>"2016-08-17T07:48:46.002Z",
"contact_size"=>8
},
..........
}]
}
Get List Contacts
GET: /lists/:id/contacts
https://app.callonthego.com/api/v1/lists/50/contacts
returns contacts for a list id 50
Output
{
"contacts": [
{
"id": 32343,
"first_name": "David",
"last_name": "Miller",
"number": "11220011",
"company": "Automated responsive synergy",
"notes": "",
"user_id": 7015,
"created_at": "2016-08-09T06:48:36.612Z",
"updated_at": "2016-08-09T06:48:36.612Z",
"oid": null,
"deleted_at": null
},
...........
]
}
Get List Calls
GET: /lists/:id/calls
https://app.callonthego.com/api/v1/lists/50/contacts
returns all the calls made for a list id 50
Output
{
"calls": [
{
"id": 10556,
"prev_call_id": 32331,
"call_time": 23,
"contact_id": 32332,
"created_at": "2016-08-08T15:34:18.880Z",
"updated_at": "2016-08-08T15:34:18.880Z",
"start_time": "2016-08-01T13:14:56.000Z",
"end_time": "2016-08-01T13:15:19.000Z",
"user_id": 7015,
"oid": null,
"deleted_at": null,
"list_id": 50
},
............
]
}
Add List Contact
POST: /lists/:id/contact/add
http://localhost:3000/api/v1/lists/50/contact/add
creates a new contact for a list
Input
{
"first_name" => "Trevor",
"last_name" => "Kessler",
"number" => "541-836-3930",
"company" => "Compatible analyzing software"
}
Output
{
"id": 63333,
"first_name": "Trevor",
"last_name": "Kessler",
"number": "541-836-3930",
"company": "Compatible analyzing software",
"notes": "",
"user_id": 7015,
"created_at": "2016-08-17T08:37:24.921Z",
"updated_at": "2016-08-17T08:37:24.921Z",
"oid": null,
"deleted_at": null
}
Delete List Contact
DELETE: /lists/:id/contact/:contactId
http://localhost:3000/api/v1/lists/49/contact/32342
deletes a contact with contactId 32342 for a list id 49
Output
{
"success": "Removed successfully"
}
GET: /lists/:id/contacts/paged/:pageNum
https://app.callonthego.com/api/v1/lists/47/contacts/paged/2
returns contacts on page number 2 for a list id 47
Output
{
"contacts": [
{
"id": 32343,
"first_name": "David",
"last_name": "Miller",
"number": "11220011",
"company": "Automated responsive synergy",
"notes": "",
"user_id": 7015,
"created_at": "2016-08-09T06:48:36.612Z",
"updated_at": "2016-08-09T06:48:36.612Z",
"oid": null,
"deleted_at": null
},
...........
]
}
Get All Contacts
GET: /contacts
https://app.callonthego.com/api/v1/contacts
returns all the contacts for an authenticated user
Output
{"contacts"=>
[{
"id": 32329,
"first_name": "CallOnTheGo Support",
"last_name": "",
"number": "18883012726",
"email": null,
"company": "Support",
"notes": "Support - getting started, import, etc",
"user_id": 7015,
"created_at": "2016-08-05T14:17:35.695Z",
"updated_at": "2016-08-05T14:17:35.695Z",
"oid": null,
"deleted_at": null
},
.........
]
}
Create Contact
POST: /contacts
https://app.callonthego.com/api/v1/contacts
returns a newly created contact for lists with id 10, 14, 22.
Input
{
"list_ids" => [10,14,22],
"first_name" => "Trevor",
"last_name" => "Kessler",
"number" => "541-836-3930",
"company" => "Compatible analyzing software"
}
Output
{
"id": 63333,
"first_name": "Trevor",
"last_name": "Kessler",
"number": "541-836-3930",
"company": "Compatible analyzing software",
"notes": "",
"user_id": 7015,
"created_at": "2016-08-17T08:37:24.921Z",
"updated_at": "2016-08-17T08:37:24.921Z",
"oid": null,
"deleted_at": null
}
Get Contact
GET: /contacts/:id
https://app.callonthego.com/api/v1/contatcs/32329
returns a contact for requested id 32329
Output
{
"id": 32329,
"first_name": "CallOnTheGo Support",
"last_name": "",
"number": "18883012726",
"email": null,
"company": "Support",
"notes": "Support - getting started, import, etc",
"user_id": 7015,
"created_at": "2016-08-05T14:17:35.695Z",
"updated_at": "2016-08-05T14:17:35.695Z",
"oid": null,
"deleted_at": null
}
Update Contact
PUT: /contacts/:id
https://app.callonthego.com/api/v1/contacts/32331
returns a updated contact
Input
{
"number" => "15426574",
"last_name" => "Waugh"
}
Output
{
"id": 32331,
"first_name": "Mike",
"last_name": "Waugh",
"number": "15426574",
"email": null,
"company": "Support",
"notes": "Support - getting started, import, etc",
"user_id": 7015,
"created_at": "2016-08-05T14:17:35.695Z",
"updated_at": "2016-08-05T14:17:35.695Z",
"oid": null,
"deleted_a
Delete Contact
DELETE: /contacts/:id
https://app.callonthego.com/api/v1/contacts/8
deletes a contact for requested id 8
Output
{
"success"=>"Deleted successfully"
}
Get Contact Calls
GET: /contacts/:id/calls
https://app.callonthego.com/api/v1/contacts/50/calls
returns all the calls made for a contact id 50
Output
{
"calls": [
{
"id": 10556,
"prev_call_id": 32331,
"call_time": 23,
"contact_id": 32332,
"created_at": "2016-08-08T15:34:18.880Z",
"updated_at": "2016-08-08T15:34:18.880Z",
"start_time": "2016-08-01T13:14:56.000Z",
"end_time": "2016-08-01T13:15:19.000Z",
"user_id": 7015,
"oid": null,
"deleted_at": null,
"list_id": 50
},
............
]
}
Search Contact
GET: /contacts/search
https://app.callonthego.com/api/v1/contacts/search
returns all the contacts that contains searched string
Input
{
"search" => "Morning"
}
Output
{"contacts": [
{
"id": 32329,
"first_name": "Morning Call",
"last_name": "",
"number": "18883012726",
"email": null,
"company": "Support",
"notes": "Support - getting started, import, etc",
"user_id": 7015,
"created_at": "2016-08-05T14:17:35.695Z",
"updated_at": "2016-08-05T14:17:35.695Z",
"oid": null,
"deleted_at": null
},
............
]
}
Contact Page
GET: /contacts/paged/:pageNum
https://app.callonthego.com/api/v1/contacts/paged/25
returns contacts on page number 25
Output
{
"contacts": [
{
"id": 32343,
"first_name": "David",
"last_name": "Miller",
"number": "11220011",
"company": "Automated responsive synergy",
"notes": "",
"user_id": 7015,
"created_at": "2016-08-09T06:48:36.612Z",
"updated_at": "2016-08-09T06:48:36.612Z",
"oid": null,
"deleted_at": null
},
...........
]
}
Delete Contacts
POST: /contacts/deletemultiple
https://app.callonthego.com/contacts/deletemultiple
deletes multiple contacts.
Input
{
"contact_ids" => [32339, 33211]
}
Output
{
success: 'Removed successfully'
}
Update Notes
POST: /contacts/:id/notes
https://app.callonthego.com/contacts/32329/notes
Returns contact with updated notes.
Input
{
"notes" => "Support - getting started, import, etc"
}
Output
{
"id": 32329,
"first_name": "Morning Call",
"last_name": "",
"number": "18883012726",
"company": "Support",
"notes": "Support - getting started, import, etc",
"user_id": 7015,
"created_at": "2016-08-05T14:17:35.695Z",
"updated_at": "2016-08-05T14:17:35.695Z",
"oid": null,
"deleted_at": null
}
Get Calls
GET: /calls
https://app.callonthego.com/api/v1/calls
returns all the calls made by a user user
Output
{"calls"=>
[{
"id": 10556,
"prev_call_id": 32331,
"call_time": 23,
"contact_id": 32332,
"created_at": "2016-08-08T15:34:18.880Z",
"updated_at": "2016-08-08T15:34:18.880Z",
"start_time": "2016-08-01T13:14:56.000Z",
"end_time": "2016-08-01T13:15:19.000Z",
"user_id": 7015,
"oid": null,
"deleted_at": null,
"list_id": 44
},
.........
]
}
Create Call
POST: /calls
https://app.callonthego.com/api/v1/calls
returns a newly made call
Input
{
"prevCallId" => 13325,
"began" => "2016-08-01T13:15:19",
"ended" => "2016-08-01T13:25:19",
"list_id" => 25,
"contact_id" => 25411
}
Output
{
"id": 10556,
"prev_call_id": 13325,
"call_time": 1200,
"contact_id": 25411,
"created_at": "2016-08-08T15:34:18.880Z",
"updated_at": "2016-08-08T15:34:18.880Z",
"start_time": "2016-08-01T13:15:19.000Z",
"end_time": "2016-08-01T13:25:19.000Z",
"user_id": 7015,
"oid": null,
"deleted_at": null,
"list_id": 25
}
Create Calls
POST: /calls/create_batch_calls
https://app.callonthego.com/api/v1/calls/create_batch_calls
creates multiple calls
Input
{
calls : [
"prevCallId" => 13325,
"began" => "2016-08-01T13:15:19",
"ended" => "2016-08-01T13:25:19",
"list_id" => 25,
"contact_id" => 25411
],
[
................
}
Output
{
success: true
}