API Documentation

Botamp API is a REST API. The API URLs are based on resources which make them easy to guess. It accepts requests in JSON format and returns responses under the same format. HTTP verbs and response codes are standard.

Authentication

Every request must be authenticated with a valid API key. The response code to unauthenticated requests is 401.

A key can be generated in your account configuration under "Advanced Options". Generated a new key invalidate previously generated keys. A key gives anyone who has access to it same privileges as the account owner. Please dont share your keys with anyone. If you think your key has been accessed by someone who shuldn't have, please generate a new key to disable the old one.

Usage
HTTP HEADERS
Authorization: Bearer <api_key>

Subscribers

Add a subscriber

It's possible to insert a subscriber via the API. If the email in the body of the request is already on Botamp, the subscriber's information will be updated instead. The email address is required and must exist, the other fiels are optional.

Processing is done synchronously, the request returns the code 200 if the required changes have been applied, the code 400 with the error in the response body otherwise.

Exemple
HTTP REQUEST
POST https://www.botamp.com/api/subscribers/create_or_update
Content-Type: application/json; charset=utf-8
Authorization: Bearer <api_key>

{
  "subscriber": {
    "email": "[email protected]",
    "name": "subscriber",
    "job_title": "...",
    "country": "...",
    "address": "...",
    "company_name": "...",
    "website": "...",
    "job_title": "...",
    "postal_code": "...",
    "birthday": "yyyy-mm-dd",
    "tags": ["tag1", "tag2"]
  }
}
HTTP RESPONSE
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Add a batch of subscribers

It's possible to upload a subscribers list via the API. Email addresses are unique. If an email address present in the request body belongs to a subscriber in your Botamp account, their information will be updated. If an email address is duplicated in the request body, only the first one will be considered. Email address is required and must exist. Other fields are optional.

Processing is done asynchronously, with the request returning 200 immediately. You'll receive a report by email when processing is done.

Example
HTTP REQUEST
POST https://www.botamp.com/api/subscribers/create_or_update_many
Content-Type: application/json; charset=utf-8
Authorization: Bearer <api_key>

{
  "subscribers": [
    {
      "email": "[email protected]",
      "name": "subscriber1",
      "job_title": "...",
      "country": "...",
      "address": "...",
      "company_name": "...",
      "website": "...",
      "job_title": "...",
      "postal_code": "...",
      "birthday": "yyyy-mm-dd",
      "tags": ["tag1", "tag2"]
    },
    {
      "email": "[email protected]",
      "name": "subscriber2"
    }
  ]
}
HTTP RESPONSE
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8