Campaigns

GET https://lopbe.com/api/campaigns/
curl --request GET \
--url 'https://lopbe.com/api/campaigns/' \
--header 'Authorization: Bearer {api_key}' \
Parameters Details Description
page Optional Integer The page number that you want results from. Defaults to 1.
results_per_page Optional Integer How many results you want per page. Allowed values are: 10 , 25 , 50 , 100 , 250 , 500 , 1000. Defaults to 25.
{
    "data": [
        {
            "id": 1,
            "rss_automation_id": 0,
            "recurring_campaign_id": 1,
            "device_id": 1,
            "sim_subscription_id": 1,
            "user_id": 1,
            "name": "Example",
            "content": "Sample message",
            "segment": "all",
            "settings": {
                "is_scheduled": 0,
            },
            "contacts_ids": [
                1,2,3,4,5
            ],
            "sent_contacts_ids": [],
            "total_sent_sms": 0,
            "total_pending_sms": 1,
            "total_failed_sms": 0,
            "status": "draft",
            "scheduled_datetime": "2025-10-01 11:42:40",
            "last_sent_datetime": null,
            "last_datetime": null,
            "datetime": "2025-10-01 11:42:40",
        }
    ],
    "meta": {
        "page": 1,
        "results_per_page": 25,
        "total": 1,
        "total_pages": 1
    },
    "links": {
        "first": "https://lopbe.com/api/campaigns?page=1",
        "last": "https://lopbe.com/api/campaigns?page=1",
        "next": null,
        "prev": null,
        "self": "https://lopbe.com/api/campaigns?page=1"
    }
}
GET https://lopbe.com/api/campaigns/{campaign_id}
curl --request GET \
--url 'https://lopbe.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
{
    "data": {
        "id": 1,
        "rss_automation_id": 0,
        "recurring_campaign_id": 1,
        "device_id": 1,
        "sim_subscription_id": 1,
        "user_id": 1,
        "name": "Example",
        "content": "Sample message",
        "segment": "all",
        "settings": {
            "is_scheduled": 0,
        },
        "contacts_ids": [
            1,2,3,4,5
        ],
        "sent_contacts_ids": [],
        "total_sent_sms": 0,
        "total_pending_sms": 1,
        "total_failed_sms": 0,
        "status": "draft",
        "scheduled_datetime": "2025-10-01 11:42:40",
        "last_sent_datetime": null,
        "last_datetime": null,
        "datetime": "2025-10-01 11:42:40",
    }
}
POST https://lopbe.com/api/campaigns
Parameters Details Description
name Required String -
content Required String -
device_id Required Integer -
sim_subscription_id Required Integer -
is_scheduled Optional Boolean -
scheduled_datetime Optional String -
segment Optional String Allowed values: all , bulk , custom , filter , INT segment_id
phone_numbers Optional String Available when: segment = bulk
contacts_ids Optional String Available when: segment = custom
filters_custom_parameter_key[index] Optional String Available when: segment = filter
filters_custom_parameter_condition[index] Optional String Allowed values: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Available when: segment = filter
filters_custom_parameter_value[index] Optional String Available when: segment = filter
filters_countries[] Optional String Available when: segment = filter
filters_continents[] Optional String Available when: segment = filter
save Optional Boolean Save draft
send Optional Boolean Send campaign
curl --request POST \
--url 'https://lopbe.com/api/campaigns' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
{
    "data": {
        "id": 1
    }
}
POST https://lopbe.com/api/campaigns/{campaign_id}
Parameters Details Description
name Optional String -
content Optional String -
device_id Optional Integer -
sim_subscription_id Optional Integer -
is_scheduled Optional Boolean -
scheduled_datetime Optional String -
segment Optional String Allowed values: all , bulk , custom , filter , INT segment_id
phone_numbers Optional String Available when: segment = bulk
contacts_ids Optional String Available when: segment = custom
filters_custom_parameter_key[index] Optional String Available when: segment = filter
filters_custom_parameter_condition[index] Optional String Allowed values: exact, not_exact, contains, not_contains, starts_with, not_starts_with, ends_with, not_ends_with, bigger_than, lower_than Available when: segment = filter
filters_custom_parameter_value[index] Optional String Available when: segment = filter
filters_custom_parameter_value[index] Optional String Available when: segment = filter
filters_countries[] Optional String Available when: segment = filter
filters_continents[] Optional String Available when: segment = filter
save Optional Boolean Save draft
send Optional Boolean Send campaign
curl --request POST \
--url 'https://lopbe.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \
--header 'Content-Type: multipart/form-data' \
--form 'name=Example name' \
--form 'content=Hello world' \
--form 'device_id=1' \
--form 'sim_subscription_id=1' \
--form 'segment=all' \
{
    "data": {
        "id": 1
    }
}
DELETE https://lopbe.com/api/campaigns/{campaign_id}
curl --request DELETE \
--url 'https://lopbe.com/api/campaigns/{campaign_id}' \
--header 'Authorization: Bearer {api_key}' \