openapi: 3.0.2
info:
title: AWeber Accounts 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: Accounts
description: '### What is it?
Represents AWeber Customer Accounts that have authorized your application.
The Account collection contains a single account entry for the AWeber Customer Account
that has authorized your application. You can use the links in the Account entry to
retrieve the lists owned by the account as well as the social integrations associated
with the account.
### Related endpoints
* [Accounts](#tag/Accounts)
### Related code samples
* [Find a list on an account](#tag/Find-a-List-and-Get-Tags)
* [Get Integrations List](#tag/Get-Integrations-List)
'
security:
- OAuth 2.0: []
paths:
/accounts:
get:
summary: Get accounts
description: 'This endpoint is used to get a paginated collection of accounts.
Check out examples for <a href="https://github.com/aweber/public-api-examples/tree/master/python"
target="_blank">Python</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/php" target="_blank">PHP</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/postman" target="_blank">Postman</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/csharp" target="_blank">C#.NET</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/ruby" target="_blank">Ruby</a>,
and <a href="https://github.com/aweber/public-api-examples/blob/master/node" target="_blank">Node.js</a>.
'
tags:
- Accounts
parameters:
- $ref: '#/components/parameters/wsStart'
- $ref: '#/components/parameters/wsSize'
security:
- OAuth 2.0:
- account.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts \\\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 = 'https://api.aweber.com/1.0/accounts'\n\
response = 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';\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";
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\"\
;\nfetch(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\"\
\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/Accounts'
'400':
description: The server cannot or will not process the request due to a client error
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
One of the following errors may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| WebServiceError | `ws.start` or `ws.size` values are invalid |
| BadRequestError | Error decoding query parameters |
| MissingOAuthParametersError | An OAuth parameter is missing in the request |
| UnsupportedOAuthVersionError | Unsupported OAuth 1 version |
| UnsupportedOAuthSignatureMethodError | Unsupported OAuth 1 signature method |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#badrequest
message:
description: A human friendly description of the error
type: string
example: Maximum for "ws.size" parameter is 100.
status:
description: The HTTP status code
type: integer
example: 400
type:
description: The API error type
type: string
example: WebServiceError
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbiddenError'
'410':
$ref: '#/components/responses/BlockedError'
'500':
$ref: '#/components/responses/InternalServerError'
'503':
$ref: '#/components/responses/ServiceUnavailable'
operationId: getAccounts
/accounts/{accountId}:
get:
summary: Get account
description: 'This endpoint is used to retrieve information for a specific account.
Check out examples for <a href="https://github.com/aweber/public-api-examples/tree/master/python"
target="_blank">Python</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/php" target="_blank">PHP</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/postman" target="_blank">Postman</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/csharp" target="_blank">C#.NET</a>,
<a href="https://github.com/aweber/public-api-examples/tree/master/ruby" target="_blank">Ruby</a>,
and <a href="https://github.com/aweber/public-api-examples/blob/master/node" target="_blank">Node.js</a>.
'
tags:
- Accounts
parameters:
- $ref: '#/components/parameters/accountId'
security:
- OAuth 2.0:
- account.read
x-code-samples:
- lang: Shell
source: "curl -G \\\n https://api.aweber.com/1.0/accounts/{accountId} \\\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\
response = 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}\"\
;\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}";
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}`;\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) 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/Account'
'400':
$ref: '#/components/responses/BadOAuth1'
'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: getAccount
components:
parameters:
accountId:
name: accountId
in: path
description: The account ID
required: true
schema:
type: integer
format: int32
wsSize:
name: ws.size
in: query
description: The pagination total entries to retrieve
schema:
type: integer
format: int32
minimum: 1
maximum: 100
default: 100
wsStart:
name: ws.start
in: query
description: The pagination starting offset
schema:
type: integer
format: int32
minimum: 0
default: 0
responses:
BadOAuth1:
description: The server cannot or will not process the request due to a client error
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
One of the following errors may be received:
| Error Type | Explanation |
|--------------------------------------|------------------------------------------|
| BadRequestError | There was an error decoding query parameters
|
| MissingOAuthParametersError | An OAuth parameter is missing in the request
|
| UnsupportedOAuthSignatureMethodError | The provided OAuth 1 signature method is unsupported.
Only HMAC-SHA1 is supported. |
| UnsupportedOAuthVersionError | The provided OAuth 1 version is unsupported.
|
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#badrequest
message:
description: A human friendly description of the error
type: string
example: 'Missing oauth parameters: oauth_consumer_key'
status:
description: The HTTP status code
type: integer
enum:
- 400
type:
description: The API error type
type: string
enum:
- MissingOAuthParametersError
BlockedError:
description: The request has been blocked
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
The following error may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| BlockedError | This Request has been blocked |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com/#blocked
message:
description: A human friendly description of the error
type: string
example: Blocked Error
status:
description: The HTTP status code
type: integer
enum:
- 410
type:
description: The API error type
type: string
enum:
- BlockedError
ForbiddenError:
description: The request could not be completed due to a rate limit error
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
The following error may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| ForbiddenError | Rate limit may be reached or account may be suspended |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#forbidden
message:
description: A human friendly description of the error
type: string
example: Rate Limit Error
status:
description: The HTTP status code
type: integer
enum:
- 403
type:
description: The API error type
type: string
enum:
- ForbiddenError
InternalServerError:
description: The request failed due to an internal error in the code or because of an external dependency
failure
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
The following error may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| InternalServerError | The request failed due to an internal error |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#internalerror
message:
description: A human friendly description of the error
type: string
example: Something went wrong.
status:
description: The HTTP status code
type: integer
enum:
- 500
type:
description: The API error type
type: string
enum:
- InternalServerError
NotFound:
description: The requested resource could not be found
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
The following error may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| NotFoundError | The requested resource could not be found |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#notfound
message:
description: A human friendly description of the error
type: string
example: 'Object: None, name: '''''
status:
description: The HTTP status code
type: integer
enum:
- 404
type:
description: The API error type
type: string
enum:
- NotFoundError
ServiceUnavailable:
description: The server is currently unavailable
content:
application/json:
schema:
type: object
properties:
error:
description: 'An error object.
The following error may be received:
| Error Type | Explanation |
|----------------------|------------------------------------------|
| ServiceUnavailableError | The server is unavailable |
Please see the message body for more details.
'
type: object
properties:
documentation_url:
description: A link to the documentation that describes the error
type: string
example: https://api.aweber.com#serviceunavailable
message:
description: A human friendly description of the error
type: string
example: Failed to communicate with endpoint
status:
description: The HTTP status code
type: integer
enum:
- 503
type:
description: The API error type
type: string
enum:
- ServiceUnavailableError
UnauthorizedError:
description: The request could not be completed due to an authentication error
content:
application/json:
schema:
oneOf:
- $ref: '#/schemas/Endpoint Error'
- $ref: '#/schemas/Auth Error'
schemas:
Account:
type: object
properties:
analytics_src:
description: Analytics source for event tracking Javascript.
type: uri
example: //analytics.aweber.com/js/awt_analytics.js?id=123
http_etag:
description: The ETag HTTP header
type: string
example: \"902ba3cda1883801594b6e1b452790cc53948fda-f83cb0ac22a8d5f792417f9b3dc0e9dc7558aa32\"
id:
description: The unique ID for the account
type: integer
example: 123
integrations_collection_link:
description: The link to the [3rd party service Integrations](#tag/Integrations/paths/~1accounts~1{accountId}~1integrations/get)
type: string
format: uri
example: https://api.aweber.com/1.0/accounts/123/integrations
lists_collection_link:
description: The link to the [Lists for the account](#tag/Lists/paths/~1accounts~1{accountId}~1lists/get)
type: string
format: uri
example: https://api.aweber.com/1.0/accounts/123/lists
resource_type_link:
description: The link to the account type
type: string
format: uri
example: https://api.aweber.com/1.0/#account
self_link:
description: The link to the account resource
type: string
format: uri
example: https://api.aweber.com/1.0/accounts/123
uuid:
description: The UUID (universally unique identifier) for the account
type: string
format: uuid
example: b619e767-9de6-43b7-a914-9a8d77a08ee5
company:
description: Company Name associated with the account
type: string
example: Example Company 1
Accounts:
type: object
properties:
entries:
description: A list of account entries
type: array
items:
$ref: '#/definitions/Account'
next_collection_link:
description: A link to the next page of entries if more entries exist. This attribute is omitted
from the collection if there are no more entries.
type: string
format: uri
example: https://api.aweber.com/1.0/accounts/123/lists/456/custom_fields?ws.start=0&ws.size=10
prev_collection_link:
description: A link to the previous page of entries if any exist. This attribute is omitted
from the collection if ws.start is 0.
type: string
format: uri
example: https://api.aweber.com/1.0/accounts/123/lists/456/custom_fields?ws.start=0
resource_type_link:
description: A link that identifies the type of resource that this collection represents
type: string
format: uri
example: https://api.aweber.com/1.0/#account
start:
description: The starting offset for the page of entries to retrieve
type: integer
minimum: 0
total_size:
description: The total number of entries
type: integer
minimum: 0
example: 100
securitySchemes:
OAuth 2.0:
description: 'The following endpoints and scopes are used to authenticate.
'
type: oauth2
flows:
authorizationCode:
authorizationUrl: https://auth.aweber.com/oauth2/authorize
tokenUrl: https://auth.aweber.com/oauth2/token
refreshUrl: https://auth.aweber.com/oauth2/token
scopes:
account.read: '<br>
Access account information and associated integrations. <br>
<b>Required for the following endpoints:</b> get accounts, get account, get integrations,
get integration
'
landing-page.read: '<br>
Retrieve landing pages <br>
<b>Required for the following endpoints:</b> get landing pages, get landing page
'
list.read: '<br>
Retrieve lists, custom fields, tags, and sign up forms <br>
<b>Required for the following endpoints:</b> get list, get lists, find lists, get tags for
list, get custom fields, get custom field, get webforms for list, get split tests for list,
get split test components, get split test component, get webforms for account, get split
tests for account
'
list.write: '<br>
Create, edit, and delete custom fields <br>
<b>Required for the following endpoints:</b> add custom field, update custom field, delete
custom field
'
subscriber.read: '<br>
Retrieve subscribers and their activity <br>
<b>Required for the following endpoints:</b> get subscribers, get subscriber, get subscriber
activity, get subscribers for message, find subscribers for account, find subscribers for
list
'
subscriber.write: '<br>
Create, edit, delete, retrieve, search for, and move subscribers <br>
<b>Required for the following endpoints:</b> add subscriber, move subscriber, update subscriber,
delete subscriber
'
subscriber.read-extended: '<br>
Previously required to retrieve subscriber PII such as name, email, IP address, etc. This
functionality was moved to the "subscriber.read" scope
'
email.read: '<br>
Retrieve email activity related to broadcasts and follow-ups <br>
<b>Required for the following endpoints:</b> get messages, get message, get broadcasts,
get broadcast, get message opens, get message open, get message tracked events, get message
tracked event, get total broadcasts, get campaigns, get campaign, find campaigns, get broadcast
statistics, get broadcast statistic
'
email.write: '<br>
Create and send email broadcasts <br>
<b>Required for the following endpoints:</b> create broadcast, update broadcast, delete
broadcast, cancel broadcast, schedule broadcast
'