📦
Mobivate Bulk API Documentation
  • 👋Welcome to BulkSMS
  • AUTHENTICATION & INTEGRATION
    • Getting started with Integration
      • Creating a New API Key
      • Get API Key
      • Test API Key
    • Registering Webhooks
      • Delivery Receipt Notification
      • Incoming Message Notification
      • Short URL Click Notification
    • Understanding Response Codes
  • USE CASES
    • Send Single SMS Message
      • Understanding SMS Response Codes
    • Send Batch SMS Messages
      • Understanding Batch SMS Response Codes
    • Search Message logs
    • Search for Single Message log
    • List OptOuts
    • Add an OptOut
    • Delete an OptOut
    • Frequently Asked Questions
  • 📚Integrations
    • Integrating Mobivate framework into your own application
    • Automate SMS messages using events through Zapier
    • Asynchronous Number Verification
    • Synchronous Number Verification
    • Adding / Removing Contacts
    • Creating New Contact Group
  • 🔓ARCHIVED DOCS
    • Sending simple Notification messages
    • Sending SMS from 3rd Party Providers
    • Sending Campaigns
Powered by GitBook
On this page

Was this helpful?

  1. USE CASES

List OptOuts

This document will go over how to list all of your OptOut requests.

GET /addressbook/optout

List all of your OptOuts between two set dates.

curl -X GET \
"https://api.mobivatebulksms.com/addressbook/optout?startDate=2023-01-01&endDate=2023-01-02" \
-H 'Authorization: Bearer [API Key]'
import requests

headers = {
    'Authorization': 'Bearer [API Key]',
}

params = {
    'startDate': '2023-01-01',
    'endDate': '2023-01-02',
}

response = requests.get('https://api.mobivatebulksms.com/addressbook/optout', params=params, headers=headers)

Retrieve 100 Optouts between 2023-01-01 00:00:00 (UTC) and 2023-01-02 00:00:00 (UTC).

curl -X GET \
"https://api.mobivatebulksms.com/addressbook/optout?startDate=2023-01-01&endDate=2023-01-02&pageSize=100" \
-H 'Authorization: Bearer [API Key]'
import requests

headers = {
    'Authorization': 'Bearer [API Key]',
}

params = {
    'startDate': '2023-01-01',
    'endDate': '2023-01-02',
    'pageSize': '100',
}

response = requests.get('https://api.mobivatebulksms.com/addressbook/optout', params=params, headers=headers)

Retrieve Opt-Outs between 2023-01-01 12:00:00 (AEST) and 2023-01-02 12:00:00 (AEST).

curl -X GET \
"https://api.mobivatebulksms.com/addressbook/optout?startDate=2023-01-01T12:00:00%2B1200&endDate=2023-01-02T12:00:00%2B1200" \
-H 'Authorization: Bearer [API Key]'
import requests

headers = {
    'Authorization': 'Bearer [API Key]',
}

response = requests.get(
    'https://api.mobivatebulksms.com/addressbook/optout?startDate=2023-01-01T12:00:00%2B1200&endDate=2023-01-02T12:00:00%2B1200',
    headers=headers,
)

Headers

Name
Value

Content-Type

application/json

Authorization

Bearer [Api Key]

Body

Name
Type
Required?
Description

startDate

string

Yes

Start Date Format(s):

  • YYYY-MM-DD

  • YYYY-MM-DDTHH:MM:SS+TZ

Examples:

  • 2023-01-01

  • 2023-01-01T00:00:00+0000

  • 2023-01-01T00:09:00+0900.

endDate

string

Yes

End Date.

Examples: See startDate.

page

integer

No

Page number. Default: 1.

pageSize

integer

No

Number of message records to return. Default: 10 Max: 1000.

Response

[
   {
      "id":1354505990,
      "mobile":"4400111222",
      "note":"MO",
      "created":1672704203000
   }
]
{
   "code":400,
   "message":"startDate: Invalid format: \"2023-01-011\" is malformed at \"1\""
}
{
   "code":401,
   "message":"Unauthorized"
}

We use conventional HTTP response codes to indicate the success or failure of an API request. In general:

2xx indicate success 4xx indicate an error that failed given the information provided (e.g., a required parameter was omitted) 5xx errors indicate an error with ours servers (these are rare).

PreviousSearch for Single Message logNextAdd an OptOut

Last updated 1 month ago

Was this helpful?

To see a full list of our Response codes, please .

click here