Teleco.IO API Documentation
API Endpoints
1. Login 2. Carriers 3. Create Carrier 4. Inventory 5. Activity Logs 6. States 7. Rate Centers 8. Search 9. Providers 10. Order 11. Route Number 12. Subaccounts 13. Call Forward 14. Multi Call Forward 15. Show Inventory 16. Remove Call Forward 17. Multi Remove Call Forward 18. List Sub Clients 19. Create Sub Clients 20. Show Sub Clients 21. Update Sub Clients 22. Delete Sub ClientsAPI Overview
- API Endpoint
- All API URLs are relative to
https://api.teleco.io/. For example,/api/carriersis reachable athttps://api.teleco.io/api/carriers - Output Format
JSON- Authorization
-
All APIs except login require basic HTTP authentication with client username and API key.
Example using curl:
curl --user username:api_key https://api.teleco.io/api/carriersReplace
usernameandapi_keywith actual credentials. Get your API key using the login API.
1. Login API
| URL | /api/login |
| HTTP Method | POST |
| Description | Authenticate user and retrieve API key |
| Request Parameters | login (email or username), password |
| Example Curl | curl -X POST -H "Content-Type: application/json" -d '{"login":"your_username", "password":"your_password"}' https://api.teleco.io/api/login |
| Success Response | {"result":{"message":"Sign in Successfully","status":200,"error":0}, "data":[{"id":1,"email":"user@example.com", "username":"your_username", "api_key":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}]} |
2. Carriers API
| URL | /api/carriers |
| HTTP Method | GET |
| Description | List all carrier accounts |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/carriers |
| Success Response | {"result":{"message":"Carrier Account List","status":200,"error":0},"data":[{"id":1,"account_name":"Example Account","provider":"Example Provider","is_enable":true,"primary_account":true}]} |
3. Create Carrier API
| URL | /api/carriers |
| HTTP Method | POST |
| Description | Create a new carrier account |
| Authentication | Required |
| Request Parameters | provider_id, account_name, username, password, api_token, is_enable, primary_account |
4. Inventory API
| URL | /api/inventories |
| HTTP Method | GET |
| Description | List all inventory (DIDs) with pagination |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/inventories |
| Success Response | {"result":{"message":"Inventory List","status":200,"error":0},"data":{"pagination":{"current_page":1,"total_pages":10,"total_count":100},"data_arr":[...]}} |
5. Activity Logs API
| URL | /api/activities_logs |
| HTTP Method | GET |
| Description | Fetch activity logs for account |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/activities_logs |
6. States API
| URL | /api/states/available |
| HTTP Method | GET |
| Description | Get list of available states |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/states/available |
7. Rate Centers API
| URL | /api/states/:state_id/rate_centers |
| HTTP Method | GET |
| Description | Get rate centers for a specific state |
| Authentication | Required |
| Parameters | state_id (e.g., "AL") |
8. Search API
| URL | /api/providers/:provider_id/search |
| HTTP Method | POST |
| Description | Search for available DIDs by NPA/NXX, state, or rate center |
| Authentication | Required |
| Example Curl | curl -X POST 'https://api.teleco.io/api/providers/1/search' -H 'Content-Type: application/json' --user 'username:api_key' -d '{"search": {"search_type": "local_did", "npanxx": "true", "search_number": "555"}}' |
| Request Parameters | search_type (local_did, fax_did, tollfree_did, international_did), npanxx, search_number, state, ratecenter |
9. Providers API
| URL | /api/providers/primary/providers |
| HTTP Method | GET |
| Description | Get list of available providers |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/providers/primary/providers |
10. Order API
| URL | /api/orders |
| HTTP Method | POST |
| Description | Order DID numbers |
| Authentication | Required |
| Example Curl | curl -X POST "https://api.teleco.io/api/orders" -u 'username:api_key' -H "Content-Type: application/json" -d '{"numbers":{"0":{"did_number":"5551234567","provider_id":1,"tier_type":1121,"did_type":"voice","quantity":1}}}' |
11. Route Number API
| URL | /api/route_numbers |
| HTTP Method | POST |
| Description | Route DID to carrier/subaccount |
| Authentication | Required |
| Example Curl | curl -X POST "https://api.teleco.io/api/route_numbers" -u 'username:api_key' -H "Content-Type: application/json" -d '{"numbers":{"0":{"did_number":"5551234567","provider_id":1,"carrier_id":1,"subaccount":1}}}' |
12. Subaccounts API
| URL | /api/sub_accounts |
| HTTP Method | GET |
| Description | List all subaccounts |
| Authentication | Required |
| Example Curl | curl -X GET -u "username:api_key" https://api.teleco.io/api/sub_accounts |
13. Call Forward API
| URL | /api/inventories/:inventory_id/call_forward |
| HTTP Method | POST |
| Description | Set call forwarding for a DID |
| Authentication | Required |
| Example Curl | curl -X POST 'https://api.teleco.io/api/inventories/123/call_forward' -H 'Content-Type: application/json' --user 'username:api_key' -d '{"call_forward":{"forward_number":"15555551212"}}' |
| Parameters | inventory_id (DID ID), forward_number |
14. Multi Call Forward API
| URL | /api/inventories/multiple_call_forward |
| HTTP Method | POST |
| Description | Set call forwarding for multiple DIDs at once |
| Authentication | Required |
| Example Curl | curl -X POST "https://api.teleco.io/api/inventories/multiple_call_forward" -u 'username:api_key' -H "Content-Type: application/json" -d '{"call_forward_numbers":[{"inventory_id":1,"inventory_number":"5551234567","forward_number":"5559876543"}]}' |
| Parameters | Array of objects with inventory_id, inventory_number, forward_number |
15. Show Inventory API
| URL | /api/inventories/:id |
| HTTP Method | GET |
| Description | Get details for a specific DID/inventory |
| Authentication | Required |
| Example Curl | curl -X GET "https://api.teleco.io/api/inventories/123" -u 'username:api_key' -H "Content-Type: application/json" |
16. Remove Call Forward API
| URL | /api/inventories/:inventory_id/remove_call_forward.json |
| HTTP Method | DELETE |
| Description | Remove call forwarding from a DID |
| Authentication | Required |
| Example Curl | curl -X DELETE 'https://api.teleco.io/api/inventories/123/remove_call_forward.json' -H 'Content-Type: application/json' --user 'username:api_key' |
17. Multi Remove Call Forward API
| URL | /api/inventories/multiple_call_forward_removal |
| HTTP Method | POST |
| Description | Remove call forwarding from multiple DIDs at once |
| Authentication | Required |
| Example Curl | curl -X POST "https://api.teleco.io/api/inventories/multiple_call_forward_removal" -u 'username:api_key' -H "Content-Type: application/json" -d '{"call_forward_numbers":[{"inventory_id":1,"inventory_number":"5551234567"}]}' |
| Parameters | Array of objects with inventory_id, inventory_number |
18. List Sub Clients API
| URL | /api/sub_clients |
| HTTP Method | GET |
| Description | List all sub-clients under this account |
| Authentication | Required |
19. Create Sub Clients API
| URL | /api/sub_clients |
| HTTP Method | POST |
| Description | Create a new sub-client |
| Authentication | Required |
20. Show Sub Clients API
| URL | /api/sub_clients/:id |
| HTTP Method | GET |
| Description | Show details of a specific sub-client |
| Authentication | Required |
21. Update Sub Clients API
| URL | /api/sub_clients/:id |
| HTTP Method | PUT |
| Description | Update a sub-client |
| Authentication | Required |
22. Delete Sub Clients API
| URL | /api/sub_clients/:id |
| HTTP Method | DELETE |
| Description | Delete a sub-client |
| Authentication | Required |