- Overview
- Authentication
- Libraries
- Methods
- Contacts
- Import file
- Bulk Import
- Contact import current status
- Contact import history
- Subscriptions
- Attributes
- Lists
- Subscribers
- Subscription forms
- Mails
- Drafts
- Send
- Sent
- Scheduled
- Auto-responder mails
- Templates
- HTML
- Block
- Auto-responders
- Profile
- Address
- Senders
- Reports
- Bounces
- Clicks
- Links
- Opens
- Opens aggregated
- Have not opened
- Most active customers
- Unsubscriptions
- Invoices
- Notifications
Authentication
Our REST API uses a simple token-based HTTP Authentication scheme.
To authenticate, the token key should be included in the Authorization HTTP header. The key should be prefixed by the string literal "Token", with whitespace separating the two strings. For example:
Authorization: Token c564288ed9694309a96761909a12706f
Unauthenticated responses that are denied permission will result in an
HTTP 401
Unauthorized response with an appropriate WWW-Authenticate
header. For example:
WWW-Authenticate: Token
The curl command line tool may be useful for testing token authenticated APIs. For example:
curl -X GET https://api.getanewsletter.com/v3/ -H 'Authorization: Token c564288ed9694309a96761909a12706f'
Obtaining a token
To obtain a token you need to log in to your account, navigate to "Contacts > API & Forms" and then click on the link "Add token". This action will take you to a new page where you can give the token a name and description. This will help you to separate your different tokens if you have more than one. To read more about how to use the token see the section above, "Authentication".
Step-by-step
- Log in to your account
- Navigate to "Contacts > API & Forms"
- Click the link "Add token".
- Enter a name and a description for your token.
- Congratulations, your token has been created!