All URIs are relative to https://api.sendinblue.com/v3
Method | HTTP request | Description |
---|---|---|
create_sms_campaign | POST /smsCampaigns | Creates an SMS campaign |
delete_sms_campaign | DELETE /smsCampaigns/{campaignId} | Delete the SMS campaign |
get_sms_campaign | GET /smsCampaigns/{campaignId} | Get an SMS campaign |
get_sms_campaigns | GET /smsCampaigns | Returns the informations for all your created SMS campaigns |
request_sms_recipient_export | POST /smsCampaigns/{campaignId}/exportRecipients | Exports the recipients of the specified campaign. |
send_sms_campaign_now | POST /smsCampaigns/{campaignId}/sendNow | Send your SMS campaign immediately |
send_sms_report | POST /smsCampaigns/{campaignId}/sendReport | Send report of SMS campaigns |
send_test_sms | POST /smsCampaigns/{campaignId}/sendTest | Send an SMS |
update_sms_campaign | PUT /smsCampaigns/{campaignId} | Updates an SMS campaign |
update_sms_campaign_status | PUT /smsCampaigns/{campaignId}/status | Update the campaign status |
CreateModel create_sms_campaign(create_sms_campaign)
Creates an SMS campaign
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
create_sms_campaign = sib_api_v3_sdk.CreateSmsCampaign() # CreateSmsCampaign | Values to create an SMS Campaign
try:
# Creates an SMS campaign
api_response = api_instance.create_sms_campaign(create_sms_campaign)
pprint(api_response)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->create_sms_campaign: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_sms_campaign | CreateSmsCampaign | Values to create an SMS Campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_sms_campaign(campaign_id)
Delete the SMS campaign
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the SMS campaign
try:
# Delete the SMS campaign
api_instance.delete_sms_campaign(campaign_id)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->delete_sms_campaign: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the SMS campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSmsCampaign get_sms_campaign(campaign_id, get_sms_campaign)
Get an SMS campaign
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the SMS campaign
get_sms_campaign = sib_api_v3_sdk.GetSmsCampaign() # GetSmsCampaign | Values to update an SMS Campaign
try:
# Get an SMS campaign
api_response = api_instance.get_sms_campaign(campaign_id, get_sms_campaign)
pprint(api_response)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->get_sms_campaign: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the SMS campaign | |
get_sms_campaign | GetSmsCampaign | Values to update an SMS Campaign |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetSmsCampaigns get_sms_campaigns(status=status, limit=limit, offset=offset)
Returns the informations for all your created SMS campaigns
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
status = 'status_example' # str | Status of campaign. (optional)
limit = 500 # int | Number limitation for the result returned (optional) (default to 500)
offset = 0 # int | Beginning point in the list to retrieve from. (optional) (default to 0)
try:
# Returns the informations for all your created SMS campaigns
api_response = api_instance.get_sms_campaigns(status=status, limit=limit, offset=offset)
pprint(api_response)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->get_sms_campaigns: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
status | str | Status of campaign. | [optional] |
limit | int | Number limitation for the result returned | [optional] [default to 500] |
offset | int | Beginning point in the list to retrieve from. | [optional] [default to 0] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CreatedProcessId request_sms_recipient_export(campaign_id, recipient_export=recipient_export)
Exports the recipients of the specified campaign.
It returns the background process ID which on completion calls the notify URL that you have set in the input.
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the campaign
recipient_export = sib_api_v3_sdk.RequestSmsRecipientExport() # RequestSmsRecipientExport | Values to send for a recipient export request (optional)
try:
# Exports the recipients of the specified campaign.
api_response = api_instance.request_sms_recipient_export(campaign_id, recipient_export=recipient_export)
pprint(api_response)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->request_sms_recipient_export: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the campaign | |
recipient_export | RequestSmsRecipientExport | Values to send for a recipient export request | [optional] |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_sms_campaign_now(campaign_id)
Send your SMS campaign immediately
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the campaign
try:
# Send your SMS campaign immediately
api_instance.send_sms_campaign_now(campaign_id)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->send_sms_campaign_now: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_sms_report(campaign_id, send_report)
Send report of SMS campaigns
Send report of Sent and Archived campaign, to the specified email addresses, with respective data and a pdf attachment in detail.
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the campaign
send_report = sib_api_v3_sdk.SendReport() # SendReport | Values for send a report
try:
# Send report of SMS campaigns
api_instance.send_sms_report(campaign_id, send_report)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->send_sms_report: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the campaign | |
send_report | SendReport | Values for send a report |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
send_test_sms(campaign_id, send_test_sms)
Send an SMS
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | Id of the SMS campaign
send_test_sms = sib_api_v3_sdk.SendTestSms() # SendTestSms | Mobile number to which send the test
try:
# Send an SMS
api_instance.send_test_sms(campaign_id, send_test_sms)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->send_test_sms: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | Id of the SMS campaign | |
send_test_sms | SendTestSms | Mobile number to which send the test |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_sms_campaign(campaign_id, update_sms_campaign)
Updates an SMS campaign
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the SMS campaign
update_sms_campaign = sib_api_v3_sdk.UpdateSmsCampaign() # UpdateSmsCampaign | Values to update an SMS Campaign
try:
# Updates an SMS campaign
api_instance.update_sms_campaign(campaign_id, update_sms_campaign)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->update_sms_campaign: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the SMS campaign | |
update_sms_campaign | UpdateSmsCampaign | Values to update an SMS Campaign |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_sms_campaign_status(campaign_id, status)
Update the campaign status
from __future__ import print_function
import time
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException
from pprint import pprint
# Configure API key authorization: api-key
configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# create an instance of the API class
api_instance = sib_api_v3_sdk.SMSCampaignsApi(sib_api_v3_sdk.ApiClient(configuration))
campaign_id = 789 # int | id of the campaign
status = sib_api_v3_sdk.UpdateCampaignStatus() # UpdateCampaignStatus | Status of the campaign.
try:
# Update the campaign status
api_instance.update_sms_campaign_status(campaign_id, status)
except ApiException as e:
print("Exception when calling SMSCampaignsApi->update_sms_campaign_status: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
campaign_id | int | id of the campaign | |
status | UpdateCampaignStatus | Status of the campaign. |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]