Campaign Manager v1.0.1
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Base URLs:
Email: The Optus SMS Suite API Support Web: The Optus SMS Suite API Support
Authentication
- HTTP Authentication, scheme: basic
Default
deleteMultList
Code samples
# You can also use wget
curl -X POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists HTTP/1.1
Host: api.sms.optus.com.au
Content-Type: application/json
Accept: application/json
const inputBody = '{
"list_ids": [
0
]
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"list_ids": [
0
]
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/delete_multiple_lists', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /{application_name}/delete_multiple_lists
Delete multiple lists
Body parameter
{
"list_ids": [
0
]
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
body | body | DeleteMultipleListsRequest | true | none |
Example responses
200 Response
{
"list_ids": [
0
],
"message": "IDs of deleted lists"
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Some/all lists were deleted | Inline |
default | Default | 500 Internal Server Error | string |
Response Schema
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» list_ids | [integer] | false | none | The IDs of lists that were deleted |
» message | string | false | none | none |
getLists
Code samples
# You can also use wget
curl -X GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists \
-H 'Accept: application/json'
GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists HTTP/1.1
Host: api.sms.optus.com.au
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /{application_name}/lists
Gets all active lists
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
Example responses
200 Response
[
{
"created": "2019-08-24T14:15:22Z",
"id": 0,
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Lists returned | ListGetResponse |
default | Default | Default Error Response | DefaultError |
createList
Code samples
# You can also use wget
curl -X POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists HTTP/1.1
Host: api.sms.optus.com.au
Content-Type: application/json
Accept: application/json
const inputBody = '{
"batch": "string",
"email": "user@example.com",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"remove_opt_outs": true,
"strict_validation": true
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"batch": "string",
"email": "user@example.com",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"remove_opt_outs": true,
"strict_validation": true
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /{application_name}/lists
Creates a list
Body parameter
{
"batch": "string",
"email": "user@example.com",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"remove_opt_outs": true,
"strict_validation": true
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
body | body | ListRequest | true | none |
Example responses
201 Response
{
"error_messages": "string",
"id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | List Created | ListCreateResponse |
default | Default | Default Error Response | DefaultError |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL of the new List |
deleteList
Code samples
# You can also use wget
curl -X DELETE https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id} \
-H 'Accept: application/json'
DELETE https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id} HTTP/1.1
Host: api.sms.optus.com.au
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}',
{
method: 'DELETE',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.delete 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.delete('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("DELETE", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('DELETE','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/lists/{list_id}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
DELETE /{application_name}/lists/{list_id}
Delete a list
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
list_id | path | integer | true | none |
Example responses
default Response
"error: List cannot be deleted"
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
204 | No Content | List deleted | None |
default | Default | 500 Internal Server Error | string |
scheduleCampaign
Code samples
# You can also use wget
curl -X POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
POST https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns HTTP/1.1
Host: api.sms.optus.com.au
Content-Type: application/json
Accept: application/json
const inputBody = '{
"batch": "string",
"content": "string",
"email": "user@example.com",
"mask": "string",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"opt_out_response": "string",
"remove_opt_outs": true,
"reply_response": "string",
"schedule": "2019-08-24T14:15:22Z",
"strict_validation": true,
"template": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const inputBody = {
"batch": "string",
"content": "string",
"email": "user@example.com",
"mask": "string",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"opt_out_response": "string",
"remove_opt_outs": true,
"reply_response": "string",
"schedule": "2019-08-24T14:15:22Z",
"strict_validation": true,
"template": "string"
};
const headers = {
'Content-Type':'application/json',
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns',
{
method: 'POST',
body: JSON.stringify(inputBody),
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json'
}
result = RestClient.post 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
r = requests.post('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/scheduled_campaigns', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
POST /{application_name}/scheduled_campaigns
Body parameter
{
"batch": "string",
"content": "string",
"email": "user@example.com",
"mask": "string",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"opt_out_response": "string",
"remove_opt_outs": true,
"reply_response": "string",
"schedule": "2019-08-24T14:15:22Z",
"strict_validation": true,
"template": "string"
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
body | body | ScheduleCampaignRequest | true | none |
Example responses
201 Response
{
"error_messages": "string",
"id": 0
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Campaign Created | ScheduleCampaignResponse |
default | Default | Default Error Response | DefaultError |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | Location | string | URL of the new Campaign |
getTemplates
Code samples
# You can also use wget
curl -X GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates \
-H 'Accept: application/json'
GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates HTTP/1.1
Host: api.sms.optus.com.au
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/templates', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /{application_name}/templates
Gets all templates
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
Example responses
200 Response
[
{
"id": 0,
"name": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Templates returned | TemplateGetResponse |
default | Default | Default Error Response | DefaultError |
getReport
Code samples
# You can also use wget
curl -X GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report \
-H 'Accept: application/json'
GET https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report HTTP/1.1
Host: api.sms.optus.com.au
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
const fetch = require('node-fetch');
const headers = {
'Accept':'application/json'
};
fetch('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report', headers = headers)
print(r.json())
URL obj = new URL("https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','https://api.sms.optus.com.au/rest/campaign_manager/v1/{application_name}/{campaign_id}/report', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
GET /{application_name}/{campaign_id}/report
Get status report of campaign
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
application_name | path | string | true | none |
campaign_id | path | integer | true | none |
Example responses
200 Response
[
{
"list_name": "string",
"message_id": 0,
"mobile": "string",
"sent_date": "string",
"status": "string",
"status_date": "string",
"timezone": "string"
}
]
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Report status returned | CampaignReport |
default | Default | Default Error Response | DefaultError |
Schemas
CampaignReport
[
{
"list_name": "string",
"message_id": 0,
"mobile": "string",
"sent_date": "string",
"status": "string",
"status_date": "string",
"timezone": "string"
}
]
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list_name | string | false | none | none |
message_id | integer(int64) | false | none | none |
mobile | string | false | none | none |
sent_date | string | false | none | none |
status | string | false | none | none |
status_date | string | false | none | none |
timezone | string | false | none | none |
DefaultError
{
"code": 0,
"message": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
code | integer | false | none | none |
message | string | false | none | none |
DeleteMultipleListsRequest
{
"list_ids": [
0
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
list_ids | [integer] | true | none | none |
ListCreateResponse
{
"error_messages": "string",
"id": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error_messages | string | false | read-only | none |
id | integer | true | read-only | none |
ListGetResponse
[
{
"created": "2019-08-24T14:15:22Z",
"id": 0,
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string"
}
]
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
created | string(date-time) | false | none | none |
id | integer | false | none | none |
members | [Member] | false | none | none |
name | string | false | none | none |
ListRequest
{
"batch": "string",
"email": "user@example.com",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"remove_opt_outs": true,
"strict_validation": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
batch | string | false | none | none |
string(email) | false | none | none | |
members | [Member] | true | none | none |
name | string | true | none | none |
remove_opt_outs | boolean | false | none | none |
strict_validation | boolean | false | none | none |
Member
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
destination | string | true | none | none |
param1 | string | false | none | none |
param2 | string | false | none | none |
param3 | string | false | none | none |
param4 | string | false | none | none |
param5 | string | false | none | none |
param6 | string | false | none | none |
ScheduleCampaignRequest
{
"batch": "string",
"content": "string",
"email": "user@example.com",
"mask": "string",
"members": [
{
"destination": "string",
"param1": "string",
"param2": "string",
"param3": "string",
"param4": "string",
"param5": "string",
"param6": "string"
}
],
"name": "string",
"opt_out_response": "string",
"remove_opt_outs": true,
"reply_response": "string",
"schedule": "2019-08-24T14:15:22Z",
"strict_validation": true,
"template": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
batch | string | false | none | none |
content | string | false | none | none |
string(email) | false | none | none | |
mask | string | false | none | none |
members | [Member] | true | none | none |
name | string | true | none | none |
opt_out_response | string | false | none | none |
remove_opt_outs | boolean | false | none | none |
reply_response | string | false | none | none |
schedule | string(date-time) | true | none | none |
strict_validation | boolean | false | none | none |
template | string | false | none | none |
ScheduleCampaignResponse
{
"error_messages": "string",
"id": 0
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
error_messages | string | false | read-only | none |
id | integer | true | read-only | none |
TemplateGetResponse
[
{
"id": 0,
"name": "string"
}
]
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | integer | false | none | none |
name | string | false | none | none |