Get campaign

This method allows you to retrieve a specific campaign.

GET

/campaign/:id

Query Parameters

id
required
The campaign id

Examples


GET /campaign/18969398 HTTP/1.1
Host: api.smsfactor.com
Accept: application/json
Authorization: Bearer your.token
      
    

Result Format


{
    "status": 1,
    "message": "OK",
    "campaign": [
        {
            "id": "18969398",
            "sender": "BESTSHOES",
            "text": "Special offer : Buy one shoe and get the second one for free",
            "creation_date": "2024-05-15 10:41:30",
            "date": "2024-05-15 10:41:30",   //Sending date
            "cost": "2128",                 //The cost of your campaign
            "lists": [                      //The ids of the lists you used to send
                {
                    "id": "12345"
                },
                {
                    "id": "45742"
                }
            ],
            "status": "Sent",
            "delivery_rate": "100",
            "delivered": "1958",
            "error": "0",`                  //Number of SMS in error (from operators)
            "expired": "0",                 //Number of SMS expired (from operators)
            "network_error": "0",           //Number of SMS in error (from operators)
            "stop": "0",                    //Number of stop replies
            "npai": "0"                     //Number of npai numbers
            "total": "1958"                 //Number of message before filtering
        }
    ]
}
          
        

<?xml version="1.0" encoding="UTF-8"?>
<response>
    <status>1</status>
    <message>OK</message>
    <campaign>
        <id>18969398</id>
        <sender>BESTSHOES</sender>
        <text>Special offer : Buy one shoe and get the second one for free</text>
        <creation_date>2024-05-15 10:41:30</creation_date>
        <date>2024-05-15 10:41:30</date>
        <cost>2128</cost>
        <lists>
            <id>12345</id>
        </lists>
        <lists>
            <id>45742</id>
        </lists>
        <delivery_rate>100</delivery_rate>
        <delivered>1958</delivered>
        <error>0</error>
        <expired>0</expired>
        <network_error>0</network_error>
        <stop>0</stop>
        <npai>0</npai>
        <total>1958</total>
    </campaign>
</response>
        
      

Statuses

status Description
Sent The message has been sent.
Waiting The message is waiting to be sent (campaign scheduled in the future).
In progress The message is being sent.
In moderation The message is being moderated. A human action is required to validate or reject (in the case of fraud) the message.
Denied The message was rejected.