Help Docs Developer Resources Proxy API Proxy API

Proxy API Documentation

Use the Proxy API to retrieve available proxy phone numbers and send messages through them directly.

This is a direct way to send SMS/MMS messages, no projects/actions and no contacts are required but we still check for TCR brand dailycap, landlines and time window.

Any available proxy can be used to send. All sent messages are saved in the message log, please use our Messaging API to retrieve.

This API must be enabled by the administrator, please submit a ticket.

Proxy Object


A proxy object represents a single phone number to use for sending messages. A proxy is allocated during TCR campaign provisioning or on demand for Short codes/ Toll free number. It stays with your account until explicitly released or when TCR campaign is expired.

Fields:

  • cid - account ID the proxy belongs to
  • proxy - a 10-digit phone number or 4-6-digit short code number
  • create_time - date when this proxy was allocated
  • update_time - date when this proxy was updated
  • referenceId - an unque ID given during proxy order for tracking purposes
  • campaignId - a TCR campaign this number paired with
  • brandId - a TCR brand
  • status - status of the proxy, indicates readiness for sending
    • ok - the proxy is ready for sending
    • done - the proxy is no longer available
    • pending - the proxy is being provisioned still
    • error - the proxy is in error state
    • failed - provisioning failed, in most cases this is TCR paring or TF verification issue

Get Available Proxies


  • Endpoint: /api/proxy/select
  • Method: GET or POST
  • Description: Retrieves all available proxies for your account.
  • Request Parameters:
    • areacode (String): Return only proxies for this area code.
    • campaignId (String): Return only proxies for given TCR campaigns.
    • brandId (String): Return only proxies for given TCR brands.
    • status (String): Filter by status, if multiple separate by comma
    • referenceId (String): Filter by ID given by proxy create endpoint
  • Response:
    • Success: Returns proxy details in JSON format.
    • Error: Returns an error message.
Example Usage
GET /api/proxy/select
Example Response
{
  "total": 1,
  "count": 1,
  "data: [
    {
      "cid": "c_example123",
      "proxy": "1234567890",
      "create_time": "04/20/2025 10:30AM EST",
      "update_time": "04/20/2025 10:35AM EST",
      "referenceId": "5eb6cfcd4f5647c9983fea0b4b0bed4b",
      "campaignId": "C12345",
      "brandId": "B12345",
      "status": "ok"
    }
  ]
}

Send a Message


  • Endpoint: /api/proxy/send

  • Method: POST

  • Description: Sends a message to a specified contact.

  • Request Body Parameters:

    • phone (Phone, required): Contact phone number (must be valid)
    • proxy (String, required): The outgoing proxy that sends the message
    • text (String, required): Message text
    • flags (List, optional): Additional tags to be applied to the message record.
    • file (String, optional) - Attachment URL to be sent as MMS.
  • Response:

    Success: Returns a log of the message sent. See Messaging API for the log object fields. The message is scheduled for delivery as soon as possible. The status delivery will be updated via webhook from carrier as soon as we receive it.

    Error: Returns an appropriate error message when validation fails in the common format explained in General Overview

  • Specific Errors

    If not marked as retry-able errors returned by this endpoint are final, no messages has been sent and no billing has been done.

    Error codes:

    • 400 - no code
      A general error, the message explains the error condition
    • 400 - code: FIELD
      An input field validation error
    • 400 - code: PROXY
      Sending from the given proxy number is not allowed because it is not available for you or not operational or released, i.e. bad proxy number
    • 400 - code: LANDLINE
      Our system detected the destination phonre as landline, the request is denied, no processing performed
    • 400 - code: DAILYCAP
      TCR brand daily cap reached, no more messages will be sent to this brand today
    • 400 - code: TIMERANGE
      We have a time window when messages are allowed to leave our system, sending outside of this window is not allowed. Common time window is 8am - 10pm local time.
Example Usage
POST /api/message/send
{
  "proxy": "5551234567",
  "phone": "5559998877",
  "text": "Hello STOP to opt out",
  "flags": "send123"
}
Example Response

Successful Response:

{
    "cid": "c_example123",
    "rupid": "5555151505",
    "logid": "rl_693c81daa5bf42d58a390e791d584ed1",
    "logkey": 1736802888010029,
    "action": "125",
    "text": "Hello STOP to opt out",
    "sender": "u.....",
    "sent_time": "04/17/2025 12:15pm EST",
    "phone": "5555151505",
    "flags": [ "sent", "send1234" ],
    "file": "http://host.com/action/c_example123/125.png",
    "proxy": "2028456736",
    "price": -0.14
}

Error Response:

{
    "status": 400,
    "message": "landline detected", 
    "code": "LANDLINE"
}

Order Proxies


  • Endpoint: /api/proxy/create

  • Method: GET or POST

  • Description: Order new proxies proxies for your account.

  • Request Parameters:

    • areacode (String, required): Order proxies in this area code.
    • campaignId (String, required): TCR campaign new proxies will be paired with.
    • count (Number): How many proxies to order, maximum is 10.
  • Response:

    • Success: Order has been submitted. Returns an object with referenceId which can be used to track proxies status.

    • Error: Returns an error message.

  • Notes
    Ordering proxies for a TCR campaign requires several steps and may take some time, all orders are processed in the background.

  • an attempt to find available numbers for given area code is made

  • if no numbers available the proces stops and notifies about failre (TBD)

  • if all or some number of proxies are purchased all are submitted to providers for TCR pairing

  • the TCR campaign ok status becomes PENDING due to paring in progress, still can send using existing proxies

  • once DCA confirmed the campaign status is set to ACTIVE again but some proxies can still be in pending mode

  • use referenceId in /api/proxy/select to check the status of new proxies, be advised that searching proxies by reference id may return no proxies just after ordering, there is a delay when new proxies appear in search results

  • only proxies with status ‘ok’ can be used fir sending

Example Usage
POST /api/proxy/create
{
  "campaignId": "C12345",
  "areacode": "555"
}
Example Response
{
   "referenceId": "5eb6cfcd4f5647c9983fea0b4b0bed4b"
}