Teleco.IO API Documentation

API Overview
API Endpoint
All API URLs are relative to https://api.teleco.io/. For example, /api/carriers is reachable at https://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/carriers

Replace username and api_key with actual credentials. Get your API key using the login API.

1. Login API
URL/api/login
HTTP MethodPOST
DescriptionAuthenticate user and retrieve API key
Request Parameterslogin (email or username), password
Example Curlcurl -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 MethodGET
DescriptionList all carrier accounts
AuthenticationRequired
Example Curlcurl -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 MethodPOST
DescriptionCreate a new carrier account
AuthenticationRequired
Request Parametersprovider_id, account_name, username, password, api_token, is_enable, primary_account
4. Inventory API
URL/api/inventories
HTTP MethodGET
DescriptionList all inventory (DIDs) with pagination
AuthenticationRequired
Example Curlcurl -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 MethodGET
DescriptionFetch activity logs for account
AuthenticationRequired
Example Curlcurl -X GET -u "username:api_key" https://api.teleco.io/api/activities_logs
6. States API
URL/api/states/available
HTTP MethodGET
DescriptionGet list of available states
AuthenticationRequired
Example Curlcurl -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 MethodGET
DescriptionGet rate centers for a specific state
AuthenticationRequired
Parametersstate_id (e.g., "AL")
8. Search API
URL/api/providers/:provider_id/search
HTTP MethodPOST
DescriptionSearch for available DIDs by NPA/NXX, state, or rate center
AuthenticationRequired
Example Curlcurl -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 Parameterssearch_type (local_did, fax_did, tollfree_did, international_did), npanxx, search_number, state, ratecenter
9. Providers API
URL/api/providers/primary/providers
HTTP MethodGET
DescriptionGet list of available providers
AuthenticationRequired
Example Curlcurl -X GET -u "username:api_key" https://api.teleco.io/api/providers/primary/providers
10. Order API
URL/api/orders
HTTP MethodPOST
DescriptionOrder DID numbers
AuthenticationRequired
Example Curlcurl -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 MethodPOST
DescriptionRoute DID to carrier/subaccount
AuthenticationRequired
Example Curlcurl -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 MethodGET
DescriptionList all subaccounts
AuthenticationRequired
Example Curlcurl -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 MethodPOST
DescriptionSet call forwarding for a DID
AuthenticationRequired
Example Curlcurl -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"}}'
Parametersinventory_id (DID ID), forward_number
14. Multi Call Forward API
URL/api/inventories/multiple_call_forward
HTTP MethodPOST
DescriptionSet call forwarding for multiple DIDs at once
AuthenticationRequired
Example Curlcurl -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"}]}'
ParametersArray of objects with inventory_id, inventory_number, forward_number
15. Show Inventory API
URL/api/inventories/:id
HTTP MethodGET
DescriptionGet details for a specific DID/inventory
AuthenticationRequired
Example Curlcurl -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 MethodDELETE
DescriptionRemove call forwarding from a DID
AuthenticationRequired
Example Curlcurl -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 MethodPOST
DescriptionRemove call forwarding from multiple DIDs at once
AuthenticationRequired
Example Curlcurl -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"}]}'
ParametersArray of objects with inventory_id, inventory_number
18. List Sub Clients API
URL/api/sub_clients
HTTP MethodGET
DescriptionList all sub-clients under this account
AuthenticationRequired
19. Create Sub Clients API
URL/api/sub_clients
HTTP MethodPOST
DescriptionCreate a new sub-client
AuthenticationRequired
20. Show Sub Clients API
URL/api/sub_clients/:id
HTTP MethodGET
DescriptionShow details of a specific sub-client
AuthenticationRequired
21. Update Sub Clients API
URL/api/sub_clients/:id
HTTP MethodPUT
DescriptionUpdate a sub-client
AuthenticationRequired
22. Delete Sub Clients API
URL/api/sub_clients/:id
HTTP MethodDELETE
DescriptionDelete a sub-client
AuthenticationRequired