AWeber Campaigns API
The Campaigns API from AWeber — 5 operations for reading follow-up and broadcast campaigns on a list and their aggregate statistics.
The Campaigns API from AWeber — 5 operations for reading follow-up and broadcast campaigns on a list and their aggregate statistics.
openapi: 3.0.2
info:
title: AWeber Campaigns API
version: '1.0'
description: 'We are constantly working to improve this documentation. If you have
feedback and questions, please contact the AWeber API team at
api@aweber.com.
The AWeber API is a REST API that uses the OAuth 2.0 authentication model. We also offer webhooks.
Please see the below resources for further information:
- <a href="https://labs.aweber.com/docs/tos" target="_blank">Terms of Service</a>
- <a href="https://help.aweber.com/hc/en-us/articles/204031776" target="_blank">Showcasing an Integration</a>
- <a href="https://help.aweber.com/hc/en-us/sections/360000617213-API" target="_blank">Knowledge Base</a>
- <a href="https://status.aweber.com" target="_blank">API Status Page</a>
'
contact:
name: AWeber API Team
email: api@aweber.com
url: https://api.aweber.com/
servers:
- url: https://api.aweber.com/1.0
description: v1 API endpoints
tags:
- name: Campaigns
description: '### What is it?
Represents followup and broadcast messages associated with a list.
**The Campaigns email automation platform within the AWeber web platform is not
currently supported by the AWeber API.**
Use this set of resources to retrieve information and statistics for messages on a list by type
of message (e.g., *followup* or *broadcast*). The collection responses are sorted based on
message type and paginated using `next_collection_link` and `prev_collection_link` properties.
See [How Collections are Represented](#collection-representation) for details on collection
traversal and the individual endpoints for sorting characteristics.
### Related endpoints
* [Campaigns](#tag/Campaigns)
### Related code samples
* [Get Broadcast Statistics](#tag/Get-Broadcast-Statistics)
* [Get Subscribers Who Opened or Clicked a Broadcast](#tag/Get-Subscribers-Who-Opened-or-Clicked-a-Broadcast)
'
security:
- OAuth 2.0: []
paths:
/accounts/{accountId}/lists/{listId}/campaigns:
get:
summary: Get campaigns
description: "The collection of followup (\"f\") or broadcast (\"b\") campaigns for the list. The\
\ collection is ordered with followups messages followed by broadcast messages. The followup\
\ messages are sorted by `id` ascending and the broadcast messages are sorted by `sent_at` descending.\n\
\nCheck out related examples:\n\n * Get Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/postman/Get%20Clicks.postman_collection.json\"\
\ target=\"_blank\">Postman</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Opens and Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-opens-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-opens-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastOpensClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_opens_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-opens-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Statistics (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-stats\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-stats\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastStats\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_stats.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-stats.js\"\
\ target=\"_blank\">Node.js</a> )"
tags:
- Campaigns
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/listId'
- $ref: '#/components/parameters/wsStart'
- $ref: '#/components/parameters/wsSize'
security:
- OAuth 2.0:
- email.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaignss\
\ \\\n -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}'\n"
- lang: Python
source: "headers = {'Accept': 'application/json',\n 'User-Agent': 'AWeber-Python-code-sample/1.0',\n\
\ 'Authorization': f'Bearer {access_token}'}\nurl = (f'https://api.aweber.com/1.0/accounts/{account_id}'\n\
\ f'/lists/{list_id}/campaigns')\nresponse = requests.get(url, headers=headers)\nprint(response.json())\n"
- lang: PHP
source: "$headers = [\n 'User-Agent' => 'AWeber-PHP-code-sample/1.0',\n 'Accept' => 'application/json',\n\
\ 'Authorization' => 'Bearer $token',\n];\n$url = \"https://api.aweber.com/1.0/accounts/{$accountId}/lists/{$listId}/campaigns\"\
;\n$response = $client->get($url, ['headers' => $headers]);\n$body = json_decode($response->getBody(),\
\ true);\nprint_r($body);\n"
- lang: C#
source: 'const string url = "https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns";
var request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.Add("Accept","application/json");
request.Headers.Add("User-Agent","AWeber-CSharp-code-sample/1.0");
request.Headers.Add("Authorization", $"Bearer {Token}");
var response = await Client.SendAsync(request);
Console.Write(response.Content.ReadAsStringAsync());
'
- lang: JavaScript
label: Node.js
source: "const headers = {\n \"Accept\": \"application/json\",\n \"User-Agent\": \"AWeber-Node-code-sample/1.0\"\
,\n \"Authorization\": `Bearer ${accessToken}`\n};\nconst url = `https://api.aweber.com/1.0/accounts/${accountId}/lists/${listId}/campaigns`;\n\
fetch(url, { headers: headers })\n .then(response => response.json())\n .then(data => {\n\
\ console.log(data)\n })\n"
- lang: Ruby
source: "headers = {\n 'Accept': 'application/json',\n 'User-Agent': 'AWeber-Ruby-code-sample/1.0',\n\
\ 'Authorization': \"Bearer #{access_token}\"\n}\nresponse = Faraday.get(\n \"https://api.aweber.com/1.0/accounts/#{account_id}/\"\
\ \\\n \"lists/#{list_id}/campaigns\"\n) do |req|\n req.headers = headers\nend\nputs response.body\n"
responses:
'200':
description: The request completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ListCampaigns'
'400':
$ref: '#/components/responses/CampaignBadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound'
'410':
$ref: '#/components/responses/BlockedError'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
operationId: getCampaigns
/accounts/{accountId}/lists/{listId}/campaigns/{campaignType}{campaignId}:
get:
summary: Get campaign
description: "A followup or broadcast campaign\n\nCheck out related examples:\n\n * Get Clicks\
\ (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/postman/Get%20Clicks.postman_collection.json\"\
\ target=\"_blank\">Postman</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Opens and Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-opens-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-opens-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastOpensClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_opens_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-opens-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Statistics (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-stats\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-stats\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastStats\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_stats.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-stats.js\"\
\ target=\"_blank\">Node.js</a> )"
tags:
- Campaigns
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/listId'
- $ref: '#/components/parameters/campaignType'
- $ref: '#/components/parameters/campaignId'
security:
- OAuth 2.0:
- email.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns/{campaignType}{campaignId}\
\ \\\n -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}'\n"
- lang: Python
source: "headers = {'Accept': 'application/json',\n 'User-Agent': 'AWeber-Python-code-sample/1.0',\n\
\ 'Authorization': f'Bearer {access_token}'}\nurl = (f'https://api.aweber.com/1.0/accounts/{account_id}'\n\
\ f'/lists/{list_id}/campaigns/{campaign_type}{campaign_id}')\nresponse = requests.get(url,\
\ headers=headers)\nprint(response.json())\n"
- lang: PHP
source: "$headers = [\n 'User-Agent' => 'AWeber-PHP-code-sample/1.0',\n 'Accept' => 'application/json',\n\
\ 'Authorization' => 'Bearer $token',\n];\n$url = \"https://api.aweber.com/1.0/accounts/{$accountId}/lists/{$listId}/campaigns/{$campaignType}{$campaignId}\"\
;\n$response = $client->get($url, ['headers' => $headers]);\n$body = json_decode($response->getBody(),\
\ true);\nprint_r($body);\n"
- lang: C#
source: 'const string url = "https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns/{campaignType}{campaignId}";
var request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.Add("Accept","application/json");
request.Headers.Add("User-Agent","AWeber-CSharp-code-sample/1.0");
request.Headers.Add("Authorization", $"Bearer {Token}");
var response = await Client.SendAsync(request);
Console.Write(response.Content.ReadAsStringAsync());
'
- lang: JavaScript
label: Node.js
source: "const headers = {\n \"Accept\": \"application/json\",\n \"User-Agent\": \"AWeber-Node-code-sample/1.0\"\
,\n \"Authorization\": `Bearer ${accessToken}`\n};\nconst url = `https://api.aweber.com/1.0/accounts/${accountId}/lists/${listId}/campaigns/${campaign_type}${campaignId}`;\n\
fetch(url, { headers: headers })\n .then(response => response.json())\n .then(data => {\n\
\ console.log(data)\n })\n"
- lang: Ruby
source: "headers = {\n 'Accept': 'application/json',\n 'User-Agent': 'AWeber-Ruby-code-sample/1.0',\n\
\ 'Authorization': \"Bearer #{access_token}\"\n}\nresponse = Faraday.get(\n \"https://api.aweber.com/1.0/accounts/#{account_id}/\"\
\ \\\n \"lists/#{list_id}/campaigns/#{campaign_type}#{campaign_id}\"\n) do |req|\n req.headers\
\ = headers\nend\nputs response.body\n"
responses:
'200':
description: The request completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Campaign'
'400':
$ref: '#/components/responses/CampaignBadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound'
'410':
$ref: '#/components/responses/BlockedError'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
operationId: getCampaign
/accounts/{accountId}/lists/{listId}/campaigns?ws.op=find:
get:
summary: Find campaigns
description: "Find a collection of either followup(\"f\") or broadcast(\"b\") Campaigns. The collection\
\ is ordered with followups messages followed by broadcast messages. The followup messages are\
\ sorted by `id` ascending and the broadcast messages are sorted by `sent_at` descending.\n\n\
Check out related examples:\n\n * Get Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/postman/Get%20Clicks.postman_collection.json\"\
\ target=\"_blank\">Postman</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Opens and Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-opens-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-opens-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastOpensClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_opens_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-opens-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Statistics (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-stats\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-stats\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastStats\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_stats.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-stats.js\"\
\ target=\"_blank\">Node.js</a> )"
tags:
- Campaigns
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/listId'
- name: ws.op
in: query
requires: true
description: The method name - expecting "find"
schema:
type: string
enum:
- find
- name: campaign_type
in: query
required: true
description: The campaign type (b - broadcast, f - followup)
schema:
type: string
enum:
- b
- f
- $ref: '#/components/parameters/wsStart'
- $ref: '#/components/parameters/wsSize'
- $ref: '#/components/parameters/wsShow'
security:
- OAuth 2.0:
- email.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns\
\ \\\n -d ws.op=find \\\n -d campaign_type=b \\\n -d ws.start=0 \\\n -d ws.size=100 \\\n\
\ -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}'\n"
- lang: Python
source: "headers = {'Accept': 'application/json',\n 'User-Agent': 'AWeber-Python-code-sample/1.0',\n\
\ 'Authorization': f'Bearer {access_token}'}\nurl = (f'https://api.aweber.com/1.0/accounts/{account_id}'\n\
\ f'/lists/{list_id}/campaigns')\nparams = urlencode({\n 'ws.op': 'find',\n 'campaign_type':\
\ 'b',\n 'ws.start': 0,\n 'ws.size': 100,\n})\nfind_url = '{}?{}'.format(url, params)\n\
response = requests.get(find_url, headers=headers)\nprint(response.json())\n"
- lang: PHP
source: "$headers = [\n 'User-Agent' => 'AWeber-PHP-code-sample/1.0',\n 'Accept' => 'application/json',\n\
\ 'Authorization' => 'Bearer $token',\n];\n$url = \"https://api.aweber.com/1.0/accounts/{$accountId}/lists/{$listId}/campaigns\"\
;\n$params = [\n 'ws.op' => 'find',\n 'campaign_type' => 'b',\n 'ws.start' => 0,\n\
\ 'ws.size' => 100,\n];\n$findUrl = $url . '?' . http_build_query($params);\n$response =\
\ $client->get($findUrl, ['headers' => $headers]);\n$body = json_decode($response->getBody(),\
\ true);\nprint_r($body);\n"
- lang: C#
source: "const string url = \"https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns\"\
;\nvar queryParams = new Dictionary<string, string>\n{\n {\"campaign_type\", \"b\"},\n {\"\
ws.op\", \"find\"},\n {\"ws.start\", \"0\"},\n {\"ws.size\", \"100\"}\n};\nvar encodedQueryParams\
\ = string.Join(\"&\", queryParams.Select(\n kvp => string.Format(\"{0}={1}\", kvp.Key, Uri.EscapeDataString(kvp.Value))));\n\
var getUrl = string.Format(\"{0}?{1}\", url, encodedQueryParams);\nvar request = new HttpRequestMessage(HttpMethod.Get,\
\ getUrl);\nrequest.Headers.Add(\"Accept\",\"application/json\");\nrequest.Headers.Add(\"User-Agent\"\
,\"AWeber-CSharp-code-sample/1.0\");\nrequest.Headers.Add(\"Authorization\", $\"Bearer {Token}\"\
);\nvar response = await Client.SendAsync(request);\nConsole.Write(response.Content.ReadAsStringAsync());\n"
- lang: JavaScript
label: Node.js
source: "const headers = {\n \"Accept\": \"application/json\",\n \"User-Agent\": \"AWeber-Node-code-sample/1.0\"\
,\n \"Authorization\": `Bearer ${accessToken}`\n};\nquerystring = require(\"querystring\");\n\
const params = querystring.stringify({\n 'ws.op': 'find',\n 'campaign_type': 'b',\n 'ws.start':\
\ 0,\n 'ws.size': 1,\n});\nconst url = `https://api.aweber.com/1.0/accounts/${accountId}/lists/${listId}/campaigns?${params}`;\n\
fetch(url, { headers: headers })\n .then(response => response.json())\n .then(data => {\n\
\ console.log(data)\n })\n"
- lang: Ruby
source: "headers = {\n 'Accept': 'application/json',\n 'User-Agent': 'AWeber-Ruby-code-sample/1.0',\n\
\ 'Authorization': \"Bearer #{access_token}\"\n}\nparams = {\n 'ws.op': 'find',\n 'campaign_type':\
\ 'b',\n 'ws.start': 0,\n 'ws.size': 100,\n}\nresponse = Faraday.get(\n \"https://api.aweber.com/1.0/accounts/#{account_id}/\"\
\ \\\n \"lists/#{list_id}/campaigns\",\n params\n) do |req|\n req.headers = headers\nend\n\
puts response.body\n"
responses:
'200':
description: The request completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/FindCampaigns'
'400':
$ref: '#/components/responses/SearchBadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound'
'410':
$ref: '#/components/responses/BlockedError'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
operationId: findCampaigns
/accounts/{accountId}/lists/{listId}/campaigns/b{campaignId}/stats:
get:
summary: Get broadcast statistics
description: "A paginated collection of statistics for a broadcast campaign message\nsorted by \"\
statistics ID\"\n\n\nCheck out related examples:\n\n * Get Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/postman/Get%20Clicks.postman_collection.json\"\
\ target=\"_blank\">Postman</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Opens and Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-opens-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-opens-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastOpensClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_opens_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-opens-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Statistics (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-stats\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-stats\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastStats\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_stats.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-stats.js\"\
\ target=\"_blank\">Node.js</a> )\n"
tags:
- Campaigns
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/listId'
- $ref: '#/components/parameters/campaignId'
- $ref: '#/components/parameters/wsStart'
- $ref: '#/components/parameters/wsSize'
security:
- OAuth 2.0:
- email.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns/b{campaignId}/stats\
\ \\\n -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}'\n"
- lang: Python
source: "headers = {'Accept': 'application/json',\n 'User-Agent': 'AWeber-Python-code-sample/1.0',\n\
\ 'Authorization': f'Bearer {access_token}'}\nurl = (f'https://api.aweber.com/1.0/accounts/{account_id}'\n\
\ f'/lists/{list_id}/campaigns/b{campaign_id}/stats')\nresponse = requests.get(url, headers=headers)\n\
print(response.json())\n"
- lang: PHP
source: "$headers = [\n 'User-Agent' => 'AWeber-PHP-code-sample/1.0',\n 'Accept' => 'application/json',\n\
\ 'Authorization' => 'Bearer $token',\n];\n$url = \"https://api.aweber.com/1.0/accounts/{$accountId}/lists/{$listId}/campaigns/b{$campaignId}/stats\"\
;\n$response = $client->get($url, ['headers' => $headers]);\n$body = json_decode($response->getBody(),\
\ true);\nprint_r($body);\n"
- lang: C#
source: 'const string url = "https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns/b{campaignId}/stats";
var request = new HttpRequestMessage(HttpMethod.Get, url);
request.Headers.Add("Accept","application/json");
request.Headers.Add("User-Agent","AWeber-CSharp-code-sample/1.0");
request.Headers.Add("Authorization", $"Bearer {Token}");
var response = await Client.SendAsync(request);
Console.Write(response.Content.ReadAsStringAsync());
'
- lang: JavaScript
label: Node.js
source: "const headers = {\n \"Accept\": \"application/json\",\n \"User-Agent\": \"AWeber-Node-code-sample/1.0\"\
,\n \"Authorization\": `Bearer ${accessToken}`\n};\nconst url = `https://api.aweber.com/1.0/accounts/${accountId}/lists/${listId}/campaigns/b${campaignId}/stats`;\n\
fetch(url, { headers: headers })\n .then(response => response.json())\n .then(data => {\n\
\ console.log(data)\n})\n"
- lang: Ruby
source: "headers = {\n 'Accept': 'application/json',\n 'User-Agent': 'AWeber-Ruby-code-sample/1.0',\n\
\ 'Authorization': \"Bearer #{access_token}\"\n}\nresponse = Faraday.get(\n \"https://api.aweber.com/1.0/accounts/#{account_id}/\"\
\ \\\n \"lists/#{list_id}/campaigns/b#{campaign_id}/stats\",\n) do |req|\n req.headers = headers\n\
end\nputs response.body\n"
responses:
'200':
description: The request completed successfully
content:
application/json:
schema:
$ref: '#/components/schemas/Stats'
type: object
'400':
$ref: '#/components/responses/CampaignBadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'404':
$ref: '#/components/responses/NotFound'
'410':
$ref: '#/components/responses/BlockedError'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
operationId: getBroadcastStatistics
/accounts/{accountId}/lists/{listId}/campaigns/b{campaignId}/stats/{statsId}:
get:
summary: Get broadcast statistic
description: "A statistic for a broadcast campaign message\n\nCheck out related examples:\n\n *\
\ Get Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/postman/Get%20Clicks.postman_collection.json\"\
\ target=\"_blank\">Postman</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Opens and Clicks (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-opens-clicks\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-opens-clicks\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastOpensClicks\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_opens_clicks.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-opens-clicks.js\"\
\ target=\"_blank\">Node.js</a> )\n * Get Broadcast Statistics (\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/python/get-broadcast-stats\"\
\ target=\"_blank\">Python</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/php/get-broadcast-stats\"\
\ target=\"_blank\">PHP</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/csharp/AWeber.Examples.GetBroadcastStats\"\
\ target=\"_blank\">C#.NET</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/ruby/get_broadcast_stats.rb\"\
\ target=\"_blank\">Ruby</a> |\n <a href=\"https://github.com/aweber/public-api-examples/blob/master/node/get-broadcast-stats.js\"\
\ target=\"_blank\">Node.js</a> )"
tags:
- Campaigns
parameters:
- $ref: '#/components/parameters/accountId'
- $ref: '#/components/parameters/listId'
- $ref: '#/components/parameters/campaignId'
- $ref: '#/components/parameters/statsId'
security:
- OAuth 2.0:
- email.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId}/lists/{listId}/campaigns/{campaignType}{campaignId}/stats/{statsId}\
\ \\\n -H 'Authorization: Bearer {YOUR_ACCESS_TOKEN}'\n"
- lang: Python
source: "headers = {'Accept': 'application/json',\n 'User-Agent': 'AWeber-Python-code-sample/1.0',\n\
\ 'Authorization': f'Bearer {access_token}'}\nurl = (f'https://api.aweber.com/1.0/accounts/{account_i
# --- truncated at 32 KB (65 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/aweber/refs/heads/main/openapi/aweber-campaigns-api-openapi.yml