All API resources
Messages
The exchange's internal messaging between buyers and sellers: read your inbox, reply, write to a seller about one of their routes, and, as a seller, list your buyers and message them.
List buyer messages
POST/buyers/messages
Returns one page of your messages with sellers, newest first: the inbox (messages from sellers) or the outbox (messages you sent). Pass id to read a single message instead; reading an unread inbox message marks it as read. Messages about an anonymous route or DID name the sender as "Anonymous Owner of Route <name>" or "Anonymous Owner of DID Number <number>", leave out the seller ID and logo, and carry anonymous: 1. Free.
to_login instead of from_login. ts is formatted m/d/y h:mmAM; the same time is also returned as YYYY-MM-DD HH:MM:SS (see the example). Only inbox and outbox are accepted for show; any other value returns an error that is not JSON.Parameters
showstringform fieldOptionalWhich folder to list.
pagerintegerform fieldOptionalPage size. Values below 1 fall back to 30.
offintegerform fieldOptionalNumber of messages to skip, for paging.
idintegerform fieldOptionalReturn only this message, one you sent or received, as
messageinstead of amessageslist. Marks it read if it is an unread message to you.
Errors
| Message | When |
|---|---|
"Message not found" | id is not a message you sent or received |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/messages" \
-d show=inbox \
-d pager=30 \
-d off=0 \
-d id=4821import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/messages",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"show": "inbox", "pager": 30, "off": 0, "id": 4821},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/messages");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['show' => "inbox", 'pager' => 30, 'off' => 0, 'id' => 4821]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"messages": [
{
"i_message": "4821",
"from_type": "vendor",
"to_type": "customer",
"i_from": "87",
"i_to": "1042",
"ts": "03/14/26 9:42AM",
"status": "unread",
"reply_to": "4807",
"message_type": "message",
"subject": "Low ASR to UK mobile",
"message": "We rerouted the traffic; please test again.",
"additional_data": null,
"i_did": "0",
"i_connection": "0",
"thread_id": null,
"from_login": "NorthwindVoice",
"mysql_ts": "2026-03-14 09:42:17",
"seller_logo": "https://apiv2.telecomsxchange.com/profilepics/vendor_87.png"
}
]
}Reply to a seller message
POST/buyers/message/reply/{id}
Replies to a message in your inbox. The reply keeps the original subject, is linked to it through reply_to, stays anonymous when the original was about an anonymous route or DID, and the seller is notified by email. Returns the new message's ID. Free.
message in the form body; it is ignored in the query string. If message is empty, nothing is sent and the response returns the original message with status "success"; check for i_message in the response to confirm a reply was sent. If id is not a message addressed to you, the response is empty.Parameters
idintegerpathRequiredID (
i_message) of the inbox message you are replying to, from List buyer messages.messagestringform fieldRequiredReply text.
Errors
| Message | When |
|---|---|
"error sending customer email" | the notification email cannot be sent; the reply is already saved (plain-text response) |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/message/reply/4821" \
-d message='Thanks, test calls now complete normally.'import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/message/reply/4821",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"message": "Thanks, test calls now complete normally."},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/message/reply/4821");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['message' => "Thanks, test calls now complete normally."]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"message": "Replied",
"i_message": 4830
}Send a message to a seller
POST/buyers/message/send
Starts a conversation with a seller. Address the seller by id, or by i_connection or i_did to write to the owner of a route or number; for anonymous routes and DIDs the seller's identity stays hidden. The seller gets the message in their inbox and by email. Returns the new message's ID. Free.
i_connection or i_did to an anonymous seller, the confirmation names the recipient as "Anonymous Owner of Route <name>" or "Anonymous Owner of DID Number <number>".Parameters
idintegerform fieldOptionalSeller ID (
i_vendor), from List sellers. Required unlessi_connectionori_didis given.i_connectionintegerform fieldOptionalRoute ID: writes to the owner of this route. Used only when
idis not given.i_didintegerform fieldOptionalDID ID: writes to the owner of this number. Used only when
idis not given;i_connectiontakes precedence if both are sent.subjectstringform fieldRequiredMessage subject.
messagestringform fieldRequiredMessage text.
Errors
| Message | When |
|---|---|
"Seller id missing (id=123)" | no id is sent and no seller matches i_connection or i_did |
"Expecting id parameter" | subject or message is empty |
"error sending customer email" | the notification email cannot be sent; the message is already saved (plain-text response) |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/buyers/message/send" \
-d id=87 \
-d i_connection=5531 \
-d i_did=22014 \
-d subject='Low ASR to UK mobile' \
-d message='ASR on your UK Mobile CLI route dropped to 18% since 09:00 UTC. Can you check?'import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/buyers/message/send",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"id": 87, "i_connection": 5531, "i_did": 22014, "subject": "Low ASR to UK mobile", "message": "ASR on your UK Mobile CLI route dropped to 18% since 09:00 UTC. Can you check?"},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/buyers/message/send");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['id' => 87, 'i_connection' => 5531, 'i_did' => 22014, 'subject' => "Low ASR to UK mobile", 'message' => "ASR on your UK Mobile CLI route dropped to 18% since 09:00 UTC. Can you check?"]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"message": "Message 4835 sent successfully to seller NorthwindVoice",
"i_message": 4835
}List seller messages
POST/sellers/messages
Returns one page of your messages with buyers, newest first: the inbox (messages from buyers) or the outbox (messages you sent). Pass id to read a single message; reading an unread inbox message marks it as read. Free.
i_connection or i_did means the buyer wrote to you about that route or number. Outbox rows carry to_login instead of from_login. Only inbox and outbox are accepted for show; any other value returns an error that is not JSON. To answer a message, use Reply to a buyer message.Parameters
showstringform fieldOptionalWhich folder to list.
pagerintegerform fieldOptionalPage size. Values below 1 fall back to 30.
offintegerform fieldOptionalNumber of messages to skip, for paging.
idintegerform fieldOptionalReturn only this message, one you sent or received, as
messageinstead of a list. Marks it read if it is an unread message to you.
Errors
| Message | When |
|---|---|
"Message not found" | id is not a message you sent or received |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/sellers/messages" \
-d show=inbox \
-d pager=30 \
-d off=0 \
-d id=4835import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/sellers/messages",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"show": "inbox", "pager": 30, "off": 0, "id": 4835},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/sellers/messages");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['show' => "inbox", 'pager' => 30, 'off' => 0, 'id' => 4835]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"messages": [
{
"i_message": "4835",
"from_type": "customer",
"to_type": "vendor",
"i_from": "1042",
"i_to": "87",
"ts": "03/14/26 10:05AM",
"status": "unread",
"reply_to": null,
"message_type": "message",
"subject": "Low ASR to UK mobile",
"message": "ASR on your UK Mobile CLI route dropped to 18% since 09:00 UTC. Can you check?",
"additional_data": null,
"i_did": "0",
"i_connection": "5531",
"thread_id": null,
"from_login": "AcmeTelecom",
"buyer_logo": "https://apiv2.telecomsxchange.com/profilepics/customer_1042.png"
}
]
}List my buyers
POST/sellers/buyers/list
Returns the buyers who use your routes (default) or rent your DIDs, 20 per page, each with the routes or numbers they use from you. Use the buyer IDs with Send a message to a buyer. Free.
purchases item starts with a space followed by "Route:" or "DID:".Parameters
show_typestringform fieldOptionalrouteslists buyers of your routes;didslists buyers renting your numbers.login_or_emailstringform fieldOptionalOnly return buyers whose login or email contains this text.
offintegerform fieldOptionalNumber of buyers to skip. Pages hold 20 buyers.
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/sellers/buyers/list" \
-d show_type=routes \
-d login_or_email=acme \
-d off=0import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/sellers/buyers/list",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"show_type": "routes", "login_or_email": "acme", "off": 0},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/sellers/buyers/list");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['show_type' => "routes", 'login_or_email' => "acme", 'off' => 0]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"buyers": [
{
"i_customer": "1042",
"login": "AcmeTelecom",
"purchases": [
" Route:UK Mobile CLI",
" Route:Premium A2P"
]
},
{
"i_customer": "1188",
"login": "GlobexComms",
"purchases": [
" Route:UK Mobile CLI"
]
}
]
}Message my buyers
POST/sellers/buyers/message
Sends the same message to each buyer on one page of List my buyers: up to 20 buyers, chosen with the same show_type, login_or_email and off filters. Each buyer gets it in their inbox and by email. Free.
off to message all of them. On each page, buyers after the first see the subject prefixed with "TCXC Message: " in their inbox.Parameters
subjectstringform fieldRequiredMessage subject.
messagestringform fieldRequiredMessage text.
show_typestringform fieldOptionalMessage buyers of your routes or renters of your DIDs.
login_or_emailstringform fieldOptionalOnly message buyers whose login or email contains this text.
offintegerform fieldOptionalNumber of buyers to skip. Each call messages at most 20 buyers; repeat with off=20, 40,... to reach everyone.
Errors
| Message | When |
|---|---|
"Empty subject or message are not allowed" | subject or message is missing or empty |
"error sending customer email" | a notification email cannot be sent; buyers earlier in the page have already been messaged (plain-text response) |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/sellers/buyers/message" \
-d subject='New coverage: Sudan DIDs' \
-d message='Sudanese mobile DIDs are now available for immediate activation.' \
-d show_type=routes \
-d off=0import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/sellers/buyers/message",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"subject": "New coverage: Sudan DIDs", "message": "Sudanese mobile DIDs are now available for immediate activation.", "show_type": "routes", "off": 0},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/sellers/buyers/message");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['subject' => "New coverage: Sudan DIDs", 'message' => "Sudanese mobile DIDs are now available for immediate activation.", 'show_type' => "routes", 'off' => 0]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"message": "Messages have been sent successfully to buyers list "
}Send a message to a buyer
POST/sellers/message/send
Sends a new message from you as a seller to one of your buyers, identified by buyer ID from List my buyers. The buyer gets it in their inbox and by email. Returns the new message's ID. Free.
subject and message: if either is empty, the response is empty and nothing is sent.Parameters
idintegerform fieldRequiredBuyer ID (
i_customer).subjectstringform fieldRequiredMessage subject.
messagestringform fieldRequiredMessage text.
Errors
| Message | When |
|---|---|
"Buyer id missing (id=123)" | id is missing or 0 |
"error sending customer email" | the notification email cannot be sent; the message is already saved (plain-text response) |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/sellers/message/send" \
-d id=1042 \
-d subject='Maintenance window' \
-d message='Our UK Mobile CLI route will be in maintenance on 20 March, 02:00-03:00 UTC.'import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/sellers/message/send",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"id": 1042, "subject": "Maintenance window", "message": "Our UK Mobile CLI route will be in maintenance on 20 March, 02:00-03:00 UTC."},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/sellers/message/send");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['id' => 1042, 'subject' => "Maintenance window", 'message' => "Our UK Mobile CLI route will be in maintenance on 20 March, 02:00-03:00 UTC."]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"message": "Message 4840 sent successfully to buyer AcmeTelecom",
"i_message": 4840
}Reply to a buyer message
POST/sellers/message/reply/{id}
Replies to a message in your seller inbox. The reply keeps the original subject, is linked through reply_to, stays anonymous when the buyer wrote about an anonymous route or DID, and the buyer is notified by email. Returns the new message's ID. Free.
message in the form body; it is ignored in the query string. If message is empty, nothing is sent and the response returns the original message with status "success"; check for i_message to confirm a reply was sent.Parameters
idintegerpathRequiredID (
i_message) of the inbox message you are replying to, from List seller messages.messagestringform fieldRequiredReply text.
Errors
| Message | When |
|---|---|
"Sorry" | id is not a message addressed to you (plain-text response) |
"error sending customer email" | the notification email cannot be sent; the reply is already saved (plain-text response) |
curl --digest -u "$TCXC_USERNAME:$TCXC_API_KEY" -X POST \
"https://apiv2.telecomsxchange.com/sellers/message/reply/4835" \
-d message='We have rerouted UK mobile traffic; ASR is back above 45%.'import os
import requests
from requests.auth import HTTPDigestAuth
resp = requests.post(
"https://apiv2.telecomsxchange.com/sellers/message/reply/4835",
auth=HTTPDigestAuth(os.environ["TCXC_USERNAME"], os.environ["TCXC_API_KEY"]),
data={"message": "We have rerouted UK mobile traffic; ASR is back above 45%."},
)
print(resp.json())$ch = curl_init("https://apiv2.telecomsxchange.com/sellers/message/reply/4835");
curl_setopt_array($ch, [
CURLOPT_HTTPAUTH => CURLAUTH_DIGEST,
CURLOPT_USERPWD => getenv('TCXC_USERNAME') . ':' . getenv('TCXC_API_KEY'),
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => http_build_query(['message' => "We have rerouted UK mobile traffic; ASR is back above 45%."]),
CURLOPT_RETURNTRANSFER => true,
]);
$response = json_decode(curl_exec($ch), true);{
"status": "success",
"message": "Replied",
"i_message": 4841
}