diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..196c70e --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.DS_Store +.buildinfo +.idea + +*.swp +*.swo + diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..31ca9ad --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +api.myemma.com diff --git a/README.md b/README.md index 86f16e3..2741196 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ emma-api-documentation ====================== -Comprehensive documentation on Emma's public API can be found on the 'gh-pages' branch of this repository or at http://api.myemma.com/. +Comprehensive documentation on Emma's public API can be found on the 'gh-pages' branch of this repository or at https://api.myemma.com/. diff --git a/_images/api_key.png b/_images/api_key.png new file mode 100644 index 0000000..fc81ce1 Binary files /dev/null and b/_images/api_key.png differ diff --git a/_sources/api/external/fields.txt b/_sources/api/external/fields.txt new file mode 100644 index 0000000..f948670 --- /dev/null +++ b/_sources/api/external/fields.txt @@ -0,0 +1,12 @@ +Fields +====== + +These endpoints let you create, edit, update and delete all of the custom +fields in your account. Of particular interest is the +``/#account_id/fields/#field_id/clear`` endpoint which lets you clear out +all the data in a single field for all members in your account. This makes +it easy to re-initialize a dataset if you're looking to correct an import +error or syncing issue. + +.. autoemma:: audience.api.controllers.fields:FieldController + diff --git a/_sources/api/external/groups.txt b/_sources/api/external/groups.txt new file mode 100644 index 0000000..f8ed4c7 --- /dev/null +++ b/_sources/api/external/groups.txt @@ -0,0 +1,12 @@ +Groups +====== + +With these endpoints, you can manage all aspects of the groups in +your account. In addition to various CRUD methods, you can also +use these endpoints to manage the members of your groups. You'll +want to use these methods if you're managing group membership for +more than one member at a time. For dealing with single members, +there are better methods in the ``members`` endpoints. + +.. autoemma:: audience.api.controllers.groups:MemberGroupController + diff --git a/_sources/api/external/mailings.txt b/_sources/api/external/mailings.txt new file mode 100644 index 0000000..d494a3c --- /dev/null +++ b/_sources/api/external/mailings.txt @@ -0,0 +1,9 @@ +Mailings +======== + +With these endpoints, you can get information about your mailings including +their HTML contents. You can retrieve the members to whom the mailing was sent. +You can also pause mailings and cancel mailings that are pending or paused. + +.. autoemma:: audience.api.controllers.mailings:MailingController + diff --git a/_sources/api/external/members.txt b/_sources/api/external/members.txt new file mode 100644 index 0000000..d3c3b17 --- /dev/null +++ b/_sources/api/external/members.txt @@ -0,0 +1,19 @@ +Members +======= + +In addition to the various CRUD endpoints here related to members, +you can also change the status of members, including opting them out. + +You'll notice that there are calls related to individual members, but +we also provide quite a few calls to deal with bulk updates of members. +Please try to use these whenever possible as opposed to looping through +a list of members and calling the individual member calls. + +Where this is especially important is when adding new members. To do a bulk +import, you'll POST to the ``/#account_id/members`` endpoint. In return, +you'll receive an import ID. You can use this ID to check the status and +results of your import. Imports are generally pretty fast, but the time +to completion can vary with greater system usage. + +.. autoemma:: audience.api.controllers.members:MemberController + diff --git a/_sources/api/external/response.txt b/_sources/api/external/response.txt new file mode 100644 index 0000000..cba2d42 --- /dev/null +++ b/_sources/api/external/response.txt @@ -0,0 +1,11 @@ +Response +======== + +We know that you want to do some fancy pivot tables with your response +data, so we've provided quite a few endpoints here to give you access +to that response data. You can get overview numbers for all of your mailings +and also drill down into finding out the actual members who opened a particular +mailing. + +.. autoemma:: audience.api.controllers.response:ResponseController + diff --git a/_sources/api/external/searches.txt b/_sources/api/external/searches.txt new file mode 100644 index 0000000..f8cc569 --- /dev/null +++ b/_sources/api/external/searches.txt @@ -0,0 +1,9 @@ +Searches +======== + +These endpoints allow you to create, edit, and delete searches. You can also +retrieve the members matching any search created in your account. You can +:doc:`get more details on how to construct searches <../../member_search>`. + +.. autoemma:: audience.api.controllers.searches:SearchController + diff --git a/_sources/api/external/triggers.txt b/_sources/api/external/triggers.txt new file mode 100644 index 0000000..e1d8538 --- /dev/null +++ b/_sources/api/external/triggers.txt @@ -0,0 +1,8 @@ +Triggers +======== + +These endpoints provide CRUD operations for our trigger system. Creating a +trigger is probably the most widely used of these operations. + +.. autoemma:: audience.api.controllers.triggers:TriggerController + diff --git a/_sources/api/external/webhooks.txt b/_sources/api/external/webhooks.txt new file mode 100644 index 0000000..d4f6531 --- /dev/null +++ b/_sources/api/external/webhooks.txt @@ -0,0 +1,10 @@ +Webhooks +======== + +You can manage your webhooks with these endpoints. Of particular interest +might be the ``GET /#account_id/webhooks/events`` endpoint which lets you +know which events our system can send out webhooks for. You can :doc:`get more +info about how our webhooks work <../../webhooks>`. + +.. autoemma:: audience.api.controllers.webhooks:WebhookController + diff --git a/_sources/index.txt b/_sources/index.txt new file mode 100644 index 0000000..58d2e79 --- /dev/null +++ b/_sources/index.txt @@ -0,0 +1,182 @@ +Emma API +======== + +A Word To The Wise... +--------------------- + +Use the documentation here to set up and troubleshoot your API calls. We don't offer one-on-one support +for Emma's public API, but our system is monitored around the clock. If there's ever a dropped connection +or outage, we'll notify users on our `status page `_. + +Overview +-------- + +Emma's platform is accessible through our public API. The API provides access +to the following areas: + +* Managing member lists + * importing, editing, deleting + * organizing members into groups + * searching for members +* Mailings + * viewing past mailings + * controlling the status of pending mailings +* Retrieving response + * Access mailing response information by mailing, member of time period + * Access response at summary and detail levels + +API Wrappers +------------ + +Emma's wrappers make it easy to connect to our API in the programming language you're working in. Just select your language to integrate with Emma without having to study all the ins and outs of our API first. + +This collection is young, but growing, and includes wrappers commissioned by Emma, as well as those built by members of our community. Unless otherwise noted, all wrappers provide full coverage of our current API. If you see something that needs to be fixed or improved, please don't hesitate to fork the repo and submit a pull request. And if you've built a wrapper that you would like listed here, `let us know! `_ + +**PHP** + `EmmaPHP `_ : Commissioned by Emma and built by Nashville developer `Dennis Monsewicz `_. + + `OhMyEmma `_: Built by Nashville developer `Jacques Woodcock `_. + + `Emma `_: Built by Nashville-based `Abenity, Inc `_. + +**Python** + `EmmaPython `_: Built by Emma's own `Doug Hurst `_. + +**Ruby** + `EmmaRuby `_: Commissioned by Emma and built by Nashville developer `Dennis Monsewicz `_. + +**Objective-C** + `EmmaSDK `_: Commissioned by Emma and built by Portland developer `Benjamin Van Der Veen `_. + +Quickstart +---------- + +Let's start by building some PHP code that will add a member to our audience. + +First, you'll want to figure out how to authenticate. All calls require HTTP +Basic Auth authentication. Inside your Emma account, in the "Account Settings" +section, you'll find your API keys. There's a public key and a private key and +an account ID. It should look like this. + +.. image:: images/api_keys.jpg + +So, let's add these authentication bits to our code. + +.. code-block:: php + + // Authentication Variables + $account_id = "xxx"; + $public_api_key = "xxx"; + $private_api_key = "xxx"; + +Then, we'll want to capture the POSTed form variables from the request. + +.. code-block:: php + + // Form variable(s) + $email = $_POST['email']; + $first_name = $_POST['first_name']; + $last_name = $_POST['last_name']; + $groups = array(123456, 654321); + + // Member data other than email should be passed in an array called "fields" + $member_data = array( + "email" => $email, + "fields" => array( + "first_name" => $first_name, + "last_name" => $last_name + ), + "group_ids" => $groups + ); + +Please note that the ``group_ids`` to which the member will be added are passed +as an array of integers. Of course, you'll want to make sure you sanitize any of +these form inputs to protect your application. + +Let's set the URL for the API call. The endpoint for all of our API calls is +https://api.e2ma.net/. In this case, we're using the endpoint that +corresponds to adding a single member. There's a separate call for adding bulk +members. + +.. code-block:: php + + // Set URL + $url = "https://api.e2ma.net/".$account_id."/members/add"; + +Next, we'll do a little dance with cURL that I'm sure is familiar. I'll +explain some particulars below the code block. + +.. code-block:: php + :emphasize-lines: 3,6,7 + + // setup and execute the cURL command + $ch = curl_init(); + curl_setopt($ch, CURLOPT_USERPWD, $public_api_key . ":" . $private_api_key); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, count($member_data)); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($member_data)); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + $head = curl_exec($ch); + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + +On line 3 is where we use the public/private keys to authenticate our call. +On lines 6-7, we force the API call to make its request in JSON and expect +JSON in return. + +At this point, the API call has been made.We might want to inspect the +result to see what happened. The API returns true HTTP response codes which +you can examine to determine a request's disposition. + +.. code-block:: php + + //execute post + if($http_code > 200) { + $app_message = "Error sending subscription request"; + } else { + $app_message = "Success!"; + } + + echo $app_message; + +You can :doc:`see the complete PHP script here `. +Additionally, there's a PHP example to :doc:`get members using their email +address `. + +To extend this example further, one could make the API call associate the +new member with a particular signup form. As written above, the member would +be added to the audience but would not appear in the "recent activity" type +searches or really any searches related to signups. We are working on a +cleaner way to handle this signup form issue in the future. + + +API calls by category +--------------------- + +The API calls are organized by their main entity type in the following +sections. Each call includes sample request & response data. + +.. toctree:: + :maxdepth: 2 + :glob: + + api/external/* + +Additional Documentation +------------------------ + +.. toctree:: + :maxdepth: 2 + + pagination + placeholders + member_search + webhooks + +.. toctree:: + :hidden: + + php_signup_example + php_get_member_example diff --git a/_sources/member_search.txt b/_sources/member_search.txt new file mode 100644 index 0000000..67dd0a6 --- /dev/null +++ b/_sources/member_search.txt @@ -0,0 +1,104 @@ +.. _search_syntax: + +Search Syntax +============= + +Syntax Overview +--------------- + +Searches are constructed using nested JSON arrays of filters and boolean predicates. Here is an example of a simple filter: + +:: + + ["member_field:foo", "eq", "bar"] + +A filter is composed of one or more parts. The first part is always a *filter term*. In general, a filter term maps directly to a field in the results. A filter term can accept an argument (the ``:foo`` in the example above) that will have different meanings for different filter terms. If the filter has more than one part, the second part is *always* an *operator*. The remaining parts are arguments for the operator. Different operators will have different arguments, but will always have at least one. + +In addition, filters can be *nested* using *boolean predicates*. Here's an example of a nested query: + +:: + + ["and", + ["member_field:foo", "eq", "bar"], + ["member_since", "in last", {"day": 5}]] + + +This example will return all members who joined in the last 5 days and have their member_field ``foo`` set to ``bar``. The available boolean predicates and examples of their use are below. + +Operators +--------- + +There are a bunch of operators available: + +* ``eq`` and ``=``: Basic equality. Example: ``["member_field:some_string_field", "eq", "bar"]`` +* ``lt`` and ``<``: Less than. Example: ``["member_field:some_numeric_field", "lt", 5]`` +* ``gt`` and ``>``: Greater than. Example: ``["member_field:some_numeric_field", "gt", 5]`` + +* ``between``: Between. Takes two arguments. Example: ``["member_field:some_numeric_field", "between", 5, 10]`` +* ``in last`` and ``in next``: Relative date. Takes an interval (explained below). Example: ``["member_since", "in last", {"day": 4}]`` +* ``datematch``: Match a date argument. All parts of the date must match. Example: ``["member_since", "datematch", {"year": 2011}]`` +* ``contains``: Match a string against a shell-glob-style expression. Example: ``["member_field:some_string_field", "contains", "*foo*"]`` +* ``in``: Match a field against a list of values. Example: ``["member_field:some_number_field", "in", 3, 4, 5, 6]`` +* ``any``: Match a given value against an array field. Example: ``["member_field:some_array_field", "any", "ten"]`` + +In addition to these basic operators, there is one advanced operator available: + +* ``zip-radius:n``: where ``n`` can be one of ``5``, ``10``, ``15``, ``20``, ``25``, or ``50``. Takes a single zip code which will be the center of the search. Example: ``["member_field:some_zipcode_field", "zip-radius:10", "97202"]`` will return all members with a ``zip_code_field`` within 10 miles of ``97202``. + +Intervals +~~~~~~~~~ + +An interval is defined as a hash that contains one or more of the following keys: + +* ``year`` +* ``month`` +* ``day`` +* ``hour`` +* ``minute`` +* ``second`` + +For example, ``{"year": 2, "day": 4}`` would specify an interval of two years and four days. + +Dates +~~~~~ + +A date is defined as a hash that contains one or more of the following keys: + +* ``year`` +* ``month`` +* ``day`` +* ``hour`` +* ``minute`` +* ``second`` +* ``dow`` (day of week) + +For example, ``{"day", 31}`` would match the 31st of every month with a 31st day, while ``{"dow": 2}`` would match every Tuesday. Sunday is 0. + +Boolean Predicates +------------------ + +Boolean predicates operate on one or more nested clauses. These predicates are available: + +* ``and``: All clauses must be true. Example: ``["and", ["member_field:foo", "eq", 1], ["member_field:bar", "eq", 2]]`` +* ``or``: At least one clause must be true. Example: ``["or", ["member_field:foo", "eq", 1], ["member_field:bar", "eq", 2]]`` +* ``not``: The single nested clause must not be true. Example: ``["not", ["member_field:foo", "eq", 1]]`` + +Filter Terms +------------ + +In general, every key in the result records can be used as a filter term. Just use the key as the filter term. For example, to filter on ``send_start``, you'd say ``["send_start", "gt", "2011-12-15"]``. In addition, there is a large set of advanced filter terms for filtering members: + +* ``opened``, ``clicked``, ``shared``, ``forwarded``. Will match on the timestamp of the corresponding response if it exists. All of these filter terms also allow a ``mailing_id`` as an argument (i.e. ``opened:12345`` matches if they opened mailing 12345. +* ``member_field:x`` where ``x`` is the short name of a member field. You can also use ``x`` by itself without ``member_field:``. +* ``group``. Will match the name of a member group. Takes the special operators ``defined`` (belongs to any group) and ``undefined`` (does not belong to any group). +* ``received`` Will match if the member received a mailing. Takes an optional ``mailing_id`` argument. If not given, will match if the member has received *any* mailing. +* ``clicked link``. Will match if the member has clicked on a link. Takes an optional ``link_id`` argument. If not given, will match if the member has clicked on *any* link. +* ``manage``: Will match if the member has manged their preferences. Optionally takes a date filter on the timestamp of the manage action. Optionally takes a ``signup_form_id`` argument. Example: ``["manage:1234", "in last", {"day", 30}]``. +* ``unsubscribed``: Will match if the member has unsubscribed. Optionally takes a date filter on the timestamp of the opt-out action. Optionally takes a ``signup_form_id`` filter argument. +* ``unsubscribed mailing``: Will match if the member has unsubscribed. Optionally takes a date filter on the timestamp of the opt-out action. Optionally takes a ``mailing_id`` filter argument. +* ``bounced``: Will match if the member had either a soft or hard bounce. Optionally takes a date filter on the timestamp of the bounce. Optionally takes a ``mailing_id`` filter argument. +* ``email_user``: Will match on the user portion of the member's email address +* ``email_domain``: Will match on the domain portion of the member's email address +* ``email``: Will match on the member's entire email address +* ``signup``: Will match if the member has signed up. Optionally takes a date filter on the timestamp of the signup action. Optionally takes a ``signup_form_id`` filter argument. +* ``signup_mailing``: Will match if the member has signed up. Optionally takes a date filter on the timestamp of the signup action. Optionally takes a ``mailing_id`` filter argument. diff --git a/_sources/pagination.txt b/_sources/pagination.txt new file mode 100644 index 0000000..15211d4 --- /dev/null +++ b/_sources/pagination.txt @@ -0,0 +1,27 @@ +.. _pagination: + +Pagination +========== + +Responses with a large number of results should be paginated; the query +parameters ``start`` and ``end`` can be used to specify how large a set +of items to retrieve in each call, with a maximum page size of 500. + +Additionally, for any call you can retrieve a count of the results (instead +of the results themselves) by appending a query parameter of ``count=true``. + +So, to pull a large number of results, you start with a count: + + https://api.e2ma.net/123/members?count=true + +Then, iterate over the list in blocks of 500: + + https://api.e2ma.net/123/members?start=0&end=500 + + https://api.e2ma.net/123/members?start=500&end=1000 + +Requests for page sizes larger than 500 will limited to ``start`` + 500. + +Calls are rate-limited to prevent accidental overuse. If you exceed the limit +you will receive a response of ``403 Rate Limit Exceeded`` until enough time +has elapsed between calls. diff --git a/_sources/php_get_member_example.txt b/_sources/php_get_member_example.txt new file mode 100644 index 0000000..e5c182e --- /dev/null +++ b/_sources/php_get_member_example.txt @@ -0,0 +1,41 @@ +PHP Get Member By Email Example +=============================== + +Here's the complete example of the PHP code to find a member by email address. + +.. code-block:: php + + 200) { + print "Error getting member:\r\n"; + print_r($head); + } else { + print "Member information:\r\n"; + print_r($head); + } + ?> diff --git a/_sources/php_signup_example.txt b/_sources/php_signup_example.txt new file mode 100644 index 0000000..ed653fb --- /dev/null +++ b/_sources/php_signup_example.txt @@ -0,0 +1,58 @@ +PHP Signup Example +================== + +Here's the complete example of the PHP code to signup a single member. + +.. code-block:: php + + $email, + "fields" => array( + "first_name" => $first_name, + "last_name" => $last_name + ), + "group_ids" => $groups + ); + + // Set URL + $url = "https://api.e2ma.net/".$account_id."/members/add"; + + // Open connection + $ch = curl_init(); + + // Set the url, number of POST vars, POST data + curl_setopt($ch, CURLOPT_USERPWD, $public_api_key . ":" . $private_api_key); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, count($member_data)); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($member_data)); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json')); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + $head = curl_exec($ch); + $http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + //execute post + if($http_code > 200) { + $app_message = "Error sending subscription request"; + print_r($head); + } else { + print_r($head); + $app_message = "Success!"; + } + + echo $app_message; + ?> diff --git a/_sources/placeholders.txt b/_sources/placeholders.txt new file mode 100644 index 0000000..6d13373 --- /dev/null +++ b/_sources/placeholders.txt @@ -0,0 +1,32 @@ +.. _placeholder_syntax: + +Placeholder Syntax +================== + +Syntax Overview +--------------- + +The content of messages can be customized using the template tag library. +Each template tag should be enclosed in a ``[%`` ``%]`` pair. Where a tag +requires a qualifier value, the value should be attached with a colon. + +For example, the following extract shows a member's name being inserted into a +greeting:: + + Hello [% member:first_name %] [% member:last_name %], + + Welcome to the "Exciting Onions" mailing list, where you can be kept up to + date on all the latest onion-related news ... + +Some tags also accept additional key/value pairs to control their behavior. +For example, adding a default value to a member field:: + + Hello [% member:first_name default="Friend" %] + +...or specifying the link text for a trackable link:: + + Please visit [% link:http://fancyonions.com/home name="our website" %] + + +.. todo:: + fully document the available tags diff --git a/_sources/webhooks.txt b/_sources/webhooks.txt new file mode 100644 index 0000000..3a8f572 --- /dev/null +++ b/_sources/webhooks.txt @@ -0,0 +1,337 @@ +.. _webhook_usage: + +Webhook Usage +============= + +Webhook Overview +---------------- + +Webhooks are an easy way to have Emma's system notify you when certain events +occur. In general, you will use our API to tell us which events you want to +be notified about. When those events occur, we will make a POST to the URL +you have provided with a particular set of data. + +We have a broad array of triggering events and an easy API interface +to create webhooks for each event. We do have :doc:`documentation of the webhook +API `. + +Below is a list of each triggering event we currently support and the data +that will be sent when that event occurs. + +Webhook Post Data +----------------- + +Member Signup +~~~~~~~~~~~~~ +:: + + { + "event_name": "member_signup", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id + } + } + +Message Open +~~~~~~~~~~~~ +:: + + { + "event_name": "message_open", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp + } + } + +Message Click +~~~~~~~~~~~~~ +:: + + { + "event_name": "message_click", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp, + "link_id": link_id + } + } + +Member Optout +~~~~~~~~~~~~~ +:: + + { + "event_name": "member_optout", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp + } + } + +Message Share +~~~~~~~~~~~~~ +:: + + { + "event_name": "message_share", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp, + "network": network_code + } + } + +Message Share Click +~~~~~~~~~~~~~~~~~~~ +:: + + { + "event_name": "message_share_click", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp, + "network": network_code + } + } + +Message Forward +~~~~~~~~~~~~~~~ +:: + + { + "event_name": "message_forward", + "data": { + "account_id": account_id, + "member_id": member_id, + "mailing_id": mailing_id, + "subject": mailing_subject, + "timestamp": timestamp + } + } + +Mailing Finish +~~~~~~~~~~~~~~ +:: + + { + "event_name": "mailing_finish", + "data": { + "mailing_id": mailing_id, + "account_id": account_id, + "subject": mailing_subject, + "timestamp": timestamp + } + } + +Import Finish +~~~~~~~~~~~~~ +:: + + { + "event_name": "import_finish", + "data": { + "import_id": import_id, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Member Add +~~~~~~~~~~ +:: + + { + "event_name": "member_add", + "data": { + "member_id": member_id, + "account_id": account_id, + "timestamp": timestamp, + "signup_form_id": signup_form_id, + "resource_url": resource_url + } + } + +Member Update +~~~~~~~~~~~~~ +:: + + { + "event_name": "member_update", + "data": { + "member_id": member_id, + "account_id": account_id, + "timestamp": timestamp + } + } + +Member Delete +~~~~~~~~~~~~~ +:: + + { + "event_name": "member_delete", + "data": { + "member_id": member_id, + "account_id": account_id, + "timestamp": timestamp + } + } + +Member Add To Group +~~~~~~~~~~~~~~~~~~~ + +It's possible that instead of an array for `member_ids` or `group_ids` you +may receive a string with the text `all`. Because of calls that can add a +member to all groups or add all members to a single group, this is easier +than returning a giant list of IDs. + +:: + + { + "event_name": "member_add_to_group", + "data": { + "member_ids": {member_ids}, + "account_id": account_id, + "timestamp": timestamp. + "group_ids": {group_ids} + } + } + +Member Remove From Group +~~~~~~~~~~~~~~~~~~~~~~~~ + +It's possible that instead of an array for `member_ids` or `group_ids` you +may receive a string with the text `all`. Because of calls that can remove a +member from all groups or remove all members from a single group, this is +easier than returning a giant list of IDs. + +:: + + { + "event_name": "member_remove_from_group", + "data": { + "member_ids": {member_ids}, + "account_id": account_id, + "timestamp": timestamp. + "group_ids": {group_ids} + } + } + +Group Create +~~~~~~~~~~~~ +:: + + { + "event_name": "group_create", + "data": { + "group_id": group_id, + "group_name": group_name, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Group Delete +~~~~~~~~~~~~ +:: + + { + "event_name": "group_delete", + "data": { + "group_id": group_id, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Group Update +~~~~~~~~~~~~ +:: + + { + "event_name": "group_update", + "data": { + "group_id": group_id, + "group_name": group_name, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Field Create +~~~~~~~~~~~~ +:: + + { + "event_name": "field_create", + "data": { + "field_id": field_id, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Field Delete +~~~~~~~~~~~~ +:: + + { + "event_name": "field_delete", + "data": { + "field_id": field_id, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Field Update +~~~~~~~~~~~~ +:: + + { + "event_name": "field_update", + "data": { + "field_id": field_id, + "account_id": account_id, + "timestamp": timestamp, + "resource_url": resource_url + } + } + +Member Status Update +~~~~~~~~~~~~~~~~~~~~ +:: + + { + "event_name": "member_status_update", + "data": { + "member_ids": {member_ids}, + "account_id": account_id, + "new_status": new_status, + "timestamp": timestamp + } + } diff --git a/_static/ajax-loader.gif b/_static/ajax-loader.gif new file mode 100644 index 0000000..61faf8c Binary files /dev/null and b/_static/ajax-loader.gif differ diff --git a/_static/basic.css b/_static/basic.css new file mode 100644 index 0000000..a04c8e1 --- /dev/null +++ b/_static/basic.css @@ -0,0 +1,540 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.refcount { + color: #060; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/_static/comment-bright.png b/_static/comment-bright.png new file mode 100644 index 0000000..551517b Binary files /dev/null and b/_static/comment-bright.png differ diff --git a/_static/comment-close.png b/_static/comment-close.png new file mode 100644 index 0000000..09b54be Binary files /dev/null and b/_static/comment-close.png differ diff --git a/_static/comment.png b/_static/comment.png new file mode 100644 index 0000000..92feb52 Binary files /dev/null and b/_static/comment.png differ diff --git a/_static/doctools.js b/_static/doctools.js new file mode 100644 index 0000000..8614442 --- /dev/null +++ b/_static/doctools.js @@ -0,0 +1,235 @@ +/* + * doctools.js + * ~~~~~~~~~~~ + * + * Sphinx JavaScript utilities for all documentation. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/** + * select a different prefix for underscore + */ +$u = _.noConflict(); + +/** + * make the code below compatible with browsers without + * an installed firebug like debugger +if (!window.console || !console.firebug) { + var names = ["log", "debug", "info", "warn", "error", "assert", "dir", + "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", + "profile", "profileEnd"]; + window.console = {}; + for (var i = 0; i < names.length; ++i) + window.console[names[i]] = function() {}; +} + */ + +/** + * small helper function to urldecode strings + */ +jQuery.urldecode = function(x) { + return decodeURIComponent(x).replace(/\+/g, ' '); +}; + +/** + * small helper function to urlencode strings + */ +jQuery.urlencode = encodeURIComponent; + +/** + * This function returns the parsed url parameters of the + * current request. Multiple values per key are supported, + * it will always return arrays of strings for the value parts. + */ +jQuery.getQueryParameters = function(s) { + if (typeof s == 'undefined') + s = document.location.search; + var parts = s.substr(s.indexOf('?') + 1).split('&'); + var result = {}; + for (var i = 0; i < parts.length; i++) { + var tmp = parts[i].split('=', 2); + var key = jQuery.urldecode(tmp[0]); + var value = jQuery.urldecode(tmp[1]); + if (key in result) + result[key].push(value); + else + result[key] = [value]; + } + return result; +}; + +/** + * highlight a given string on a jquery object by wrapping it in + * span elements with the given class name. + */ +jQuery.fn.highlightText = function(text, className) { + function highlight(node) { + if (node.nodeType == 3) { + var val = node.nodeValue; + var pos = val.toLowerCase().indexOf(text); + if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/_static/down-pressed.png b/_static/down-pressed.png new file mode 100644 index 0000000..6f7ad78 Binary files /dev/null and b/_static/down-pressed.png differ diff --git a/_static/down.png b/_static/down.png new file mode 100644 index 0000000..3003a88 Binary files /dev/null and b/_static/down.png differ diff --git a/_static/emma.css b/_static/emma.css new file mode 100644 index 0000000..133bf5e --- /dev/null +++ b/_static/emma.css @@ -0,0 +1,569 @@ +/* + * flasky.css_t + * ~~~~~~~~~~~~ + * + * :copyright: Copyright 2010 by Armin Ronacher. + * :license: Flask Design License, see LICENSE for details. + */ + + + + +@import url("basic.css"); + +/* -- page layout ----------------------------------------------------------- */ + +body { + font-family: 'Roboto', 'Helvetica', sans-serif; + font-size: 16px; + background-color: white; + color: #1b1b1b; + margin: 0; + padding: 0; +} + +div.document { + width: 1280px; + margin: 30px auto 0 auto; +} + +div.documentwrapper { + float: left; + width: 100%; +} + +div.bodywrapper { + margin: 0 0 0 320px; +} + +div.sphinxsidebar { + width: 300px; +} + +hr { + border: 1px solid #B1B4B6; +} + +div.body { + padding: 0 30px 0 30px; +} + +img.floatingflask { + padding: 0 0 10px 10px; + float: right; +} + +div.footer { + width: 1280px; + margin: 20px auto 30px auto; + font-size: 14px; + color: #dadada; + text-align: center; +} + +div.footer a { + color: #888; +} + +div.related { + display: none; +} + +div.sphinxsidebar a { + color: #444; + text-decoration: none; +} + +div.sphinxsidebar a:hover { } + +div.sphinxsidebar { + font-size: 14px; + line-height: 1.5; +} + +div.sphinxsidebarwrapper { + padding: 18px 10px; +} + +div.sphinxsidebarwrapper p.logo { + padding: 0 0 20px 0; + margin: 0; + text-align: center; +} + +div.sphinxsidebar h3, +div.sphinxsidebar h4 { + font-family: 'Garamond', 'Georgia', serif; + color: #444; + font-size: 24px; + font-weight: normal; + margin: 0 0 5px 0; + padding: 0; +} + +div.sphinxsidebar h4 { + font-size: 20px; +} + +div.sphinxsidebar h3 a { + color: #444; +} + +div.sphinxsidebar p.logo a, +div.sphinxsidebar h3 a, +div.sphinxsidebar p.logo a:hover, +div.sphinxsidebar h3 a:hover { + border: none; +} + +div.sphinxsidebar p { + color: #555; + margin: 10px 0; +} + +div.sphinxsidebar ul { + margin: 10px 0; + padding: 0; + color: #000; +} + +div.sphinxsidebar input { + border: 1px solid #ccc; + font-family: 'Georgia', serif; + font-size: 1em; +} + +/* -- body styles ----------------------------------------------------------- */ + +a { + color: #004B6B; + text-decoration: underline; +} + +a:hover { + color: #6D4100; + /* text-decoration: underline; */ +} + +div.body h1, +div.body h2, +div.body h3, +div.body h4, +div.body h5, +div.body h6 { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + margin: 30px 0px 10px 0px; + padding: 0; +} + +div.body h1 { margin-top: 0; padding-top: 0; font-size: 240%; } +div.body h2 { font-size: 180%; } +div.body h3 { font-size: 150%; } +div.body h4 { font-size: 130%; } +div.body h5 { font-size: 100%; } +div.body h6 { font-size: 100%; } + +a.headerlink { + color: #ddd; + padding: 0 4px; + text-decoration: none; +} + +a.headerlink:hover { + color: #444; + background: #eaeaea; +} + +div.body p, div.body dd, div.body li { + line-height: 1.4em; +} + +div.admonition { + background: #fafafa; + margin: 20px -30px; + padding: 10px 30px; + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} + +div.admonition tt.xref, div.admonition a tt { + border-bottom: 1px solid #fafafa; +} + +dd div.admonition { + margin-left: -60px; + padding-left: 60px; +} + +div.admonition p.admonition-title { + font-family: 'Garamond', 'Georgia', serif; + font-weight: normal; + font-size: 24px; + margin: 0 0 10px 0; + padding: 0; + line-height: 1; +} + +div.admonition p.last { + margin-bottom: 0; +} + +div.highlight { + background-color: white; +} + +dt:target, .highlight { + background: #FAF3E8; +} + +div.note { + background-color: #eee; + border: 1px solid #ccc; +} + +div.seealso { + background-color: #ffc; + border: 1px solid #ff6; +} + +div.topic { + background-color: #eee; +} + +p.admonition-title { + display: inline; +} + +p.admonition-title:after { + content: ":"; +} + +pre, tt { + font-family: 'Consolas', 'Menlo', 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; + font-size: 0.9em; +} + +img.screenshot { +} + +tt.descname, tt.descclassname { + font-size: 0.95em; +} + +tt.descname { + padding-right: 0.08em; +} + +img.screenshot { + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils { + border: 1px solid #888; + -moz-box-shadow: 2px 2px 4px #eee; + -webkit-box-shadow: 2px 2px 4px #eee; + box-shadow: 2px 2px 4px #eee; +} + +table.docutils td, table.docutils th { + border: 1px solid #888; + padding: 0.25em 0.7em; +} + +table.field-list, table.footnote { + border: none; + -moz-box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; +} + +table.footnote { + margin: 15px 0; + width: 100%; + border: 1px solid #eee; + background: #fdfdfd; + font-size: 0.9em; +} + +table.footnote + table.footnote { + margin-top: -15px; + border-top: none; +} + +table.field-list th { + padding: 0 0.8em 0 0; +} + +table.field-list td { + padding: 0; +} + +table.footnote td.label { + width: 0px; + padding: 0.3em 0 0.3em 0.5em; +} + +table.footnote td { + padding: 0.3em 0.5em; +} + +dl { + margin: 0; + padding: 0; +} + +dl dd { + margin-left: 30px; +} + +blockquote { + margin: 0 0 0 30px; + padding: 0; +} + +ul, ol { + margin: 10px 0 10px 30px; + padding: 0; +} + +pre { + background: #eee; + padding: 7px 30px; + margin: 15px -12px; + line-height: 1.3em; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + border: solid 1px #ddd; + -webkit-box-shadow: #DFDFDF 3px 3px 5px; + -moz-box-shadow: #DFDFDF 3px 3px 5px; + box-shadow: #DFDFDF 3px 3px 5px; +} + +dl pre, blockquote pre, li pre { + margin-left: -60px; + padding-left: 60px; +} + +dl dl pre { + margin-left: -90px; + padding-left: 90px; +} + +tt { + background-color: #ecf0f3; + color: #222; +} + +tt.xref, a tt { + background-color: #FBFBFB; + border-bottom: 1px solid white; +} + +a.reference { + text-decoration: none; +} + +a.reference:hover { } + +a.footnote-reference { + text-decoration: none; + font-size: 0.7em; + vertical-align: top; + border-bottom: 1px dotted #004B6B; +} + +a.footnote-reference:hover { } + +a:hover tt { + background: #EEE; +} + + +/******************************************************** +********************************************************* +* Begin massive and hackish resets +********************************************************* +********************************************************/ + + + + +/* fonts.css from the YUI Library: developer.yahoo.com/yui/ + Refer to developer.yahoo.com/yui/3/cssfonts/ for font sizing percentages + + There are three custom edits: + * remove arial, helvetica from explicit font stack + * we normalize monospace styles ourselves + * table font-size is reset in the HTML5 reset above so there is no need to repeat +*/ +body { font:16px/1.231 sans-serif; *font-size:small; } /* hack retained to preserve specificity */ + +body { font-family: 'Roboto', 'Helvetica', sans-serif; } + +select, input, textarea, button { font:99% sans-serif; } + +/* normalize monospace sizing + * en.wikipedia.org/wiki/MediaWiki_talk:Common.css/Archive_11#Teletype_style_fix_for_Chrome + */ +pre, code, kbd, samp { font-family: monospace, sans-serif; } + + +/* + * minimal base styles + */ + + +body, select, input, textarea { + /* #444 looks better than black: twitter.com/H_FJ/statuses/11800719859 */ + color: #1b1b1b; + /* set your base font here, to apply evenly */ + /* font-family: Georgia, serif; */ +} + +/* Headers (h1,h2,etc) have no default font-size or margin, + you'll want to define those yourself. */ +h1,h2,h3,h4,h5,h6 { font-weight: 700; } + +/* always force a scrollbar in non-IE */ +html { overflow-y: scroll; } + + +/* Accessible focus treatment: people.opera.com/patrickl/experiments/keyboard/test */ +a:hover, a:active, a:focus, a::-moz-focus-inner { outline: none; } +button::-moz-focus-inner, +input[type="reset"]::-moz-focus-inner, +input[type="button"]::-moz-focus-inner, +input[type="submit"]::-moz-focus-inner, +input[type="file"] > input[type="button"]::-moz-focus-inner { border: none; } + +a, a:active, a:visited { color: #1b1b1b; } +a:hover { color: #1ac0b4; } + + +ul, ol { margin-left: 1.8em; } +ol { list-style-type: decimal; } + +/* Remove margins for navigation lists */ +nav ul, nav li { margin: 0; } + +small { font-size: 85%; } +strong, th { font-weight: bold; } + +td, td img { vertical-align: top; } + +sub { vertical-align: sub; font-size: smaller; } +sup { vertical-align: super; font-size: smaller; } + +pre { + padding: 15px; + + /* www.pathf.com/blogs/2008/05/formatting-quoted-code-in-blog-posts-css21-white-space-pre-wrap/ */ + white-space: pre; /* CSS2 */ + word-wrap: break-word; /* IE */ +} + +textarea { overflow: auto; } /* thnx ivannikolic! www.sitepoint.com/blogs/2010/08/20/ie-remove-textarea-scrollbars/ */ + +.clearer { display:none; } + + +/******************************************************** +********************************************************* +* Begin hackish stylings +********************************************************* +********************************************************/ + +body { } + +div.sphinxsidebar { + width: 300px; +} +div.sphinxsidebarwrapper { + padding: 0 16px 0 0; +} + +/* searchbox */ +div.sphinxsidebarwrapper form.search { + display: -webkit-flex; + display: flex; + font-size: 14px; +} +div.sphinxsidebar #searchbox input[type=text] { + border-top-left-radius: 4px; + border-bottom-left-radius: 4px; + border-right: 0; + padding: 10px; + font-family: 'Roboto', sans-serif; + color: #1b1b1b; + flex: 1; +} +div.sphinxsidebar #searchbox input[type=text]:focus { outline: none; } +div.sphinxsidebar #searchbox input[type=submit] { + width: 50px; + background: #FF7055; + border-top-right-radius: 4px; + border-bottom-right-radius: 4px; + border-color: #FF7055; + font-family: 'Roboto', sans-serif; + color: white; + font-weight: 700; + text-transform: uppercase; + text-align: center; +} + +.highlight-python { position:relative; z-index:2; margin-bottom:12px; } +.highlight-python:before { position:absolute; left:0; top:0; content:''; display:block; width:100%; height:100%; background:#ccc; -webkit-box-shadow:0 4px 4px #ccc; -moz-box-shadow:0 4px 4px #ccc; box-shadow:0 4px 4px #ccc; z-index:-1; opacity:.5; } +pre { background:#fff; z-index:3; -webkit-border-radius:0; -moz-border-radius:0; border-radius:0; -webkit-box-shadow:none; -moz-box-shadow:none; box-shadow:none; } + + +/*Header - Main*/ +header[role="banner"] {max-width:1280px; margin: 60px auto; } +header[role="banner"] h1 { width:170px; height:30px; text-indent:-9999px; } +header[role="banner"] a { display: block; background:url(img/logo.png) left/ contain no-repeat;} + +/*Page*/ +div.api_key_img { overflow: hidden; height:300px; } +div.document { position:relative; margin-top:0; } + +/*Sidebar*/ +div.sphinxsidebar { } +div.sphinxsidebarwrapper { } +div.sphinxsidebar a, div.sphinxsidebarwrapper > ul > li > a { color:#828282; transition: all .1s ease } +div.sphinxsidebar a:hover { color:#FF7055; } +div.sphinxsidebar h3, div.sphinxsidebar h3 a { position:relative; font-size:18px; margin-top:24px; padding-top:6px; font-family:'Roboto', 'Helvetica', sans-serif; /*border-top:3px solid #bababa;*/ color:#1B1B1B; font-weight: 700; text-transform: uppercase; text-decoration:none; border:none; } +div.sphinxsidebar h3 a { border:none; } +div.sphinxsidebar h3:first-child { margin-top:0; padding-top: 0; } +div.sphinxsidebarwrapper > ul > li { margin-bottom:36px; } +div.sphinxsidebarwrapper > ul > li > a:hover { color: #FF7055; } +div.sphinxsidebar ul ul { margin-top:8px; } +div.sphinxsidebar ul ul ul { margin-top:8px; } +div.sphinxsidebar li { margin-bottom:12px; font-size:16px; } +div.sphinxsidebar li li { font-weight:normal; font-size:16px; } +div.sphinxsidebar li ul { list-style: none; } +div.sphinxsidebar li li a { color: #828282; } +div.sphinxsidebar p.searchtip { font-size: 12px !important; } + +/*Main Content*/ +div.bodywrapper { position:relative; z-index:2; } +div.body { position:relative; padding:0 30px 30px; z-index:3; } +div.body h1 { margin-bottom:36px; font-family:'Roboto', 'Helvetica', sans-serif; font-weight:700; font-size:32px; } +div.body .section { margin-top:24px; } +div.body .section:first-child { margin-top:0; } +div.body h2 { margin-top:24px; margin-bottom:12px; font-family:'Roboto', 'Helvetica', sans-serif; font-weight:700; font-size:20px; color: #00B9AC; } +div.body p, div.body dd, div.body li { line-height: 170%; } +div.body a.reference { text-decoration: none; font-weight: 700; } +div.body dt { font-size: 18px; } +div.body dl dd { margin: 14px 0;} +div.body dd { + border: 1px solid #eaeaea; + border-radius: 4px; + background: #F0F4F7; + padding: 15px; +} +div.body dd ul { + margin: 0; + list-style: none; +} \ No newline at end of file diff --git a/_static/file.png b/_static/file.png new file mode 100644 index 0000000..d18082e Binary files /dev/null and b/_static/file.png differ diff --git a/_static/img/bg-body.jpg b/_static/img/bg-body.jpg new file mode 100644 index 0000000..3d539f5 Binary files /dev/null and b/_static/img/bg-body.jpg differ diff --git a/_static/img/bg-header.png b/_static/img/bg-header.png new file mode 100644 index 0000000..de6ea45 Binary files /dev/null and b/_static/img/bg-header.png differ diff --git a/_static/img/fonts/BebasNeue-webfont.eot b/_static/img/fonts/BebasNeue-webfont.eot new file mode 100755 index 0000000..ca5d03e Binary files /dev/null and b/_static/img/fonts/BebasNeue-webfont.eot differ diff --git a/_static/img/fonts/BebasNeue-webfont.svg b/_static/img/fonts/BebasNeue-webfont.svg new file mode 100755 index 0000000..a3ca94a --- /dev/null +++ b/_static/img/fonts/BebasNeue-webfont.svg @@ -0,0 +1,245 @@ + + + + +This is a custom SVG webfont generated by Font Squirrel. +Copyright : Copyright c 2010 by Ryoichi Tsunekawa All rights reserved +Designer : Ryoichi Tsunekawa +Foundry : Ryoichi Tsunekawa + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/_static/img/fonts/BebasNeue-webfont.ttf b/_static/img/fonts/BebasNeue-webfont.ttf new file mode 100755 index 0000000..2aae649 Binary files /dev/null and b/_static/img/fonts/BebasNeue-webfont.ttf differ diff --git a/_static/img/fonts/BebasNeue-webfont.woff b/_static/img/fonts/BebasNeue-webfont.woff new file mode 100755 index 0000000..dc0998c Binary files /dev/null and b/_static/img/fonts/BebasNeue-webfont.woff differ diff --git a/_static/img/logo.png b/_static/img/logo.png new file mode 100644 index 0000000..bf6aa63 Binary files /dev/null and b/_static/img/logo.png differ diff --git a/_static/jquery.js b/_static/jquery.js new file mode 100644 index 0000000..198b3ff --- /dev/null +++ b/_static/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/_static/minus.png b/_static/minus.png new file mode 100644 index 0000000..da1c562 Binary files /dev/null and b/_static/minus.png differ diff --git a/_static/plus.png b/_static/plus.png new file mode 100644 index 0000000..b3cb374 Binary files /dev/null and b/_static/plus.png differ diff --git a/_static/pygments.css b/_static/pygments.css new file mode 100644 index 0000000..c9a3f41 --- /dev/null +++ b/_static/pygments.css @@ -0,0 +1,62 @@ +.highlight .hll { background-color: rgba(221,236,255,.5) } +.highlight { background: #eeffcc; } +.highlight .c { color: #dbdbdb; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #00AFFF; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #bababa; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .c1 { color: #bababa; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #303030 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0040D0 } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #00AFFF } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #ff7055 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #053A5E } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #053A5E } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #053A5E } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/_static/searchtools.js b/_static/searchtools.js new file mode 100644 index 0000000..56676b2 --- /dev/null +++ b/_static/searchtools.js @@ -0,0 +1,622 @@ +/* + * searchtools.js_t + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilties for the full-text search. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + + +/** + * Simple result scoring code. + */ +var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [filename, title, anchor, descr, score] + // and returns the new score. + /* + score: function(result) { + return result[4]; + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + // query found in terms + term: 5 +}; + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, + + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

').appendTo(this.out); + this.output = $('
'); + } + // Prettify the comment rating. + comment.pretty_rating = comment.rating + ' point' + + (comment.rating == 1 ? '' : 's'); + // Make a class (for displaying not yet moderated comments differently) + comment.css_class = comment.displayed ? '' : ' moderate'; + // Create a div for this comment. + var context = $.extend({}, opts, comment); + var div = $(renderTemplate(commentTemplate, context)); + + // If the user has voted on this comment, highlight the correct arrow. + if (comment.vote) { + var direction = (comment.vote == 1) ? 'u' : 'd'; + div.find('#' + direction + 'v' + comment.id).hide(); + div.find('#' + direction + 'u' + comment.id).show(); + } + + if (opts.moderator || comment.text != '[deleted]') { + div.find('a.reply').show(); + if (comment.proposal_diff) + div.find('#sp' + comment.id).show(); + if (opts.moderator && !comment.displayed) + div.find('#cm' + comment.id).show(); + if (opts.moderator || (opts.username == comment.username)) + div.find('#dc' + comment.id).show(); + } + return div; + } + + /** + * A simple template renderer. Placeholders such as <%id%> are replaced + * by context['id'] with items being escaped. Placeholders such as <#id#> + * are not escaped. + */ + function renderTemplate(template, context) { + var esc = $(document.createElement('div')); + + function handle(ph, escape) { + var cur = context; + $.each(ph.split('.'), function() { + cur = cur[this]; + }); + return escape ? esc.text(cur || "").html() : cur; + } + + return template.replace(/<([%#])([\w\.]*)\1>/g, function() { + return handle(arguments[2], arguments[1] == '%' ? true : false); + }); + } + + /** Flash an error message briefly. */ + function showError(message) { + $(document.createElement('div')).attr({'class': 'popup-error'}) + .append($(document.createElement('div')) + .attr({'class': 'error-message'}).text(message)) + .appendTo('body') + .fadeIn("slow") + .delay(2000) + .fadeOut("slow"); + } + + /** Add a link the user uses to open the comments popup. */ + $.fn.comment = function() { + return this.each(function() { + var id = $(this).attr('id').substring(1); + var count = COMMENT_METADATA[id]; + var title = count + ' comment' + (count == 1 ? '' : 's'); + var image = count > 0 ? opts.commentBrightImage : opts.commentImage; + var addcls = count == 0 ? ' nocomment' : ''; + $(this) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-open' + addcls, + id: 'ao' + id + }) + .append($(document.createElement('img')).attr({ + src: image, + alt: 'comment', + title: title + })) + .click(function(event) { + event.preventDefault(); + show($(this).attr('id').substring(2)); + }) + ) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-close hidden', + id: 'ah' + id + }) + .append($(document.createElement('img')).attr({ + src: opts.closeCommentImage, + alt: 'close', + title: 'close' + })) + .click(function(event) { + event.preventDefault(); + hide($(this).attr('id').substring(2)); + }) + ); + }); + }; + + var opts = { + processVoteURL: '/_process_vote', + addCommentURL: '/_add_comment', + getCommentsURL: '/_get_comments', + acceptCommentURL: '/_accept_comment', + deleteCommentURL: '/_delete_comment', + commentImage: '/static/_static/comment.png', + closeCommentImage: '/static/_static/comment-close.png', + loadingImage: '/static/_static/ajax-loader.gif', + commentBrightImage: '/static/_static/comment-bright.png', + upArrow: '/static/_static/up.png', + downArrow: '/static/_static/down.png', + upArrowPressed: '/static/_static/up-pressed.png', + downArrowPressed: '/static/_static/down-pressed.png', + voting: false, + moderator: false + }; + + if (typeof COMMENT_OPTIONS != "undefined") { + opts = jQuery.extend(opts, COMMENT_OPTIONS); + } + + var popupTemplate = '\ +
\ +

\ + Sort by:\ + best rated\ + newest\ + oldest\ +

\ +
Comments
\ +
\ + loading comments...
\ +
    \ +
    \ +

    Add a comment\ + (markup):

    \ +
    \ + reStructured text markup: *emph*, **strong**, \ + ``code``, \ + code blocks: :: and an indented block after blank line
    \ +
    \ + \ +

    \ + \ + Propose a change ▹\ + \ + \ + Propose a change ▿\ + \ +

    \ + \ + \ + \ + \ + \ +
    \ +
    '; + + var commentTemplate = '\ +
    \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ +
    \ +

    \ + <%username%>\ + <%pretty_rating%>\ + <%time.delta%>\ +

    \ +
    <#text#>
    \ +

    \ + \ + reply ▿\ + proposal ▹\ + proposal ▿\ + \ + \ +

    \ +
    \
    +<#proposal_diff#>\
    +        
    \ +
      \ +
      \ +
      \ +
      \ + '; + + var replyTemplate = '\ +
    • \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
    • '; + + $(document).ready(function() { + init(); + }); +})(jQuery); + +$(document).ready(function() { + // add comment anchors for all paragraphs that are commentable + $('.sphinx-has-comment').comment(); + + // highlight search words in search results + $("div.context").each(function() { + var params = $.getQueryParameters(); + var terms = (params.q) ? params.q[0].split(/\s+/) : []; + var result = $(this); + $.each(terms, function() { + result.highlightText(this.toLowerCase(), 'highlighted'); + }); + }); + + // directly open comment window if requested + var anchor = document.location.hash; + if (anchor.substring(0, 9) == '#comment-') { + $('#ao' + anchor.substring(9)).click(); + document.location.hash = '#s' + anchor.substring(9); + } +}); diff --git a/api/external/accounts.html b/api/external/accounts.html new file mode 100644 index 0000000..712b3a1 --- /dev/null +++ b/api/external/accounts.html @@ -0,0 +1,332 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Accounts

      +

      + These endpoints allow you to manage subaccounts under an HQ parent account. +

      +
      +
      + POST /#parent_account_id/enterprise/subaccount + +
      +
      +

      Creates a subaccount under the given parent account

      +
      + + + + + + + + + + +
      Parameters:
        +
      • account_name (string) – Required. The name of the subaccount.
      • +
      • account_rsvp_email (string) – Optional (recommended.) This is the ‘sender email’ that the subaccount’s mailings will be shown as sent from.
      • +
      • account_rsvp_name (string) – Optional (recommended.) This is the ‘sender name’ displayed on the subaccount’s mailings.
      • +
      • account_rsvp_address_1 (string) – Optional (recommended.) First line of the address for the subaccount.
      • +
      • account_rsvp_address_2 (string) – Optional. Second line of the address for the subaccount.
      • +
      • account_rsvp_country (string) – Optional (recommended.) Country for the subaccount (must match 2 letter iso code or capitalized country name.) + Including this additionally requires city & state parameters (or city & province if outside the US.)
      • +
      • account_rsvp_city (string) – Optional (recommended.) City for the subaccount.
      • +
      • account_rsvp_province (string) – Optional. Province for the subaccount (only for accounts outside the US.)
      • +
      • account_rsvp_state (string) – Optional (recommended.) State for the subaccount (full capitalized state name or capitalized 2 + letter abbreviation.)
      • +
      • account_rsvp_zip_code (string) – Optional (recommended.) Zipcode or postal code for the subaccount.
      • +
      • account_status (string) – Optional. This sets the status of the subaccount; must be ‘active’ or ‘trial’. HQ parent accounts in + ‘trial’ status that attempt to create ‘active’ subaccounts will have those subaccounts created as ‘trial’.
      • +
      • account_timezone (string) – Optional (recommended.) Time zone information for the subaccount formatted in the + tz database name standard.
      • +
      • country_abbrev (boolean string) – Optional. ‘true’ or ‘false’ (used for personalization.)
      • +
      • send_response_summary (boolean) – Optional. This setting sends relevant subaccount users a response summary email 24 hours after mailing has been sent.
      • +
      • show_code_your_own (boolean) – Optional, This setting allows subaccount to use HTML to create mailings instead of the drag & drop editor.
      • +
      • show_blank_template (boolean) – Optional. This setting makes a blank template available for customization.
      • +
      +
      Returns : +

      A response with the newly created subaccount's ‘account_id’, the ‘account_name’ of the newly created subaccount, + and the ‘parent_account_id’ of the HQ parent. +

      +
      +

      +

      + Sample Response + [showhide] +
      +POST /100/enterprise/subaccount
      +{
      +  "account_name": "Test Account Name",
      +  "account_id": 101,
      +  "parent_account_id": 100,
      +}
      +                        
      +
      +

      + + +
      +
      + DELETE /#parent_account_id/enterprise/subaccount/#subaccount_id
      +

      Retires a subaccount.

      +

      Be advised that using this endpoint will remove the subaccount from the HQ account, and all of the data associated with the subaccount will be purged completely from our system and will be unretrievable after 30 days. If you accidentally retire a subaccount, you will need to reach out to our Support team for assistance, as the subaccount cannot be re-instituted through the API.

      + + + + + + + + + +
      Returns :A response with the subaccount's ‘account_name’ and the ‘status’ of ‘retired’.
      Raises :Http404 if the subaccount does not exist.
      +

      +

      + Sample Response + [showhide] +
      +DELETE /100/enterprise/subaccount/101
      +{
      +  "account_name": "Test Account Name",
      +  "status": "retired",
      +}
      +                                
      +
      +

      +
      +
      +
      + GET/#parent_account_id/enterprise/subaccounts
      +

      Gets a list of subaccounts.

      +

      This endpoint provides a list of subaccounts that the requesting user has access to. Calling this endpoint with no query parameters will return subaccounts in ‘active’, ‘trial’, ‘pending_retirement’, and ‘retired’ status. This endpoint is paginated, so if you have more than 500 subaccounts, you'll need to make multiple requests using the pagination params.

      + + + + + + + + + + + +
      Parameters:
        +
      • status (comma separated string) – Optional. Allows filtering based on subaccount status. Valid statuses are: ‘active’, ‘trial’, ‘pending_retirement’, and ‘retired’.
      • +
      • searchterm (string) – Optional. Allows searching by the ‘account_name’ value.
      • +
      +
      Returns :A response with a list of subaccounts including their ‘account_name’, ‘account_id’, and their ‘account_status’.
      Raises :Http404 if the parent account does not exist.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/enterprise/subaccounts?start=0&end=2
      +{
      +    "subaccounts": [
      +        {
      +            "account_id": 101,
      +            "account_name": "Test Account Name",
      +            "account_status": "active"
      +        },
      +        {
      +            "account_id": 102,
      +            "account_name": "Test Account Name 2",
      +            "account_status": "retired"
      +        }
      +    ]
      +}
      +                                
      +
      +

      +
      +
      +
      + PUT/#parent_account_id/enterprise/#user_id/subaccounts
      +

      Assign subaccounts to a user.

      +

      This endpoint allows owners, and managers with the ‘manage_users’ permission, to assign subaccounts to a specific ‘user_id’. + The list of subaccounts provided in the call will overwrite the current list of subaccounts the user has access to, so you’ll need to ensure you’ve included every subaccount ID applicable to the user you are editing. +

      + + + + + + + + + + + + + +
      Parameters:
        +
      • accounts (list of integers) – Required. The list of subaccounts to assign to the user.
      • +
      +
      Raises :Http400 if a non parent account is used in the route.
      Raises :Http400 if the requesting user does not have access to all accounts provided in the request body.
      Raises :Http401 if the requesting user is trying to edit a user with an equal or higher role.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/enterprise/name@myemma.com/subaccounts
      +{
      +    "message": true
      +}
      +                                
      +
      +

      +
      + + + + +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      + + + + diff --git a/api/external/automation.html b/api/external/automation.html new file mode 100644 index 0000000..9274cad --- /dev/null +++ b/api/external/automation.html @@ -0,0 +1,295 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Automation

      +

      + These endpoints allow you access to information about workflows in Emma. +

      +
      +
      + GET /#account_id/automation/workflows + +
      +
      +

      Gets a list of this account’s automation workflows.

      + + + + + + + + + + + +
      Returns : +

      A list of automation workflows in the given account.

      +
      +

      +

      + Sample Response + [showhide] +
      +GET /100/automation/workflows
      +[
      +  {
      +    "workflow_id": "596ee017-abf9-4884-bb43-79724422de25",
      +    "name": "Test Workflow",
      +    "status": "active",
      +    "updated_at": "2017-10-30 23:31:49.661228",
      +    "created_at": "2017-10-30 23:30:42.067754"
      +  }
      +]
      +                        
      +
      +

      +
      +
      + +
      +
      + GET /#account_id/automation/workflows/#workflow_id + +
      +
      +

      Gets detailed information about a single workflow.

      + + + + + + + + + + + + + + + +
      Returns : +

      + A single workflow if one exists +

      +
      Raises : +

      + Http404 + if no workflow is found. +

      +
      +

      +

      + Sample Response + [showhide] +
      +GET /100/automation/workflows/596ee017-abf9-4884-bb43-79724422de25
      +{
      +  "workflow_id": "596ee017-abf9-4884-bb43-79724422de25",
      +  "name": "Test",
      +  "status": "inactive",
      +  "updated_at": "2017-10-30 23:31:49.661228",
      +  "created_at": "2017-10-30 23:30:42.067754"
      +}
      +                        
      +
      +

      +
      +
      + +
      +
      + GET /#account_id/automation/counts + +
      +
      +

      Gets the counts of workflows for this account by workflow state.

      + + + + + + + + + + + +
      Returns : +

      + Returns counts for the workflow by state ("active", "inactive" and "draft"). +

      +
      +

      +

      + Sample Response + [showhide] +
      +GET /100/automation/workflows/count
      +{
      +  "account_id": "100",
      +  "draft": 3,
      +  "active": 12,
      +  "inactive": 9
      +}
      +                        
      +
      +

      +
      +
      +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/event_api.html b/api/external/event_api.html new file mode 100644 index 0000000..72c8f0f --- /dev/null +++ b/api/external/event_api.html @@ -0,0 +1,297 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Emma Event API

      +

      Access to the Event API is available only to Emma Essentials, Emma for Teams and Emma Corporate customers.

      +

      The Emma Event API is used to automate and personalize emails that are triggered by audience activities in other platforms. While it is often used to power automated workflows triggered by activities like purchases and event registration and attendance, the Event API can receive events and data of any type from any service.

      +

      You can post events to Emma using the endpoint below. Workflows that are triggered by events shared to this endpoint can be configured in the Automation workflow builder. For more information about the event API and its capabilities, visit our Resource Center.

      +
      +
      + POST https://events.e2ma.net/v1/#account_id/events
      +

      This endpoint allows you to post any type of valid JSON to Emma. In order for an event to power an automated workflow, the following conditions must be met: +

    • Must include a valid email address as a value with a key of "email"
    • +
    • Email address must belong to a contact who is currently in “Active” status within your audience
    • +
    • Automated workflow must be configured to match key/value pairs contained within JSON post (more information here).
    • +
    • JSON payload must not exceed 256KB (262,035 bytes)
    • +

      + +

      +

      + Sample Request + [showhide] +
      +POST /events.e2ma.net/v1/100/events/
      +
      +{
      +  “event_name”: “order-completed”
      +    "id": 1028374857,
      +    "email": “cody.devos@myemma.com”,
      +    "closed_at": null,
      +    "created_at": "2016-04-12T11:00:00-09:00",
      +"total_price": “145.53”,
      +      "total_discounts": “14.70",
      +      "order_number": 1001,
      +    "discount_codes": [
      +      {
      +        "code": “TEN16”,
      +        "amount": “10.00",
      +        "type": "percentage"
      +      }
      +    ],
      +   "line_items": [
      +      {
      +        "id": 998327818,
      +        "variant_id": 59284621,
      +        "title": “Slim Short Sleeve Linen Shirt”,
      +        "quantity": 1,
      +        "price": “68.00",
      +        "sku": “SLSSLNSHRT”,
      +        "variant_title": “white”,
      +        “size”: medium,
      +        "product_id": 632910392,
      +        "requires_shipping": true,
      +        "taxable": true,
      +        "gift_card": false,
      +        "name": “Slim Short Sleeve Linen Shirt - White“,
      +                ],
      +        "tax_lines": [
      +          {
      +            "title": "State Tax",
      +            "price": “6.12”,
      +            "rate": 0.09
      +          }
      +{
      +        "id": 789327523,
      +        "variant_id": 89137513,
      +        "title": “Slim Mens Chino”,
      +        "quantity": 1,
      +        "price": “79.00",
      +        "sku": “SLMNCHNO”,
      +        "variant_title": “green”,
      +        “size”: 32W32L,
      +        "product_id": 948517351,
      +        "requires_shipping": true,
      +        "taxable": true,
      +        "gift_card": false,
      +        "name": “Slim Short Sleeve Linen Shirt - White“,
      +                ],
      +        "tax_lines": [
      +          {
      +            "title": "State Tax",
      +            "price": “7.11”,
      +            "rate": 0.09
      +          }
      +        ]
      +      },
      +  "shipping_lines": [
      +      {
      +        "id": 0928273492,
      +        "title": "Free Shipping",
      +        "price": "0.00",
      +        "code": "Free Shipping",
      +        "source": "shopify",
      +        "phone": null,
      +        "carrier_identifier": null,
      +        "tax_lines": [
      +        ]
      +      }
      +    ],
      +
      +
      +
      +

      +

      +

      + Sample Response + [showhide] +
      +POST /events.e2ma.net/v1/100/events/
      +{"success":true}
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/exports.html b/api/external/exports.html new file mode 100644 index 0000000..61062d0 --- /dev/null +++ b/api/external/exports.html @@ -0,0 +1,365 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Exports

      +

      With these endpoints, you can create member exports and view information about specific exports already created in your account.

      +
      +
      +GET /#account_id/exports
      +

      Get a list of all exports created for an account.

      + +++ + + + + + +
      Parameters:
        +
      • export_type (string) – 'a' audience, 'm' individual member export. Defaults to 'a' if no export type is specified.
      • +
      +
      Returns:

      A list of exports created in the specified account over the past seven days. Status: "o" for OK, "e" for error, "q" for queued, "p" for in progress.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/exports
      +
      +[
      +    {
      +        "account_id": 100,
      +        "completed_at": "2019-09-06T19:34:30.962114+00:00",
      +        "created_at": "2019-09-06T19:34:30.628190+00:00",
      +        "criteria": {
      +            "groups": [
      +                1234
      +            ],
      +            "include_fields": true,
      +            "member_ids": null,
      +            "member_status_ids": [
      +                "a",
      +                "o",
      +                "e"
      +            ],
      +            "mfv_delimiter": ",",
      +            "segments": null,
      +            "subscriptions": null
      +        },
      +        "export_id": 1,
      +        "export_name": "Weekly Update",
      +        "export_type": "a",
      +        "status": "o",
      +        "user_id": "name@myemma.com"
      +    }
      +]
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/exports/#export_id
      +

      Get detailed information for a specific export.

      + +++ + + + + + +
      Returns:Information about an export. Status: "o" for OK, "e" for error, "q" for queued, "p" for in progress.
      Raises:Http404 if no export with the specified ID is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/exports/200
      +
      +{
      +    "account_id": 100,
      +    "completed_at": "2019-09-06T19:34:30.962114+00:00",
      +    "created_at": "2019-09-06T19:34:30.628190+00:00",
      +    "criteria": {
      +        "groups": [
      +            1234
      +        ],
      +        "include_fields": true,
      +        "member_ids": null,
      +        "member_status_ids": [
      +            "a",
      +            "o",
      +            "e"
      +        ],
      +        "mfv_delimiter": ",",
      +        "segments": null,
      +        "subscriptions": null
      +    },
      +    "export_id": 200,
      +    "export_name": "Product Release News",
      +    "export_type": "a",
      +    "status": "o",
      +    "user_id": "name@myemma.com"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/exports/#export_id/download
      +

      Get a CSV for the requested export.

      + +++ + + + + + +
      Returns:If the export_type is 'a' (audience), download results in CSV form. If the export_type is 'm' (individual member), download results in a zip file.
      Raises:Http404 if no export with the specified ID is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/exports/200/download
      +
      +email,member_id,member_since,plaintext_preferred,bounce_count,status_name,last_modified_at,status-name,last_name,custom-field-name
      +email@email.com,123456789,2016-10-28T15:05:52 UTC,f,0,active,2019-05-07T20:44:21 UTC,,Last_name,,,2.0,37210,,,,b,,,,,,,,,,,,,
      +email1@email.com,234567890,2019-05-02T17:47:11 UTC,f,0,active,2019-05-02T17:47:11 UTC,,Member,,,,,,,,,
      +
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/exports
      +

      Create an export of members.

      + +++ + + + + + +
      Parameters:
        +
      • user_id (string) – Required.
      • +
      • criteria (dictionary) – Describes what should be exported. +
          +
        • groups (array of integers) – List of group IDs
        • +
        • segments (array of integers) – List of segment IDs
        • +
        • member_ids (array of integers) – List of member IDs
        • +
          +

          The list of members to be exported will be a union of the members included + in each provided group and segment, and the list of member_ids

          +
          +
        • member_status_ids (array of strings) – Status of the members
        • +
        • include_fields – Accepts True or an array of strings. Optional flag to include all member fields or a list of member fields.
        • +
        + +
      • +
      +
      Returns:

      An export ID.

      +
      +

      +

      + Sample Response + [showhide] +
      +    POST /100/exports
      +    {
      +        "user_id": "name@myemma.com",
      +        "criteria": {
      +            "groups": [12345, 67890],
      +            "member_status_ids": ["a"],
      +            "include_fields": true
      +        }
      +    }
      +    
      +    {
      +      "export_id": 1234
      +    }
      +    
      +
      +

      +
      + +
      +
      + POST /#account_id/exports/members/#member_id
      +

      Create an export of all information for an individual member. This will provide compliance with GDPR right to data portability.

      + + + + + + + +
      Returns:An export ID.
      +
      +
      +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/fields.html b/api/external/fields.html new file mode 100644 index 0000000..2362800 --- /dev/null +++ b/api/external/fields.html @@ -0,0 +1,437 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Fields

      +

      These endpoints let you create, edit, update and delete all of the custom +fields in your account. Of particular interest is the +/#account_id/fields/#field_id/clear endpoint which lets you clear out +all the data in a single field for all members in your account. This makes +it easy to re-initialize a dataset if you’re looking to correct an import +error or syncing issue.

      +
      +
      +GET /#account_id/fields
      +

      Gets a list of this account’s defined fields.

      + +++ + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include +deleted fields.
      • +
      +
      Returns :

      An array of fields.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/fields
      +
      +[
      +  {
      +    "shortcut_name": "first_name",
      +    "display_name": "First Name",
      +    "account_id": 100,
      +    "field_type": "text",
      +    "required": false,
      +    "field_id": 200,
      +    "widget_type": "text",
      +    "short_display_name": null,
      +    "column_order": 1,
      +    "deleted_at": null,
      +    "options": null
      +  },
      +  {
      +    "shortcut_name": "last_name",
      +    "display_name": "Last Name",
      +    "account_id": 100,
      +    "field_type": "text",
      +    "required": false,
      +    "field_id": 201,
      +    "widget_type": "text",
      +    "short_display_name": null,
      +    "column_order": 2,
      +    "deleted_at": null,
      +    "options": null
      +  },
      +  {
      +    "shortcut_name": "favorite_food",
      +    "display_name": "Favorite Food",
      +    "account_id": 100,
      +    "field_type": "text",
      +    "required": false,
      +    "field_id": 202,
      +    "widget_type": "text",
      +    "short_display_name": null,
      +    "column_order": 3,
      +    "deleted_at": null,
      +    "options": null
      +  },
      +  {
      +    "shortcut_name": "birthday",
      +    "display_name": "Birthday",
      +    "account_id": 100,
      +    "field_type": "date",
      +    "required": false,
      +    "field_id": 203,
      +    "widget_type": "date",
      +    "short_display_name": null,
      +    "column_order": 4,
      +    "deleted_at": null,
      +    "options": null
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/fields/#field_id
      +

      Gets the detailed information about a particular field.

      + +++ + + + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optionally show a field +even if it has been deleted.
      • +
      +
      Returns :

      A field.

      +
      Raises :

      Http404 if the field does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/fields/200
      +
      +{
      +  "shortcut_name": "first_name",
      +  "display_name": "First Name",
      +  "account_id": 100,
      +  "field_type": "text",
      +  "required": false,
      +  "field_id": 200,
      +  "widget_type": "text",
      +  "short_display_name": null,
      +  "column_order": 1,
      +  "deleted_at": null,
      +  "options": null
      +}
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/fields
      +

      Create a new field field.

      +

      There must not already be a field with this name.

      + +++ + + + + + +
      Parameters:
        +
      • shortcut_name (string) – The internal name for this field.
      • +
      • display_name (string) – Display name, used for forms and reports.
      • +
      • field_type (string) – The type of value this field will contain. +Accepts one of text, text[], numeric, boolean, +date, timestamp.
      • +
      • widget_type (string) – The widget used to accept field input. Valid values are based on field_type.
        +   text => text, long, radio, select one.
        +   text[] => select multiple, check_multiple.
        +   numeric => number.
        +   boolean => checkbox.
        +   date and timestamp => date. +
      • +
      • options (array) – Options for a + check_multiple, + select multiple, + select one, or + radio widget.
      • +
      • column_order (integer) – Order of this column in lists.
      • +
      +
      Returns :

      A reference to the new field.

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/fields
      +{
      +  "shortcut_name": "new_dropdown",
      +  "column_order": 3,
      +  "display_name": "A New Select Box Field",
      +  "field_type": "text",
      +  "widget_type": "select one",
      +  "options": ["first", "second", "third"]
      +}
      +
      +1024
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/fields/#field_id
      +

      Deletes a field.

      + +++ + + + + + +
      Returns :True if the field is deleted.
      Raises :Http404 if the field does not exist.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/fields/200
      +
      +true
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/fields/#field_id/clear
      +

      Clear the member data for the specified field.

      + +++ + + + +
      Returns :True if all of the member field data is deleted
      +

      +

      +Sample Response +[showhide] +
      +POST /100/fields/200/clear
      +{}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/fields/#field_id
      +

      Updates an existing field.

      + +++ + + + +
      Returns :A reference to the updated field.
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/fields/202
      +{
      +  "display_name": "Your Birthday"
      +}
      +
      +202
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/groups.html b/api/external/groups.html new file mode 100644 index 0000000..ed104e2 --- /dev/null +++ b/api/external/groups.html @@ -0,0 +1,707 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Groups

      +

      With these endpoints, you can manage all aspects of the groups in +your account. In addition to various CRUD methods, you can also +use these endpoints to manage the members of your groups. You’ll +want to use these methods if you’re managing group membership for +more than one member at a time. For dealing with single members, +there are better methods in the members endpoints.

      +
      +
      +GET /#account_id/groups
      +

      Get a basic listing of all active member groups for a single account.

      + +++ + + + + + +
      Returns :

      An array of groups.

      +
      Parameters:
        +
      • group_types (string) – Accepts a comma-separated string with one or +more of the following group_types: ‘g’ (group), ‘t’ (test), +‘h’ (hidden), ‘all’ (all). Defaults to ‘g’.
      • +
      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/groups?group_types=g,t
      +
      +[
      +  {
      +    "active_count": 1,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 1,
      +    "group_type": "g",
      +    "member_group_id": 150,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Monthly Newsletter"
      +  },
      +  {
      +    "active_count": 2,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 151,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Widget Buyers"
      +  },
      +  {
      +    "active_count": 4,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 152,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Special Events"
      +  }
      +]
      +
      +
      +
      +

      +

      +

      +Sample Response +[showhide] +
      +GET /100/groups?group_types=all
      +
      +[
      +  {
      +    "active_count": 1,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 1,
      +    "group_type": "g",
      +    "member_group_id": 150,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Monthly Newsletter"
      +  },
      +  {
      +    "active_count": 2,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 151,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Widget Buyers"
      +  },
      +  {
      +    "active_count": 4,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 152,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Special Events"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/groups
      +

      Create one or more new member groups.

      + +++ + + + + + +
      Returns :

      An array of the new group ids and group names.

      +
      Parameters:
        +
      • groups (array) – An array of group objects. Each object must contain +a group_name parameter.
      • +
      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/groups
      +{
      +  "groups": [
      +    {
      +      "group_name": "My Grp"
      +    }
      +  ]
      +}
      +
      +[
      +  {
      +    "member_group_id": 1024,
      +    "group_name": "My Grp"
      +  }
      +]
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/groups/#member_group_id
      +

      Get the detailed information for a single member group.

      + +++ + + + + + +
      Returns :A group.
      Raises :Http404 if the group does not exist.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/groups/150
      +
      +{
      +  "active_count": 1,
      +  "deleted_at": null,
      +  "error_count": 0,
      +  "optout_count": 1,
      +  "group_type": "g",
      +  "member_group_id": 150,
      +  "purged_at": null,
      +  "account_id": 100,
      +  "group_name": "Monthly Newsletter"
      +}
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/groups/#member_group_id
      +

      Update information for a single member group.

      + +++ + + + + + + + +
      Parameters:
        +
      • group_name (string) – Updated group name.
      • +
      +
      Returns :

      True if the update was successful

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/groups/150
      +{
      +  "group_name": "New Group Name"
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/groups/#member_group_id
      +

      Delete a single member group.

      + +++ + + + + + +
      Returns :True if the group is deleted.
      Raises :Http404 if the group does not exist.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/groups/150
      +
      +true
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/groups/#member_group_id/members
      +

      Get the members in a single active member group.

      + +++ + + + + + + + +
      Returns :

      An array of members.

      +
      Parameters:
        +
      • deleted (boolean) – include deleted members. Optional, defaults to false.
      • +
      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/groups/150/members
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "member_id": 200,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "emma@myemma.com"
      +  },
      +  {
      +    "status": "opt-out",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Gladys",
      +      "last_name": "Jones",
      +      "favorite_food": "toast"
      +    },
      +    "member_id": 201,
      +    "last_modified_at": null,
      +    "member_status_id": "o",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2011-01-03T15:54:13",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "gladys@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/groups/#member_group_id/members
      +

      Add a list of members to a single active member group.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_ids (array) – An array of member ids.
      • +
      +
      Returns :

      An array of references to the members added to the group. If +a member already exists in the group or is not a valid member, +that reference will not be returned.

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/groups/150/members
      +{
      +  "member_ids": [
      +    202
      +  ]
      +}
      +
      +[
      +  202
      +]
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/groups/#member_group_id/members/remove
      +

      Remove members from a single active member group.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_ids (array) – An array of member ids.
      • +
      +
      Returns :

      An array of references to the removed members.

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/groups/150/members/remove
      +{
      +  "member_ids": [
      +    200,
      +    201
      +  ]
      +}
      +
      +[
      +  200,
      +  201
      +]
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/groups/#member_group_id/members
      +

      Remove all members from a single active member group.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_status_id (string) – Optional. This is ‘a’ (active), ‘o’ (optout), +or ‘e’ (error).
      • +
      +
      Returns :

      Returns the number of members removed from the group.

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/groups/151/members
      +
      +2
      +
      +
      + + +
      +Sample Response +[showhide] +
      +DELETE /100/groups/151/members?member_status_id=a
      +
      +2
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/groups/#member_group_id/members/remove
      +

      Delete all members in this group with the specified status. Remove those members from all groups as a background job. +The member_status_id parameter must be set.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_status_id (string) – This is ‘a’ (active), ‘o’ (optout), +or ‘e’ (error).
      • +
      +
      Returns :

      Returns true.

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/groups/151/members/remove?member_status_id=a
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/groups/#from_group_id/#to_group_id/members/copy
      +

      Copy all the users of one group into another group.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_status_id (array) – This is ‘a’ (active), ‘o’ (optout), +or ‘e’ (error).
      • +
      +
      Returns :

      True

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/groups/151/152/members/copy
      +{
      +  "member_status_id": [
      +    "a"
      +  ]
      +}
      +
      +true
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/api/external/mailings.html b/api/external/mailings.html new file mode 100644 index 0000000..f63d201 --- /dev/null +++ b/api/external/mailings.html @@ -0,0 +1,1076 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Mailings

      +

      With these endpoints, you can get information about your mailings including +their HTML contents. You can retrieve the members to whom the mailing was sent. +You can also pause mailings and cancel mailings that are pending or paused.

      +
      +
      +GET /#account_id/mailings
      +

      Get information about current mailings.

      + +++ + + + + + + + +
      Parameters:
        +
      • include_archived (boolean) – Optional flag to include archived mailings in the list.
      • +
      • mailing_types (string) – Optional parameter that accepts a comma-separated string with one or more +of the following mailing types: ‘m’ (standard), ‘t’ (test), +‘r’ (trigger), ‘s’ (subject line split test), ‘c’ (content split test). +Defaults to ‘m,t’, standard and test mailings, when none are specified.
      • +
      • mailing_statuses (string) – Optional parameter that accepts a comma-separated string with one or +more of the following mailing statuses: ‘p’ (pending), ‘a’ (paused), ‘i’ (injecting), +‘s’ (sending), ‘x’ (canceled), ‘c’ (complete), ‘w’ (waiting), +‘u’ (unapproved), ‘f’ (failed). Defaults to ‘p,a,i,s,x,c,w,u,f’, all statuses, +when none are specified.
      • +
      • is_scheduled (boolean) – Optional flag for mailings that have a scheduled timestamp.
      • +
      • with_html_body (boolean) – Optional flag to include the html_body content.
      • +
      • with_plaintext (boolean) – Optional flag to include the plaintext content.
      • +
      +
      Raises :

      Http400 if invalid mailing types or statuses are specified.

      +
      Returns :

      An array of mailings.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings
      +
      +[
      +  {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "cancel_by_user_id": null,
      +    "mailing_id": 201,
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "mailing_status": "p",
      +    "month": null,
      +    "failure_ts": null,
      +    "reply_to": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "sender": "Kevin McConnell",
      +    "plaintext_only": false,
      +    "name": "Cancellable mailing",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "send_finished": null,
      +    "send_at": null,
      +    "signup_form_id": null,
      +    "subject": "Cancellable mailing",
      +    "purged_at": null,
      +    "archived_ts": null
      +  },
      +  {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "cancel_by_user_id": null,
      +    "mailing_id": 200,
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "mailing_status": "c",
      +    "month": null,
      +    "failure_ts": null,
      +    "reply_to": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "sender": "Kevin McConnell",
      +    "plaintext_only": false,
      +    "name": "Sample Mailing",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "send_finished": null,
      +    "send_at": null,
      +    "signup_form_id": null,
      +    "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +    "purged_at": null,
      +    "archived_ts": null
      +  }
      +]
      +
      +
      +
      +

      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings?mailing_statuses=p,c&mailing_types=m,t
      +
      +[
      +  {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "cancel_by_user_id": null,
      +    "mailing_id": 201,
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "mailing_status": "p",
      +    "month": null,
      +    "failure_ts": null,
      +    "reply_to": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "sender": "Kevin McConnell",
      +    "plaintext_only": false,
      +    "name": "Cancellable mailing",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "send_finished": null,
      +    "send_at": null,
      +    "signup_form_id": null,
      +    "subject": "Cancellable mailing",
      +    "purged_at": null,
      +    "archived_ts": null
      +  },
      +  {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "cancel_by_user_id": null,
      +    "mailing_id": 200,
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "mailing_status": "c",
      +    "month": null,
      +    "failure_ts": null,
      +    "reply_to": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "sender": "Kevin McConnell",
      +    "plaintext_only": false,
      +    "name": "Sample Mailing",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "send_finished": null,
      +    "send_at": null,
      +    "signup_form_id": null,
      +    "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +    "purged_at": null,
      +    "archived_ts": null
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id
      +

      Get detailed information for one mailing.

      + +++ + + + + + + + +
      Parameters:
        +
      • include_segment_names (boolean) – Optional flag to include segment names under recipient_segments. False by default.
      • +
      • include_subscription_names (boolean) – Optional flag to include subscription names under recipient_subscriptions. False by default.
      • +
      Returns :A mailing.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200
      +
      +{
      +  "recipient_groups": [
      +    {
      +      "member_group_id": 151,
      +      "name": "Widget Buyers"
      +    }
      +  ],
      +  "recipient_subscriptions": [
      +    {
      +      "subscription_id": 200,
      +      "subscription_name": "Widgets"
      +    }
      +  ],
      +  "heads_up_emails": [],
      +  "send_started": null,
      +  "signup_form_id": null,
      +  "links": [
      +    {
      +      "mailing_id": 200,
      +      "plaintext": false,
      +      "link_id": 200,
      +      "link_name": "Emma",
      +      "link_target": "http://www.myemma.com",
      +      "link_order": 1
      +    }
      +  ],
      +  "mailing_id": 200,
      +  "plaintext": "Hello [% member:first_name %]!",
      +  "recipient_count": 0,
      +  "public_webview_url": "http://localhost/webview/uf/6db0cc7e6fdb2da589b65f29d90c96b6",
      +  "mailing_type": "m",
      +  "recipient_segments": [],
      +  "parent_mailing_id": null,
      +  "recipient_searches": [],
      +  "deleted_at": null,
      +  "account_id": 100,
      +  "recipient_members": [
      +    {
      +      "email": "youremma@myemma.com",
      +      "member_id": 200
      +    }
      +  ],
      +  "mailing_status": "c",
      +  "sender": "Kevin McConnell",
      +  "name": "Sample Mailing",
      +  "send_finished": null,
      +  "send_at": null,
      +  "reply_to": null,
      +  "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +  "archived_ts": null,
      +  "html_body": "<p>Hello [% member:first_name %]!</p>"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/members
      +

      Get the list of members to whom the given mailing was sent. This +does not include groups or searches.

      + +++ + + + + + +
      Returns :An array of members including status and member fields.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/members
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "member_id": 200,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "youremma@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/messages/#member_id
      +

      Gets the personalized message content as sent to a specific member +as part of the specified mailing.

      + +++ + + + + + + + + + +
      Parameters:
        +
      • type (string) – Accepts: ‘all’, ‘html’, ‘plaintext’, ‘subject’, ‘webview_url’. Defaults +to ‘all’, if not provided.
      • +
      +
      Returns :

      Message content from a mailing, personalized for a member. +The response will contain all parts of the mailing content by +default, or just the type of content specified by type.

      +
      Raises :

      Http404 if no message is found.

      +
      Raises :

      Http500 if allowed_types is not valid.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/messages/200
      +
      +{
      +  "plaintext": "Hello !",
      +  "subject": "Sample Mailing for  ",
      +  "html_body": "<p>Hello !</p>",
      +  "webview_url": "https://tracker/message/200/200"
      +}
      +
      +
      +

      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/messages/200?type=html
      +
      +{
      +  "html_body": "<p>Hello !</p>"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/groups
      +

      Get the groups to which a particular mailing was sent.

      + +++ + + + + + +
      Returns :An array of groups.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/groups
      +
      +[
      +  {
      +    "active_count": 2,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 151,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Widget Buyers"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/subscriptions
      +

      Get the subscriptions to which a particular mailing was sent.

      + +++ + + + + + +
      Returns :An array of subscriptions.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/subscriptions
      +
      +[
      +  {
      +    "subscription_name": "Widgets",
      +    "account_id": 100,
      +    "member_count": 100,
      +    "settings": {
      +      "show_on_default_preference_form": false
      +    },
      +    "created_at": "Mon, 22 Jul 2019 18:45:47 GMT",
      +    "description": "Widgets Subscription",
      +    "modified_at": "Mon, 22 Jul 2019 18:45:47 GMT",
      +    "optout_count": 0,
      +    "subscription_id": 300
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/searches
      +

      Get all searches associated with a sent mailing.

      + +++ + + + + + +
      Returns :An array of searches.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/searches
      +
      +[
      +  {
      +    "optout_count": 0,
      +    "account_id": 100,
      +    "cached_at": null,
      +    "last_run_at": "@D:2018-02-06T16:27:06",
      +    "active_count": 4,
      +    "error_count": 0,
      +    "criteria": "["and", ["and", ["member_field:name_first", "contains", "*Kevin*"]]]",
      +    "deleted_at": null,
      +    "purged_at": null,
      +    "search_id": 400,
      +    "name": "All the Kevins"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/suppressed_searches
      +

      Get all suppressed searches associated with a sent mailing.

      + +++ + + + + + + +
      Returns :An array of suppressed searches.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET|/100/mailings/200/suppressed_searches
      +
      +[
      +  {
      +    "optout_count": 0,
      +    "account_id": 200,
      +    "cached_at": "@D:2018-08-13T14:28:12",
      +    "last_run_at": "@D:2018-08-13T14:28:12",
      +    "active_count": 772,
      +    "error_count": 0,
      +    "criteria": "["and", ["and", ["not", ["opened", "in last", {"week": "52"}]]]]",
      +    "deleted_at": null,
      +    "purged_at": null,
      +    "search_id": 401,
      +    "name": "Inactive 12+ Months"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/suppressed_members
      +

      Get all suppressed members for a particular mailing.

      + +++ + + + + + + +
      Returns :An array of suppressed members.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET|/100/mailings/200/suppressed_members
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +        "first_name": "Kevin",
      +        "last_name": "McConnell,"
      +    },
      +    "member_id": 200,
      +    "last_modified_at": "@D:2017-05-09T08:14:30",
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2017-05-09T08:14:30",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "youremma@myemma.com"
      +  },
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +        "first_name": "Emma",
      +        "last_name": "Smith"
      +    },
      +    "member_id": 201,
      +    "last_modified_at": "@D:2017-05-09T08:14:30",
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2017-05-09T08:14:30",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "theiremma@myemma.com"
      +  },
      +]
      +
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/mailings/#mailing_id
      +

      Update status of a current mailing

      +

      The status can be one of canceled, paused or ready. This +method can be used to control the progress of a mailing by pausing, +canceling or resuming it. Once a mailing is canceled it can’t be +resumed, and will not show in the normal mailing_list output.

      + +++ + + + + + + + + + + + + + + + + + +
      Parameters:
        +
      • status (string) – Accepts ‘canceled’, ‘paused’ or ‘ready’.
      • +
      +
      Raises :Http404 if no mailing is found.
      Raises :Http400 if the mailing is already in Completed or Sending status and cannot be updated.
      Raises :Http400 if the mailing is in Pending or Unapproved status and the html or plaintext is missing a required tag.
      Raises :Http400 if the mailing is in Pending or Unapproved status and cannot be rescheduled.
      Raises :Http400 if an invalid status is passed in.
      Raises :Http400 if the mailing is already canceled.
      Returns :The updated mailing
      +
      + +
      +
      +DELETE /#account_id/mailings/#mailing_id
      +

      Sets archived timestamp for a mailing so it is no longer included in +mailing_list.

      + +++ + + + +
      Returns :True if the mailing is successfully archived.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/mailings/200
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/mailings/cancel/#mailing_id
      +

      Cancels a mailing that has a current status of pending or +paused. All other statuses will result in a 403.

      + +++ + + + + + + + +
      Returns :True if mailing marked as cancelled.
      Raises :Http403 if the current mailing status is not pending or paused.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/mailings/cancel/201
      +
      +true
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/forwards/#mailing_id/#member_id
      +

      Forward a previous message to additional recipients. If these +recipients are not already in the audience, they will be added with a +status of FORWARDED.

      + +++ + + + + + + + +
      Parameters:
        +
      • heads_up_emails (array) – An array of email addresses that heads up +notification emails will be sent to.
      • +
      • recipient_emails (array) – An array of email addresses to which to +forward the specified message.
      • +
      +
      Returns :

      A reference to the new mailing_id.

      +
      Raises :

      Http404 if no message is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/forwards/200/200
      +{
      +  "recipient_emails": [
      +    "alex@myemma.com",
      +    "chris@myemma.com"
      +  ]
      +}
      +
      +{
      +  "mailing_id": 1024
      +}
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/mailings/#mailing_id
      +

      Send a prior mailing to additional recipients. A new mailing will be +created that inherits its content from the original.

      + +++ + + + + + + + +
      Parameters:
        +
      • sender (string) – The message sender. If this is not supplied, the +sender of the original mailing will be used.
      • +
      • heads_up_emails (array) – An array of email addresses that heads up +notification emails will be sent to.
      • +
      • recipient_emails (array) – An array of email addresses to which the new +mailing should be sent.
      • +
      • recipient_groups (array) – An array of member groups to which the new +mailing should be sent.
      • +
      • recipient_subscriptions (array) – An array of subscriptions to which the new + mailing should be sent.
      • +
      • recipient_searches (array) – An array of searches that this mailing should +be sent to.
      • +
      • recipient_segments (array) – An array of segments that this mailing should +be sent to.
      • +
      • suppression_segments (array) – An array of suppressed segments that this mailing should +not be sent to.
      • +
      +
      Returns :

      A reference to the new mailing_id.

      +
      Raises :

      Http404 if no mailing is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/mailings/200
      +{
      +  "recipient_emails": [
      +    "michelle@myemma.com"
      +  ]
      +}
      +
      +{
      +  "mailing_id": 1024
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/mailings/#mailing_id/headsup
      +

      Get heads up email address(es) related to a mailing.

      + +++ + + + + + +
      Returns :An array of heads up email addresses.
      Raises :Http404 if no mailing is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/mailings/200/headsup
      +
      +[
      +  {
      +    "sent_ts": null,
      +    "email": "myemma@myemma.com",
      +    "mailing_id": 200
      +  },
      +  {
      +    "sent_ts": null,
      +    "email": "youremma@myemma.com",
      +    "mailing_id": 200
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/mailings/validate
      +

      Validate that a mailing has valid personalization-tag syntax. Checks +tag syntax in three params:

      + +++ + + + + + + + +
      Parameters:
        +
      • html_body (string) – Optional html contents of the mailing.
      • +
      • plaintext (string) – Optional plaintext contents of the mailing.
      • +
      • subject (string) – Optional subject of the mailing.
      • +
      +
      Returns :

      true

      +
      Raises :

      Http400 if any tags are invalid. The response body will +have information about the invalid tags.

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/mailings/validate
      +{
      +  "subject": "Another Fine Test"
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/mailings/#mailing_id/winner/#winner_id
      +

      Declare the winner of a split test manually. In the event that the test +duration has not elapsed, the current stats for each test will be frozen +and the content defined in the user declared winner will sent to the +remaining members for the mailing. Please note, any messages that are +pending for each of the test variations will receive the content +assigned to them when the test was initially constructed.

      + +++ + + + + + + + + + +
      Returns :True on success.
      Raises :Http403 if the winner cannot be manually declared.
      Raises :Http404 if the mailing is not found.
      Raises :Http404 if the winning_id mailing is not found.
      +

      +

      +Sample Response +[showhide] +
      +POST /100/mailings/202/winner/203
      +{}
      +
      +true
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/members.html b/api/external/members.html new file mode 100644 index 0000000..8eac6b7 --- /dev/null +++ b/api/external/members.html @@ -0,0 +1,1398 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Members

      +

      In addition to the various CRUD endpoints here related to members, +you can also change the status of members, including opting them out.

      +

      You’ll notice that there are calls related to individual members, but +we also provide quite a few calls to deal with bulk updates of members. +Please try to use these whenever possible as opposed to looping through +a list of members and calling the individual member calls.

      +

      Where this is especially important is when adding new members. To do a bulk +import, you’ll POST to the /#account_id/members endpoint. In return, +you’ll receive an import ID. You can use this ID to check the status and +results of your import. Imports are generally pretty fast, but the time +to completion can vary with greater system usage.

      +
      +
      +GET /#account_id/members
      +

      Get a basic listing of all members in an account.

      + +++ + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include deleted members.
      • +
      • deleted_only (boolean) – Accepts True or 1. Optional flag to return only deleted members.
      • +
      • deleted_range (string) – Accepts 2 dates (YYYY-MM-DD) delimited by a tilde (~). + Example: ``2011-04-01~2011-09-01`` + Optional argument to limit results to a date range. If one of the + dates is omitted, the default will be either min date or now. If + a single date is provided with no tilde, then only members deleted + on that date will be included.
      • +
      • exclude_fields (boolean) – Accepts True or 1. Optional flag to return only the base attributes of a member
      • +
      +
      Returns :

      A list of members in the given account.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members?start=0&end=2
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "member_id": 200,
      +    "sms": {
      +      "phone_number": "+11234567890",
      +      "region_code": "US",
      +      "transactional_status": "a",
      +      "transactional_status_updated_at": "2023-02-14T21:27:20.723208+00:00",
      +      "promotional_status": "o",
      +      "promotional_status_updated_at": "2023-02-14T21:27:20.723208+00:00"
      +    },
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "emma@myemma.com"
      +  },
      +  {
      +    "status": "opt-out",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Gladys",
      +      "last_name": "Jones",
      +      "favorite_food": "toast"
      +    },
      +    "member_id": 201,
      +    "sms": null,
      +    "last_modified_at": null,
      +    "member_status_id": "o",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2011-01-03T15:54:13",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "gladys@myemma.com"
      +  }
      +]
      +
      +
      +
      + + +
      +Sample Response +[showhide] +
      +GET /100/members?start=2&end=4&deleted=true
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Tony",
      +      "last_name": "Brown",
      +      "favorite_food": "pizza"
      +    },
      +    "member_id": 202,
      +    "sms": {
      +      "phone_number": "+11234567891",
      +      "region_code": "US",
      +      "transactional_status": "a",
      +      "transactional_status_updated_at": "2023-02-14T21:27:20.723208+00:00",
      +      "promotional_status": "o",
      +      "promotional_status_updated_at": "2023-02-14T21:27:20.723208+00:00"
      +    },
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T09:12:33",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "tony@myemma.com"
      +  },
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +
      +    },
      +    "member_id": 203,
      +    "sms": null,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2011-01-01T00:00:00",
      +    "bounce_count": 0,
      +    "deleted_at": "@D:2011-01-02T10:27:43",
      +    "email": "greg@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/#member_id
      +

      Get detailed information on a particular member, including all custom +fields.

      + +++ + + + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include deleted +members.
      • +
      +
      Returns :

      A single member if one exists.

      +
      Raises :

      Http404 if no member is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/201
      +
      +{
      +  "status": "opt-out",
      +  "confirmed_opt_in": null,
      +  "account_id": 100,
      +  "fields": {
      +    "first_name": "Gladys",
      +    "last_name": "Jones",
      +    "favorite_food": "toast"
      +  },
      +  "member_id": 201,
      +  "sms": {
      +      "phone_number": "+11234567890",
      +      "region_code": "US",
      +      "transactional_status": "a",
      +      "transactional_status_updated_at": "2023-02-14T21:27:20.723208+00:00",
      +      "promotional_status": "o",
      +      "promotional_status_updated_at": "2023-02-14T21:27:20.723208+00:00"
      +  },
      +  "last_modified_at": null,
      +  "member_status_id": "o",
      +  "plaintext_preferred": false,
      +  "email_error": null,
      +  "member_since": "@D:2011-01-03T15:54:13",
      +  "bounce_count": 0,
      +  "deleted_at": null,
      +  "email": "gladys@myemma.com"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/email/:email
      +

      Get detailed information on a particular member, including all custom +fields, by email address instead of ID.

      + +++ + + + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include deleted +members.
      • +
      +
      Returns :

      A single member if one exists.

      +
      Raises :

      Http404 if no member is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/email/tony@myemma.com
      +
      +{
      +  "status": "active",
      +  "confirmed_opt_in": null,
      +  "account_id": 100,
      +  "fields": {
      +    "first_name": "Tony",
      +    "last_name": "Brown",
      +    "favorite_food": "pizza"
      +  },
      +  "member_id": 202,
      +  "sms": null,
      +  "last_modified_at": null,
      +  "member_status_id": "a",
      +  "plaintext_preferred": false,
      +  "email_error": null,
      +  "member_since": "@D:2010-11-12T09:12:33",
      +  "bounce_count": 0,
      +  "deleted_at": null,
      +  "email": "tony@myemma.com"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/#member_id/optout
      +

      If a member has been opted out, returns the details +of their optout, specifically date and mailing_id.

      + +++ + + + + + +
      Returns :Member opt out date and mailing if member is opted out.
      Raises :Http404 if no member is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/201/optout
      +
      +[
      +  {
      +    "timestamp": "@D:2014-11-18T22:58:15",
      +    "mailing_id": 1234567
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/email/optout/:email
      +

      Update a member’s status to optout keyed on email address +instead of an ID.

      + +++ + + + + + +
      Returns :True if member status change was successful or +member was already opted out.
      Raises :Http404 if no member is found.
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/email/optout/tony@myemma.com
      +{}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/members
      +

      Add new members or update existing members in bulk. If you are doing +actions for a single member please see the /members/add call below.

      + +++ + + + + + +
      Parameters:
        +
      • members (array) – An array of members to update A member is a dictionary of member emails, SMS phone numbers, and field values to import. +The only required field is “email”. All other fields are treated as the name of a member field.
      • +
      • automate_field_changes (boolean) – Accepts True or False. Optional. When set to True, updates made by this call will trigger +field change workflows when appropriate. For more information on field change automation, visit our +Resource Center.
      • +
      • automate_contact_imports (boolean) – Accepts True or False. Optional. When set to True, updates made by this call will +trigger contact import workflows when appropriate.
      • +
      • source_filename (string) – An arbitrary string to associate with this import. This should generally be set to the filename +that the user uploaded.
      • +
      • add_only (boolean) – Optional. Only add new members, ignore existing members.
      • +
      • group_ids (array of integers) – Optional. Add imported members to this list of groups.
      • +
      • criteria (dictionary) – Optional. Set the sms promotional/transactional statuses for imported members.
      • +
      +
      Returns :

      An import id

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/members
      +{
      +  "members": [
      +    {
      +      "email": "michelle@myemma.com",
      +      "sms": {
      +        "phone_number": "1234567891",
      +      }
      +    },
      +    {
      +      "email": "nathan@myemma.com",
      +      "sms": {
      +        "phone_number": "1234567890",
      +      }
      +    }
      +  ],
      +  "criteria": {
      +    "sms": {
      +      "transactional_status": "a",
      +      "promotional_status": "a"
      +    }
      +  }
      +}
      +
      +{
      +  "import_id": 1024
      +}
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/members/add
      +

      Adds or updates a single audience member. If you are performing actions +on bulk members please use the /members call above.

      +
      +
      Note: Members who are added to your audience using this API call will
      +
      not appear in “recent activity” searches within your account.
      +
      Note: If you are using Signup trigger events in Automation, please see this guide for
      +
      more information on how this API call affects those trigger events.
      +
      + +++ + + + + + +
      Parameters:
        +
      • email (string) – Email address of member to add or update
      • +
      • phone_number (string) – A phone number of the member to add or update.
      • +
      • fields (dictionary) – Names and values of user-defined fields to update
      • +
      • group_ids (array of integers) – Optional. Add imported members to this list of groups.
      • +
      • field_triggers (boolean) – Optional. Fires related field change autoresponders when set to true.
      • +
      • sms (dictionary) – Optional. sms phone number config for member
      • +
          +
        • phone_number (string) – Phone Number
        • +
        • promotional_status (string) – Transactional Status
        • +
        • transactional_status (string) – Promotional Status
        • +
        +
      • subscriber_consent_tracking (boolean) – Optional. Whether or not the user accepts tracking and analysis.
      • +
      +
      Returns :

      The member_id of the new or updated member, whether the +member was added or an existing member was updated, and the status of the member. The +status will be reported as ‘a’ (active), ‘e’ (error), or ‘o’ (optout).

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/members/add
      +{
      +  "fields": {
      +    "first_name": "Benjamin"
      +  },
      +  "email": "benjamin@myemma.com",
      +  "sms": {
      +    "phone_number": "1234567890",
      +    "promotional_status": "o",
      +    "transactional_status": "a"
      +  }
      +}
      +
      +{
      +  "status": "a",
      +  "added": true,
      +  "member_id": 1024
      +}
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/members/signup
      +

      Takes the necessary actions to signup a member and enlist them in the +provided group ids. You can send the same member multiple times and +pass in new group ids to signup.

      +

      This process triggers the opt-out workflow, and will send a mailing to +the member on new group enlistments. If no new group ids are provided for +an existing member, the endpoint will respond back with their status +and member_id, performing no additional actions.

      +
      +
      Note: Members who are added to your audience using this API call will
      +
      not appear in “recent activity” searches within your account.
      +
      Note: If you are using Signup trigger events in Automation, please see this guide for
      +
      more information on how this API call affects those trigger events.
      +
      + +++ + + + + + + +
      Parameters:
        +
      • email (string) – Email address of the member to sign-up.
      • +
      • group_ids (Array of strings (group_ids)) – An array of group ids to associate sign-up with.
      • +
      • fields (dictionary) – Optional. Names and values of user-defined fields to update.
      • +
      • signup_form_id (integer) – Optional. Indicate that this member used a +particular signup form. This is important if you +have custom mailings for a particular signup form +and so that signup-based triggers will be fired.
      • +
      • opt_in_subject (string) – Optional. Override the confirmation message +subject with your own copy.
      • +
      • opt_in_message (string) – Optional. Override the confirmation message body +with your own copy. Must include the following +tags: [rsvp_name], [rsvp_email], [opt_in_url], +[opt_out_url].
      • +
      • field_triggers (boolean) – Optional. Fires related field change autoresponders when set to true.
      • +
      • opt_in_confirmation (boolean) – Optional. Sends the default plaintext confirmation email when set to true. NOTE: Confirmation email will be sent by default if this parameter is left out.
      • +
      • subscriber_consent_tracking (boolean) – Optional. Whether or not the user accepts tracking and analysis.
      • +
      Return :

      The member_id of the member, and their status. The status will +be reported as ‘a’ (active), ‘e’ (error), or ‘o’ (optout).

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/members/signup
      +{
      +  "fields": {
      +    "first_name": "Ryan"
      +  },
      +  "group_ids": [
      +    "1",
      +    "2"
      +  ],
      +  "email": "example@myemma.com",
      +  "signup_form_id": 1,
      +  "opt_in_confirmation": true
      +}
      +
      +{
      +  "status": "a",
      +  "member_id": 1024
      +}
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/delete
      +

      Archive an array of members.

      +

      The members will be archived and will be appear in the account's Archived Items section.

      + +++ + + + + + +
      Parameters:
        +
      • member_ids (array) – An array of member ids to delete.
      • +
      +
      Returns :

      True if all members are successfully deleted, otherwise False.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/delete
      +{
      +  "member_ids": [
      +    100,
      +    101
      +  ]
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/status
      +

      Change the status for an array of members.

      +

      The members will have their member_status_id updated.

      + +++ + + + + + +
      Parameters:
        +
      • member_ids (array) – The array of member ids to change.
      • +
      • status_to (string) – The new status for the given members. Accepts one of +‘a’ (active), ‘e’ (error), ‘o’ (optout).
      • +
      +
      Returns :

      True if the members are successfully updated, otherwise +False.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/status
      +{
      +  "member_ids": [
      +    200,
      +    202
      +  ],
      +  "status_to": "e"
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/#member_id
      +

      Update a single member’s information.

      +

      Update the information for an existing member (even if they are marked as deleted). Note that this method allows the email address to be updated (which cannot be done with a POST, since in that case the email address is used to identify the member).

      + +++ + + + + + + + +
      Parameters:
        +
      • email (string) – A new email address for the member.
      • +
      • phone_number (string) – A new phone number for the member.
      • +
      • status_to (string) – A new status for the member. Accepts one of +‘a’ (active), ‘e’ (error), ‘o’ (opt-out).
      • +
      • fields (array) – An array of fields with associated values for this +member.
      • +
      • field_triggers (boolean) – Optional. Fires related field change autoresponders when set to true.
      • +
      • subscriber_consent_tracking (boolean) – Optional. Whether or not the user accepts tracking and analysis.
      • +
      +
      Returns :

      True if the member was updated successfully

      +
      Raises :

      Http404 if no member is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/200
      +{
      +  "fields": {
      +    "first_name": "Ella",
      +    "last_name": "Jones"
      +  },
      +  "email": "ella@myemma.com",
      +  "sms": {
      +    "phone_number": "1234567891"
      +  },
      +  "status_to": "a"
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/members/#member_id
      +

      Archive the specified member.

      +

      The member will be archived and will appear in the account's Archived Items section.

      + +++ + + + + + +
      Returns :True if the member is deleted.
      Raises :Http404 if no member is found.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/members/202
      +
      +true
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/#member_id/groups
      +

      Get the groups to which a member belongs.

      + +++ + + + + + +
      Returns :An array of groups.
      Raises :Http404 if no member is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/200/groups
      +
      +[
      +  {
      +    "active_count": 1,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 1,
      +    "group_type": "g",
      +    "member_group_id": 150,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Monthly Newsletter"
      +  },
      +  {
      +    "active_count": 2,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 151,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Widget Buyers"
      +  },
      +  {
      +    "active_count": 4,
      +    "deleted_at": null,
      +    "error_count": 0,
      +    "optout_count": 0,
      +    "group_type": "g",
      +    "member_group_id": 152,
      +    "purged_at": null,
      +    "account_id": 100,
      +    "group_name": "Special Events"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/#member_id/groups
      +

      Add a single member to one or more groups.

      + +++ + + + + + + + +
      Parameters:
        +
      • group_ids (array) – Group ids to which to add this member.
      • +
      +
      Returns :

      An array of ids of the affected groups.

      +
      Raises :

      Http404 if no member is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/200/groups
      +{
      +  "group_ids": [
      +    150,
      +    151
      +  ]
      +}
      +
      +[
      +  150,
      +  151
      +]
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/#member_id/groups/remove
      +

      Remove a single member from one or more groups.

      + +++ + + + + + + + +
      Parameters:
        +
      • group_ids (array) – Group ids from which to remove this member.
      • +
      +
      Returns :

      An array of references to the affected groups.

      +
      Raises :

      Http404 if no member is found.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/200/groups/remove
      +{
      +  "group_ids": [
      +    151
      +  ]
      +}
      +
      +[
      +  151
      +]
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/members
      +

      Archive all members.

      + +++ + + + + + +
      Parameters:
        +
      • member_status_id (string) – This is ‘a’ (active), ‘o’ (optout), or ‘e’ (error).
      • +
      +
      Returns :

      Returns true.

      +
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/members?member_status_id=a
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/members/#member_id/groups
      +

      Remove the specified member from all groups.

      + +++ + + + + + +
      Returns :True if the member is removed from all groups.
      Raises :Http404 if no member is found.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/members/200/groups
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/groups/remove
      +

      Remove multiple members from groups.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_ids (array) – Member ids to remove from the given groups.
      • +
      • group_ids (array) – Group ids from which to remove the given members.
      • +
      +
      Returns :

      True if the members are deleted, otherwise False.

      +
      Raises :

      Http404 if any of the members or groups do not exist

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/groups/remove
      +{
      +  "group_ids": [
      +    151
      +  ],
      +  "member_ids": [
      +    202
      +  ]
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/#member_id/mailings
      +

      Get the entire mailing history for a member.

      + +++ + + + +
      Returns :Message history details for the specified member.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/200/mailings
      +
      +[
      +  {
      +    "delivery_type": "d",
      +    "clicked": "@D:2011-01-02T11:14:32",
      +    "opened": "@D:2011-01-02T11:13:51",
      +    "mailing_id": 200,
      +    "delivery_ts": "@D:2011-01-02T10:29:36",
      +    "name": "Sample Mailing",
      +    "forwarded": null,
      +    "shared": null,
      +    "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +    "sent": "@D:2011-01-02T10:27:43",
      +    "account_id": 100
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/imports/#import_id/members
      +

      Get a list of members affected by this import.

      + +++ + + + + + +
      Parameters:
        +
      • all (boolean) – Accepts False or 0. Optional flag to return all members imported by this import.
      • +
      • added_only (boolean) – Accepts False or 0. Optional flag to return only members added by this import.
      • +
      • added_to_groups (boolean) – Accepts False or 0. Optional flag to return only members added to a group by this import.
      • +
      +
      Returns :A list of members in the given account and import.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/imports/200/members
      +
      +[
      +  {
      +    "member_id": 200,
      +    "change_type": "a",
      +    "member_status_id": "a",
      +    "email": "emma@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/imports/#import_id
      +

      Get information and statistics about this import.

      + +++ + + + +
      Returns :Import details for the given import_id.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/imports/200
      +
      +{
      +  "import_id": 200,
      +  "account_id": 100,
      +  "import_started": "@D:2010-12-13T23:12:44",
      +  "import_finished": null,
      +  "source_name": null,
      +  "source_filename": null,
      +  "num_members_added": 0,
      +  "num_members_updated": 0,
      +  "num_added_by_group": [],
      +  "num_duplicates": 0,
      +  "num_skipped": 0,
      +  "num_members": 0,
      +  "num_errors": 0,
      +  "groups_updated": [],
      +  "fields_updated": [],
      +  "status": "o", # for okay (or "e" for error, "q" for queued, "p" for in progress),
      +  "error_message": null,
      +  "style": null,
      +  "automated_field_changes": null
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/members/imports
      +

      Get information about all imports for this account.

      + +++ + + + +
      Returns :An array of import details.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/members/imports
      +
      +[
      +
      +]
      +
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/#group_id/copy
      +

      Copy all account members of one or more statuses into a group.

      + +++ + + + + + + + +
      Parameters:
        +
      • member_status_id (array of strings) – ‘a’ (active), ‘o’ (optout), and/or ‘e’ (error).
      • +
      +
      Returns :

      True

      +
      Raises :

      Http404 if the group does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/152/copy
      +{
      +  "member_status_id": [
      +    "a",
      +    "e"
      +  ]
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/members/status/:status_from/to/:status_to
      +
      +
      Update the status for a group of members, based on their current
      +
      status. Valid statuses id are (‘a’,’e’, ‘f’, ‘o’) active, error, +forwarded, optout.
      +
      + +++ + + + + + + + +
      Parameters:
        +
      • group_id – Optional. Limit the update to members of the +specified group
      • +
      +
      Returns :

      True

      +
      Raises :

      Http400 if the specified status is invalid

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/members/status/e/to/a
      +{
      +  "group_id": 1
      +}
      +
      +true
      +
      +
      +

      +
      +
      +
      + POST /#account_id/members/purge
      +
      +

      Purge a list of members

      +

      This will provide compliance with GDPR right to erasure ('right to be forgotten').

      +
      + + + + + + + + + + + +
      Parameters:
        +
      • member_ids (array of integers) – An array of member ids to purge
      • +
      +
      Returns :

      True

      +
      Raises :

      Http400 if the specified status is invalid

      +
      +
      +
      +
      + PUT /#account_id/members/purgeall
      +
      +

      Purge all archived members

      +

      This will provide compliance with GDPR right to erasure ('right to be forgotten').

      +
      + + + + + + + + + + + +
      Parameters:
        +
      • member_status_id (string) – Optional. This is 'a' (active), 'o' (optout), or 'e' (error).
      • +
      • member_group_id (string) – Optional. This is the id of the group
      • +
      +
      Returns :

      True

      +
      Raises :

      Http400 if the specified status is invalid

      +
      +

      +

      +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/response.html b/api/external/response.html new file mode 100644 index 0000000..106d98b --- /dev/null +++ b/api/external/response.html @@ -0,0 +1,1518 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Response

      +

      We know that you want to do some fancy pivot tables with your response +data, so we’ve provided quite a few endpoints here to give you access +to that response data. You can get overview numbers for all of your mailings +and also drill down into finding out the actual members who opened a particular +mailing.

      +
      +
      +GET /#account_id/response
      +

      Get the response summary for an account.

      +

      This method will return a month-based time series of data including +sends, opens, clicks, mailings, forwards, and opt-outs. Test mailings +and forwards are not included in the data returned.

      +
      +
      Returns:
      +

      A list of objects with each object representing one month. Each +object contains:

      +
        +
      • account_id – The account_id for this line of stats
      • +
      • month – two digit integer for month
      • +
      • year – four digit integer for year
      • +
      • mailings – number of mailings sent
      • +
      • sent – number of messages sent
      • +
      • delivered – number of messages delivered
      • +
      • bounced – number of messages that failed delivery due to a hard or soft bounce
      • +
      • opened – number of messages opened
      • +
      • clicked_unique – link clicks, unique on message
      • +
      • clicked – total link clicks, including duplicates
      • +
      • forwarded – times the mailing was forwarded
      • +
      • shared – total times a mailing has been shared
      • +
      • share_clicked – total times a shared mailing has been seen
      • +
      • webview_shared – total times a customer has shared their mailing
      • +
      • webview_share_clicked – total times a customer-shared mailing has been seen
      • +
      • opted_out – people who opted out based on this mailing
      • +
      • signed_up – people who signed up based on this mailing
      • +
      • count_purchased – the total number of orders made
      • +
      • sum_purchased – the total dollar amount of orders
      • +
      +
      +
      + +++ + + + +
      Parameters:
        +
      • include_deleted (boolean) – Accepts 1. All other values are False. +Optional flag to include archived mailings in the list.
      • +
      • range (string) – Accepts 2 dates (YYYY-MM-DD) delimited by a tilde (~). +Example: 2011-04-01~2011-09-01 +Optional argument to limit results to a date range. If one of the +dates is omitted, the default will be either min date or now. If +a single date is provided with no tilde, then only mailings sent +on that date will be included.
      • +
      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response
      +
      +[
      +  {
      +    "count_purchased": 0,
      +    "delivered": 0,
      +    "clicked": 0,
      +    "account_id": 100,
      +    "clicked_unique": 0,
      +    "shared": 0,
      +    "mailings": 0,
      +    "year": 2018,
      +    "month": 4,
      +    "opened": 7,
      +    "opted_out": 0,
      +    "sent": 0,
      +    "signed_up": 0,
      +    "webview_shared": 0,
      +    "share_clicked": 0,
      +    "bounced": 0,
      +    "webview_share_clicked": 0,
      +    "sum_purchased": 0,
      +    "forwarded": 0
      +  },
      +  {
      +    "count_purchased": 0,
      +    "delivered": 0,
      +    "clicked": 0,
      +    "account_id": 100,
      +    "clicked_unique": 0,
      +    "shared": 0,
      +    "mailings": 0,
      +    "year": 2018,
      +    "month": 3,
      +    "opened": 0,
      +    "opted_out": 0,
      +    "sent": 0,
      +    "signed_up": 0,
      +    "webview_shared": 0,
      +    "share_clicked": 0,
      +    "bounced": 0,
      +    "webview_share_clicked": 0,
      +    "sum_purchased": 0,
      +    "forwarded": 0
      +  }
      +]
      +
      +
      +
      +

      +

      +

      +Sample Response +[showhide] +
      +GET /100/response?range=2018-04-01~2018-06-01
      +
      +[
      +  {
      +    "count_purchased": 0,
      +    "delivered": 0,
      +    "clicked": 0,
      +    "account_id": 100,
      +    "clicked_unique": 0,
      +    "shared": 0,
      +    "mailings": 0,
      +    "year": 2018,
      +    "month": 5,
      +    "opened": 0,
      +    "opted_out": 0,
      +    "sent": 0,
      +    "signed_up": 0,
      +    "webview_shared": 0,
      +    "share_clicked": 0,
      +    "bounced": 0,
      +    "webview_share_clicked": 0,
      +    "sum_purchased": 0,
      +    "forwarded": 0
      +  },
      +  {
      +    "count_purchased": 0,
      +    "delivered": 0,
      +    "clicked": 0,
      +    "account_id": 100,
      +    "clicked_unique": 0,
      +    "shared": 0,
      +    "mailings": 0,
      +    "year": 2018,
      +    "month": 4,
      +    "opened": 0,
      +    "opted_out": 0,
      +    "sent": 0,
      +    "signed_up": 0,
      +    "webview_shared": 0,
      +    "share_clicked": 0,
      +    "bounced": 0,
      +    "webview_share_clicked": 0,
      +    "sum_purchased": 0,
      +    "forwarded": 0
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id
      +

      Get the response summary for a particular mailing.

      +

      This method will return the counts of each type of response activity +for a particular mailing.

      +
      +
      Returns:
      +
      A single object with the following fields: +
    • name – name of mailing
    • +
    • subject – subject of the mailing
    • +
    • recipient_count – count of people this mailing was sent to
    • +
    • sent – messages sent
    • +
    • delivered – messages delivered
    • +
    • in_progress – messages still being attempted
    • +
    • bounced – messages that failed delivery due to a hard or soft bounce
    • +
    • opened – messages opened
    • +
    • clicked_unique – link clicks, unique on message
    • +
    • clicked – total link clicks, including duplicates
    • +
    • forwarded – times the mailing was forwarded
    • +
    • opted_out – people who opted out based on this mailing
    • +
    • signed_up – people who signed up based on this mailing
    • +
    • shared – people who shared this mailing
    • +
    • share_clicked – number of clicks shares of this mailing received
    • +
    • webview_shared – number of times the customer has shared
    • +
    • webview_share_clicked – number of clicks customer-shares of this mailing received
    • +
    • count_purchased – the total number of ecommerce orders +(this value will be 0 for accounts not using an ecommerce integration)
    • +
    • sum_purchased – the total dollar amount of all ecommerce orders +(this value will be 0 for accounts not using an ecommerce integration)
    • +
    • purchase_metrics – an object containing purchase metrics if ecommerce integrations are enabled +(this object will be empty for accounts not using an ecommerce integration)
    • +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid mailing type - ‘m’ for +standard mailings, ‘t’ for test mailings, ‘s’ for +subject split test mailings, and ‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200
      +
      +{
      +  "purchase_metrics": {},
      +  "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +  "count_purchased": 0,
      +  "delivered": 0,
      +  "clicked": 0,
      +  "opened": 0,
      +  "webview_shared": 0,
      +  "recipient_count": 0,
      +  "sent": 0,
      +  "clicked_unique": 0,
      +  "webview_share_clicked": 0,
      +  "shared": 0,
      +  "in_progress": 0,
      +  "sum_purchased": 0,
      +  "forwarded": 0,
      +  "name": "Sample Mailing",
      +  "opted_out": 0,
      +  "signed_up": 0,
      +  "share_clicked": 0,
      +  "bounced": 0
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/sends
      +

      Get the list of messages that have been sent to an MTA for delivery.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – time the message was sent
      • +
      • member_id – id of the message addressee
      • +
      • member_since – time member was added to your audience
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the message addressee
      • +
      • email_domain – email domain of the message addressee
      • +
      • member_status_id – addressee's status; a (active), e (error), o (opt out), or f (forward)
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404if the mailing is not valid mailing type - ‘m’ for +standard mailings, ‘t’ for test mailings, ‘s’ for +subject split test mailings, and ‘r’ for +trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/sends
      +
      +[
      +  {
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "timestamp": "@D:2018-01-12T10:27:40",
      +    "member_id": 200,
      +    "member_since": "@D:2017-11-12T11:23:45",
      +    "email_domain": "myemma.com",
      +    "email_user": "emma",
      +    "email": "emma@myemma.com",
      +    "member_status_id": "a"
      +  },
      +  {
      +    "fields": {
      +      "first_name": "Gladys",
      +      "last_name": "Jones",
      +      "favorite_food": "toast"
      +    },
      +    "timestamp": "@D:2018-01-12T10:27:40",
      +    "member_id": 201,
      +    "member_since": "@D:2018-01-03T15:54:13",
      +    "email_domain": "myemma.com",
      +    "email_user": "gladys",
      +    "email": "gladys@myemma.com",
      +    "member_status_id": "o"
      +  },
      +  {
      +    "fields": {
      +
      +    },
      +    "timestamp": "@D:2018-01-12T10:27:43",
      +    "member_id": 204,
      +    "member_since": "@D:2017-12-13T23:12:44",
      +    "email_domain": "myemma.com",
      +    "email_user": "bob",
      +    "email": "bob@myemma.com",
      +    "member_status_id": "e"
      +  },
      +  {
      +    "fields": {
      +      "first_name": "Han",
      +      "last_name": "Smith",
      +      "favorite_food": "chocolate pudding"
      +    },
      +    "timestamp": "@D:2018-01-12T10:27:43",
      +    "member_id": 201,
      +    "member_since": "@D:2018-01-03T15:54:13",
      +    "email_domain": "myemma.com",
      +    "email_user": "gladys",
      +    "email": "gladys@myemma.com",
      +    "member_status_id": "f"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/in_progress
      +

      Get the list of messages that are in the queue, +possibly sent, but not yet delivered.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • member_id – id of the message addressee
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/in_progress
      +
      +[
      +  {
      +    "fields": {
      +      "first_name": "Gladys",
      +      "last_name": "Jones",
      +      "favorite_food": "toast"
      +    },
      +    "member_id": 201,
      +    "member_since": "@D:2011-01-03T15:54:13",
      +    "email_domain": "myemma.com",
      +    "email_user": "gladys",
      +    "email": "gladys@myemma.com",
      +    "member_status_id": "o"
      +  },
      +  {
      +    "fields": {
      +
      +    },
      +    "member_id": 204,
      +    "member_since": "@D:2010-12-13T23:12:44",
      +    "email_domain": "myemma.com",
      +    "email_user": "bob",
      +    "email": "bob@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/deliveries
      +

      Get the list of messages that have finished delivery.

      +

      This will include those that were successfully delivered, as well as +those that failed due to hard or soft bounces.

      +

      This list can be limited by delivery_type.

      + +++ + + + +
      Parameters:
        +
      • delivery_type (string) – Accepted options: ‘all’, ‘delivered’, +‘bounced’, ‘hard’, ‘soft’. Defaults to ‘all’, if not provided.
      • +
      • del_status (string) – Accepted options: ‘all’, ‘delivered’, +‘bounced’, ‘hard’, ‘soft’. Defaults to ‘all’, if not provided.
      • +
      • include_custom_fields (boolean) – flag to include custom member fields (defaults to true).
      • +
      • include_children (boolean) – flag to include child mailings (defaults to true)
      • +
      +
      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – time the message was delivered
      • +
      • delivery_type – delivery outcome: delivered, hard, (bounce), or soft (bounce)
      • +
      • member_id – id of the message addressee
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/deliveries
      +
      +[
      +  {
      +    "delivery_type": "delivered",
      +    "email_domain": "myemma.com",
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "mailing_id": 200,
      +    "timestamp": "@D:2011-01-02T10:29:36",
      +    "member_id": 200,
      +    "member_status_id": "a",
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "mailing_name": "Sample Mailing",
      +    "email_user": "emma",
      +    "email": "emma@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/opens
      +

      Get the list of opened messages for this campaign.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – time the message was opened
      • +
      • member_id – id of the message addressee
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/opens
      +
      +[
      +  {
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "timestamp": "@D:2011-01-02T11:13:51",
      +    "member_id": 200,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "email_domain": "myemma.com",
      +    "email_user": "emma",
      +    "email": "emma@myemma.com",
      +    "member_status_id": "a"
      +  },
      +  {
      +    "fields": {
      +
      +    },
      +    "timestamp": "@D:2011-01-02T13:55:51",
      +    "member_id": 204,
      +    "member_since": "@D:2010-12-13T23:12:44",
      +    "email_domain": "myemma.com",
      +    "email_user": "bob",
      +    "email": "bob@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/opens/#member_id
      +

      Determine if the specified member opened the mailing.

      +
      +
      Returns:
      +

      True or False depending on if the member opened the specified mailing

      +
      + +
      + +

      Get the list of links for this mailing.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • link_id – If the mailing is not a trigger, the individual id of the link will be included
      • +
      • link_order – order of the link in the mailing
      • +
      • link_name – friendly name for the link
      • +
      • link_target – link URL
      • +
      • plaintext – boolean, is the link plaintext
      • +
      • unique_clicks – clicks on the link, unique per message
      • +
      • total_clicks – clicks on the link, total
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/links
      +
      +[
      +  {
      +    "link_order": 1,
      +    "link_name": "Emma",
      +    "unique_clicks": 1,
      +    "plaintext": false,
      +    "link_target": "http://www.myemma.com",
      +    "total_clicks": 1,
      +    "link_id": 200
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/clicks
      +

      Get the list of clicks for this mailing.

      +

      This list can also be limited by member_id or link_id.

      + +++ + + + +
      Parameters:
        +
      • member_id (int) – Limits results to a single member.
      • +
      • link_id (int) – Limits results to a single link.
      • +
      • include_custom_fields (boolean) – flag to include custom member fields (defaults to true).
      • +
      • include_children (boolean) – flag to include child mailings (defaults to true).
      • +
      +
      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • link_id – id of the clicked link
      • +
      • timestamp – time the link was clicked
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/clicks
      +
      +[
      +  {
      +    "link_id": 200,
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "timestamp": "@D:2011-01-02T11:14:32",
      +    "member_id": 200,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "email_domain": "myemma.com",
      +    "email_user": "emma",
      +    "email": "emma@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/clicks/#member_id
      +

      Get the list of clicks for this mailing for the specified member.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • link_id – id of the clicked link
      • +
      • link_name – name of the link
      • +
      • link_target – link url
      • +
      • plaintext – bool, is link plaintext
      • +
      • timestamp – timestamp when link was clicked
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/clicks/300
      +
      +[
      +  {
      +    "plaintext": false,
      +    "timestamp": "@D:2018-09-12T15:22:03",
      +    "link_name": "Emma",
      +    "link_target": "http://www.myemma.com",
      +    "link_id": 400
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/forwards
      +

      Get the list of forwards for this mailing.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – time the mailing was forwarded
      • +
      • forward_mailing_id – id of the new mailing created to send the forward
      • +
      • member_id – id of the forwarding member
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/forwards
      +
      +[
      +  {
      +    "forward_mailing_id": 401,
      +    "fields": {},
      +    "timestamp": "@D:2018-05-02T14:35:38",
      +    "member_id": 300,
      +    "member_since": "@D:2017-01-04T08:40:06",
      +    "email_domain": "myemma.com",
      +    "email_user": "susansmith",
      +    "email": "susansmit@myemma.com",
      +    "member_status_id": "a"
      +  },
      +  {
      +    "forward_mailing_id": 400,
      +    "fields": {},
      +    "timestamp": "@D:2018-05-02T14:41:16",
      +    "member_id": 500,
      +    "member_since": "@D:2018-01-03T09:33:24",
      +    "email_domain": "myemma.com",
      +    "email_user": "janedoe",
      +    "email": "janedoe@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/optouts
      +

      Get the list of optouts for this mailing.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – time of the optout
      • +
      • member_id – id of the opted out member
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/optouts
      +
      +[
      +  {
      +    "fields": {},
      +    "timestamp": "@D:2011-01-02T13:56:16",
      +    "member_id": 204,
      +    "member_since": "@D:2010-12-13T23:12:44",
      +    "email_domain": "myemma.com",
      +    "email_user": "bob",
      +    "email": "bob@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/signups
      +

      Get the list of signups for this mailing.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • member_id – id of the signed up member
      • +
      • timestamp – time of the signup
      • +
      • ref_member_id – id of the referring member
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/signups
      +
      +[
      +  {
      +    "ref_member_id": 200,
      +    "mailing_mailing_id": 200,
      +    "fields": {},
      +    "timestamp": "@D:2011-01-05T15:28:11",
      +    "member_id": 205,
      +    "member_since": "@D:2011-01-05T15:28:11",
      +    "email_domain": "myemma.com",
      +    "email_user": "newbie",
      +    "email": "newbie@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/response/#mailing_id/shares
      +

      Get the list of shares for this mailing

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • member_id – id of the shared message
      • +
      • network – name of the network the share happened on
      • +
      • share_clicks – number of clicks that the shared link received
      • +
      • email – email of the message addressee
      • +
      • email_user – email user of the addressee
      • +
      • email_domain – email domain of the addressee
      • +
      • member_since – date member was added to audience
      • +
      • member_status_id – status of the member
      • +
      • fields – member field object
      • +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/shares
      +
      +[
      +  {
      +    "network": "email",
      +    "share_clicks": 0,
      +    "fields": {},
      +    "timestamp": "@D:2018-05-02T14:35:25",
      +    "member_id": 123,
      +    "member_since": "@D:2017-01-04T08:40:06",
      +    "email_domain": "myemma.com",
      +    "email_user": "johnsmith",
      +    "email": "johnsmith@myemma.com",
      +    "member_status_id": "a"
      +  },
      +  {
      +    "network": "email",
      +    "share_clicks": 0,
      +    "fields": {},
      +    "timestamp": "@D:2018-05-02T14:40:38",
      +    "member_id": 456,
      +    "member_since": "@D:2018-01-03T09:33:24",
      +    "email_domain": "myemma.com",
      +    "email_user": "someone",
      +    "email": "someone@myemma.com",
      +    "member_status_id": "a"
      +  }
      +]
      +
      +
      +
      +

      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +
      + +
      +
      +GET /#account_id/response/#mailing_id/customer_shares
      +

      Get the list of customer shares for this mailing

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – timestamp of the shared link click
      • +
      • network – name of the network the share happened on
      • +
      • customer_shares – number of shares
      • +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/customer_shares
      +
      +[
      +  {
      +    "timestamp": "@D:2017-05-25T16:00:00",
      +    "customer_shares": 0,
      +    "network": "facebook"
      +  }
      +]
      +
      +
      +
      +

      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +
      + +
      +
      +GET /#account_id/response/#mailing_id/customer_share_clicks
      +

      Get the list of customer share clicks for this mailing

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • timestamp – timestamp of the shared link click
      • +
      • network – name of the network the share happened on
      • +
      • customer_share_clicks – number of clicks that the shared link received
      • +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/customer_share_clicks
      +
      +[
      +  {
      +    "timestamp": "@D:2017-05-25T16:00:03",
      +    "network": "facebook",
      +    "customer_share_clicks": 1
      +  },
      +  {
      +    "timestamp": "@D:2017-05-25T16:00:15",
      +    "network": "facebook",
      +    "customer_share_clicks": 1
      +  }
      +]
      +
      +
      +
      +

      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +
      + +
      +
      +GET /#account_id/response/#share_id/customer_share
      +

      Get the customer share associated with the share id.

      +
      +
      Returns:
      +

      An object with the following fields:

      +
        +
      • timestamp – timestamp of the share
      • +
      • network – name of the network the share happened on
      • +
      • share_status – status of the share
      • +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/300/customer_share
      +
      +{
      +  "timestamp": "@D:2018-02-17T08:33:23",
      +  "network": "facebook",
      +  "share_status": "c"
      +}
      +
      +
      +
      +

      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid +mailing type - ‘m’ for standard mailings, ‘t’ for test mailings, ‘s’ for subject split test mailings, and +‘r’ for trigger mailings.
      +
      + +
      +
      +PUT /#account_id/response/#mailing_id/customer_share_status
      +

      Update a customer share status.

      +
      + +++ + + + +
      Parameters:
        +
      • status_to (str) – The status to which you want to change the customer share. Options include: +x - mailing has been cancelled, share was not posted. +c - share has been successfully posted. +r - network access has been revoked. +
      • +
      • share_id (int) – The id of the share you want to update.
      • +
      +
      +
      Returns:
      +

      The updated status of the customer share.

      +
      +
      + +++ + + + + + +
      Raises:Http404 if the customer share does not exist.
      Raises:Http404 if the mailing does not exist
      +
      + +
      +
      +GET /#account_id/response/#mailing_id/shares/overview
      +

      Get overview of shares pertaining to this mailing_id.

      +
      +
      Returns:
      +

      An array of objects with the following fields:

      +
        +
      • network – name of the network the share happened on
      • +
      • share_clicks – number of clicks that the shared link received
      • +
      • share_count – number of shares to that network
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not valid
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/shares/overview
      +
      +[
      +  {
      +    "share_count": 0,
      +    "share_clicks": 0,
      +    "network": "email"
      +  },
      +  {
      +    "share_count": 0,
      +    "share_clicks": 0,
      +    "network": "linkedin"
      +  },
      +  {
      +    "share_count": 0,
      +    "share_clicks": 0,
      +    "network": "twitter"
      +  }
      +]
      +
      +
      +
      +

      +
      +
      + +
      +
      +GET /#account_id/response/#mailing_id/split_test_info
      +

      Get information about the split test for the given parent mailing_id.

      +
      +
      Returns:
      +

      An object with the following attributes:

      +
        +
      • test_in_progress – boolean indicating whether the test is still underway
      • +
      • autosend_on – boolean indicating whether the test will (or did) autosend on completion
      • +
      • autosend_time – timestamp when the test will (or did) autosend. If autosend_on is false, this will be null
      • +
      • num_test_recipients – number of recipients that received a test message
      • +
      • test_started_ts – the timestamp of when the test started
      • +
      • test_ended_ts – the timetamp of when the test ended
      • +
      • winner_auto – the mailing id that was automatically determined to be the winner
      • +
      • winner_manual – the mailing id that was manually chosen as the winner
      • +
      • responses – an array of objects with the same fields as those returned by get_response_overview, plus: +
        variant – - an identifier for the variant this is the response data for. It will be 'a' 'b' or 'c'.
        +
        opened_pct – - the percentage of sent emails that were opened
        +
        clicked_pct – - the percentage of sent emails that were clicked
        +
        shared_pct – - the percentge of opened emails that were shared
        +
        signed_up_pct – - the percentage of opened emails that had signups
        +
        opted_out_pct – - the percentage of delivered emails that had optouts
        +
        winner – - if present, indicates that this variant was the winner
        +
        subject – - the subject of the given variant
        +
      • +
      +
      +
      + +++ + + + + + +
      Raises:Http404 if the mailing does not exist.
      Raises:Http404 if the mailing is not a split_test parent mailing
      +

      +

      +Sample Response +[showhide] +
      +GET /100/response/200/split_test_info
      +
      +{
      +  "test_started_ts": "@D:2018-09-10T08:52:27",
      +  "autosend_time": "@D:2018-09-10T09:52:27",
      +  "responses": [
      +    {
      +      "clicked_pct": 0,
      +      "delivered": 0,
      +      "opened_pct": 00.0,
      +      "clicked": 0,
      +      "opened": 0,
      +      "clicked_unique": 0,
      +      "opted_out_pct": 0,
      +      "mailing_id": 300,
      +      "is_winner": true,
      +      "variant": "a",
      +      "subject": "A",
      +      "opted_out": 0,
      +      "signed_up_pct": 0,
      +      "signed_up": 0,
      +      "shared": 0,
      +      "share_clicked": 0,
      +      "bounced": 0,
      +      "shared_pct": 0,
      +      "sent": 0,
      +      "forwarded": 0
      +    },
      +    {
      +      "clicked_pct": 0,
      +      "delivered": 0,
      +      "opened_pct": 0,
      +      "clicked": 0,
      +      "opened": 0,
      +      "clicked_unique": 0,
      +      "opted_out_pct": 0,
      +      "mailing_id": 400,
      +      "is_winner": false,
      +      "variant": "b",
      +      "subject": "B",
      +      "opted_out": 0,
      +      "signed_up_pct": 0,
      +      "signed_up": 0,
      +      "shared": 0,
      +      "share_clicked": 0,
      +      "bounced": 0,
      +      "shared_pct": 0,
      +      "sent": 0,
      +      "forwarded": 0
      +    }
      +  ],
      +  "test_in_progress": false,
      +  "test_ended_ts": "@D:2018-09-10T09:53:04",
      +  "winner_manual": null,
      +  "autosend_on": true,
      +  "winner_auto": 300,
      +  "num_test_recipients": 0
      +}
      +
      +
      +
      +

      +
      + + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/response_exports.html b/api/external/response_exports.html new file mode 100644 index 0000000..4bf2182 --- /dev/null +++ b/api/external/response_exports.html @@ -0,0 +1,343 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Response Exports

      +

      These endpoints allow you to create and interact with exports of response data in your account. Please note that these endpoints only provide information about response exports created using this API and will not return information or files related to response exports generated via Emma's UI.

      +
      +
      +POST /#account_id/exports/response
      +

      Create a response export. If no criteria is specified, the export created will contain response data for all mailings in the account from the last 30 days.

      + +++ + + + + + + +
      Supported criteria:
        +
      • include_fields (boolean, list of strings) – Defaults to false. If true, export will include all member fields in the account. If list of strings, export will include all member fields by shortcut_name that exist in the account.
      • +
      • mailing_ids (array of integers) - Defaults to empty list. If no mailing_ids are specified, the last 50 mailings ordered by send_started (most recently sent mailings) will be included in the export. The maximum number of mailing_ids supported is 50.
      • +
      • from_date (datetime) - Defaults to none. Exports response data starting from the date specified, and cannot be farther back than the previous 18 months. If paired with to_date, the export will be rejected if the total time period is greater than 90 days. If mailing_ids are provided, the time period is not restricted.
      • +
      • to_date (datetime) - Defaults to none. Limits the response data exported up to the specified date. If paired with from_date, the export will be rejected if the total time period is greater than 90 days.
      • +
      +
      Returns:

      An export ID.

      +
      Raises:Http400 if time between from_date and to_date is greater than 90 days or if more than 50 mailing_ids are requested.
      +

      +

      +Sample Response +[showhide] +
      +POST /100/exports/response
      +
      +{
      +    "criteria": {
      +        "mailing_ids": [1234],
      +        "from_date": "2021-02-01",
      +        "to_date": "2021-02-17"
      +    }
      +}
      +
      +{
      +    "export_id: 200"
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/exports/response
      +

      Get a list of response exports.

      + +++ + + + +
      Returns:A detailed list of response exports for an account.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/exports/response
      +
      +[
      +    {
      +        "account_id": 100,
      +        "completed_at": "2021-02-08T23:11:35.746244+00:00",
      +        "created_at": "2021-02-08T23:11:33.463881+00:00",
      +        "criteria": {
      +            "from_date": "2021-01-10T00:00:00+00:00",
      +            "include_fields": false,
      +            "mailing_ids": [],
      +            "to_date": "2021-02-10T00:00:00+00:00"
      +        },
      +        "export_id": 200,
      +        "export_name": "response_export_2021-02-08_23:11",
      +        "export_type": "r",
      +        "status": "o",
      +        "user_id": null
      +    },
      +    {
      +        "account_id": 100,
      +        "completed_at": "2021-02-08T22:10:41.846488+00:00",
      +        "created_at": "2021-02-08T22:10:39.473941+00:00",
      +        "criteria": {
      +            "from_date": "2021-02-01T00:00:00+00:00",
      +            "include_fields": false,
      +            "mailing_ids": [],
      +            "to_date": "2021-02-15T00:00:00+00:00"
      +        },
      +        "export_id": 300,
      +        "export_name": "response_export_2021-02-08_22:10",
      +        "export_type": "r",
      +        "status": "o",
      +        "user_id": null
      +    }
      +]
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/exports/response/#export_id
      +

      Get details about a specific response export.

      + +++ + + + + + +
      Returns:Information about the specified response export, including export criteria and date the export was created.
      Raises:Http404 if no response export with the specified ID is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/exports/response/200
      +
      +{
      +    "account_id": 100,
      +    "completed_at": "2021-02-08T23:11:35.746244+00:00",
      +    "created_at": "2021-02-08T23:11:33.463881+00:00",
      +    "criteria": {
      +        "from_date": "2021-01-10T00:00:00+00:00",
      +        "include_fields": false,
      +        "mailing_ids": [],
      +        "to_date": "2021-02-10T00:00:00+00:00"
      +    },
      +    "export_id": 200,
      +    "export_name": "response_export_2021-02-08_23:11",
      +    "export_type": "r",
      +    "status": "o",
      +    "user_id": "abcdefg"
      +}
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/exports/response/#export_id/download
      +

      Download a file stream for the requested response export.

      + +++ + + + + + +
      Returns:A zip file stream containing the following files in CSV format: +
        +
      • #export_id_bounces.csv
      • +
      • #export_id_clicks.csv (includes link_id, and link_name if specified)
      • +
      • #export_id_in_progress.csv (no timestamp included)
      • +
      • #export_id_opens.csv
      • +
      • #export_id_optout.csv
      • +
      • #export_id_received.csv
      • +
      • #export_id_sent_to.csv
      • +
      • #export_id_shares.csv
      • +
      • #export_id_signups.csv
      • +
      +
      Raises:Http404 if no response export with the specified ID is found.
      +

      +

      +Sample Response +[showhide] +
      +POST /100/exports/response/200/download
      +
      +mailing_id,timestamp (in UTC),email,member_id,member_since,plaintext_preferred,bounce_count,status-name,last_modified_at,(member fields if set to 'true' in response export criteria)
      +
      +
      +

      +
      +
      +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/searches.html b/api/external/searches.html new file mode 100644 index 0000000..5c0f175 --- /dev/null +++ b/api/external/searches.html @@ -0,0 +1,523 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Searches

      +

      These endpoints allow you to create, edit, and delete searches. You can also +retrieve the members matching any search created in your account. You can +get more details on how to construct searches.

      +
      +
      +GET /#account_id/searches
      +

      Retrieve a list of saved searches.

      + +++ + + + + + +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include +deleted searches.
      • +
      +
      Returns :

      An array of searches.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/searches
      +
      +[
      +  {
      +    "search_id": 200,
      +    "optout_count": 0,
      +    "error_count": 0,
      +    "name": "Test Search",
      +    "criteria": "[\"or\", [\"group\", \"eq\", \"Monthly Newsletter\"],[\"group\", \"eq\", \"Widget Buyers\"]]",
      +    "deleted_at": null,
      +    "purged_at": null,
      +    "last_run_at": null,
      +    "active_count": 0,
      +    "account_id": 100
      +  },
      +  {
      +    "search_id": 201,
      +    "optout_count": 0,
      +    "error_count": 0,
      +    "name": "Second Test Search",
      +    "criteria": "[\"group\", \"eq\", \"Special Events\"]",
      +    "deleted_at": null,
      +    "purged_at": null,
      +    "last_run_at": null,
      +    "active_count": 0,
      +    "account_id": 100
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/searches/#search_id
      +

      Get the details for a saved search.

      + +++ + + + + + + + +
      Returns :

      A search.

      +
      Parameters:
        +
      • deleted (boolean) – Accepts True or 1. Optional flag to include +deleted searches.
      • +
      +
      Raises :

      Http404 if the search does not exist.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/searches/200
      +
      +{
      +  "search_id": 200,
      +  "optout_count": 0,
      +  "error_count": 0,
      +  "name": "Test Search",
      +  "criteria": "[\"or\", [\"group\", \"eq\", \"Monthly Newsletter\"],[\"group\", \"eq\", \"Widget Buyers\"]]",
      +  "deleted_at": null,
      +  "purged_at": null,
      +  "last_run_at": null,
      +  "active_count": 0,
      +  "account_id": 100
      +}
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/searches
      +

      Create a saved search.

      +

      The detail of a search is specified in a JSON structure that describes +the clauses to be applied using groups of filter type, operator +and value. Where the filter type is member_field, the +referenced field should be specified by joining with a colon. For +example:

      +
      ["and",
      +    ["or",
      +        ["group", "eq", "my list"],
      +        ["group", "contains", "old"]
      +    ],
      +    ["not", ["member_field", "soup", "eq", "lentil"]],
      +    ["opened", 123249, "between", "2011-01-22, 2011-01-31"],
      +    ["clicked", 83927]
      +]
      +
      +
      +

      The following parameters are required:

      + +++ + + + + + + + +
      Parameters:
        +
      • criteria (array) – A combination of search conditions, as described +above.
      • +
      • name (string) – A name used to describe this search.
      • +
      +
      Returns :

      The ID of the new search

      +
      Raises :

      Http400 if the search is invalid

      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/searches
      +{
      +  "name": "New Search",
      +  "criteria": [
      +    "or",
      +    [
      +      "group",
      +      "eq",
      +      "Monthly Newsletter"
      +    ],
      +    [
      +      "group",
      +      "eq",
      +      "Widget Buyers"
      +    ]
      +  ]
      +}
      +
      +1024
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/searches/#search_id
      +

      Update a saved search.

      +

      No parameters are required, but either the name or criteria +parameter must be present for an update to occur.

      + +++ + + + + + + + + + +
      Parameters:
        +
      • criteria (array) – A combination of search conditions, as described +above (see create_search).
      • +
      • name (string) – A name used to describe this search.
      • +
      +
      Returns :

      True if the update was successful

      +
      Raises :

      Http404 if the search does not exist.

      +
      Raises :

      Http400 if the search criteria is invalid

      +
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/searches/200
      +{
      +  "criteria": [
      +    "or",
      +    [
      +      "group",
      +      "eq",
      +      "Monthly Newsletter"
      +    ],
      +    [
      +      "group",
      +      "eq",
      +      "Special Events"
      +    ]
      +  ]
      +}
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/searches/#search_id
      +

      Delete a saved search. The member records referred to by the search +are not affected.

      + +++ + + + + + +
      Returns :True if the search is deleted.
      Raises :Http404 if the search does not exist.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/searches/200
      +
      +true
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/searches/#search_id/members
      +

      Get the members matching the search.

      + +++ + + + + + +
      Returns :An array of members.
      Raises :Http404 if the search does not exist.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/searches/201/members
      +
      +[
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Emma",
      +      "last_name": "Smith",
      +      "favorite_food": "tacos"
      +    },
      +    "member_id": 200,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T11:23:45",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "emma@myemma.com"
      +  },
      +  {
      +    "status": "opt-out",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Gladys",
      +      "last_name": "Jones",
      +      "favorite_food": "toast"
      +    },
      +    "member_id": 201,
      +    "last_modified_at": null,
      +    "member_status_id": "o",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2011-01-03T15:54:13",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "gladys@myemma.com"
      +  },
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +      "first_name": "Tony",
      +      "last_name": "Brown",
      +      "favorite_food": "pizza"
      +    },
      +    "member_id": 202,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-11-12T09:12:33",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "tony@myemma.com"
      +  },
      +  {
      +    "status": "active",
      +    "confirmed_opt_in": null,
      +    "account_id": 100,
      +    "fields": {
      +
      +    },
      +    "member_id": 204,
      +    "last_modified_at": null,
      +    "member_status_id": "a",
      +    "plaintext_preferred": false,
      +    "email_error": null,
      +    "member_since": "@D:2010-12-13T23:12:44",
      +    "bounce_count": 0,
      +    "deleted_at": null,
      +    "email": "bob@myemma.com"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/api/external/signup_forms.html b/api/external/signup_forms.html new file mode 100644 index 0000000..93ebaa3 --- /dev/null +++ b/api/external/signup_forms.html @@ -0,0 +1,194 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Signup Forms

      +

      With this endpoint, you can list all of your signup forms.

      +
      +
      + GET /#account_id/signup_forms
      +

      Gets a list of this account’s signup forms.

      + + + + + + + +
      Returns :

      An array of signup forms.

      +
      +

      +

      + Sample Response + [showhide] +
      +GET /100/signup_forms
      +
      +[
      +  {
      +    "id": 200,
      +    "name": "Your Default Signup Form"
      +  },
      +  {
      +    "id": 201,
      +    "name": "My First Signup Form"
      +  }
      +
      +]
      +
      +
      +
      +

      +
      + + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/api/external/sms.html b/api/external/sms.html new file mode 100644 index 0000000..b5fa8cb --- /dev/null +++ b/api/external/sms.html @@ -0,0 +1,406 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      SMS

      +

      These endpoints allow for users to get information about their sms campaigns.

      +
      +
      + GET /#account_id/sms/campaigns
      +

      Get sms campaigns for account.

      +

      This endpoint will return a list of sms campaigns for the account ID.

      + + + + + + + +
      Returns :A response with a list of of campaigns for the given account ID.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/sms/campaigns
      +[
      +    {
      +        "account_id": 100,
      +        "archived_at": null,
      +        "bounces": 0,
      +        "canceled_by_user_id": null,
      +        "copied_from_sms_campaign_id": null,
      +        "created_at": "2023-09-05T16:22:17.738757+00:00",
      +        "deliveries": 0,
      +        "from_phone_number": "+12345678910",
      +        "is_promotional": true,
      +        "is_test": false,
      +        "media_url": null,
      +        "message": "Hi this is a test",
      +        "message_segments": 0,
      +        "opt_outs": 0,
      +        "pending_at": null,
      +        "recipients": {
      +            "groups": [
      +                1234
      +            ],
      +            "members": [],
      +            "segments": [],
      +            "suppression_segments": []
      +        },
      +        "results_message": null,
      +        "scheduled_at": null,
      +        "scheduled_by_user_id": null,
      +        "send_finished": null,
      +        "send_started": null,
      +        "send_status": "d",
      +        "shorten_links": false,
      +        "sms_campaign_id": 123,
      +        "sms_campaign_name": "Test SMS Campaign",
      +        "sms_campaign_type": "m",
      +        "total_clicks": 0,
      +        "total_sent": 0,
      +        "unique_clicks": 0,
      +        "updated_at": "2023-09-05T16:23:43.498598+00:00"
      +    }
      +]
      +                                
      +
      +
      +
      +
      +
      + GET /#account_id/sms/campaigns/#campaign_id
      +

      Get specific sms campaign.

      +

      This endpoint will return a campaign for the account that matches the given campaign ID.

      + + + + + + + + + +
      Returns :A response with a campaign for a specified campaign ID.
      Raises :Http404 if the given campaign id for that account does not exist.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/sms/campaigns/123
      +{
      +    "account_id": 100,
      +    "archived_at": null,
      +    "bounces": 0,
      +    "canceled_by_user_id": null,
      +    "copied_from_sms_campaign_id": null,
      +    "created_at": "2023-09-05T16:22:17.738757+00:00",
      +    "deliveries": 2,
      +    "from_phone_number": "+12345678910",
      +    "is_promotional": true,
      +    "is_test": false,
      +    "media_url": null,
      +    "message": "Hi this is a test",
      +    "message_segments": 0,
      +    "opt_outs": 0,
      +    "pending_at": null,
      +    "recipients": {
      +        "groups": [
      +            1234
      +        ],
      +        "members": [],
      +        "segments": [],
      +        "suppression_segments": []
      +    },
      +    "results_message": null,
      +    "scheduled_at": null,
      +    "scheduled_by_user_id": null,
      +    "send_finished": null,
      +    "send_started": null,
      +    "send_status": "d",
      +    "shorten_links": false,
      +    "sms_campaign_id": 123,
      +    "sms_campaign_name": "Test SMS Campaign",
      +    "sms_campaign_type": "m",
      +    "total_clicks": 0,
      +    "total_sent": 0,
      +    "unique_clicks": 0,
      +    "updated_at": "2023-09-05T16:23:43.498598+00:00"
      +}
      +                                
      +
      +
      +
      +
      +
      + GET /#account_id/sms/campaigns/#campaign_id/deliveries
      +

      Get a list of deliveries for an sms campaign.

      +

      This endpoint will return a list of deliveries for the given campaign ID.

      + + + + + + + + + +
      Returns :A response with a list of deliveries for a specified campaign ID.
      Raises :Http404 if the given campaign id for that account does not exist.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/sms/campaigns/123/deliveries
      +[
      +    {
      +        "account_id": 100,
      +        "bounce_type": null,
      +        "delivery_type": "d",
      +        "from_phone_number": "+12345678910",
      +        "member_id": 110,
      +        "opted_out_at": null,
      +        "sms_campaign_id": 123,
      +        "to_phone_number": "+11098765432"
      +    },
      +    {
      +        "account_id": 100,
      +        "bounce_type": null,
      +        "delivery_type": "d",
      +        "from_phone_number": "+12345678910",
      +        "member_id": 111,
      +        "opted_out_at": null,
      +        "sms_campaign_id": 123,
      +        "to_phone_number": "+11098765433"
      +    }
      +]
      +                                
      +
      +
      +
      +
      +
      + GET /#account_id/sms/campaigns/#campaign_id/clicks
      +

      Get a list of clicks for an sms campaign.

      +

      This endpoint will return a list of clicks for the given campaign ID.

      + + + + + + + + + +
      Returns :A response with a list of clicks for a specified campaign ID.
      Raises :Http404 if the given campaign id for that account does not exist.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/sms/campaigns/123/clicks
      +[
      +    {
      +        "click_timestamp": "2023-03-31T18:19:28.547464+00:00",
      +        "member_id": 110,
      +        "sms_campaign_id": 123,
      +        "sms_link_id": 43,
      +        "sms_link_target": "http://www.meetmarigold.com",
      +        "to_phone_number": "+11098765432"
      +    },
      +    {
      +        "click_timestamp": "2023-03-31T18:19:22.383613+00:00",
      +        "member_id": 111,
      +        "sms_campaign_id": 123,
      +        "sms_link_id": 43,
      +        "sms_link_target": "http://www.meetmarigold.com",
      +        "to_phone_number": "+11098765433"
      +    }
      +]
      +                                
      +
      +
      +
      +
      +
      + GET /#account_id/sms/billing/credit_usage
      +

      Get sms credit usage for account.

      +

      This endpoint will return the credit usage for the account ID. You must specify query parameters 'from_date' and 'to_date'. The returned credit usage is inclusive of the 'from_date' and exclusive of the 'to_date'. The dates are based in the UTC timezone.

      + + + + + + + + + +
      Parameters:
        +
      • from_date (string) – Required. The start date of the requested credit usage in ISO format (YYYY-MM-DD)
      • +
      • to_date (string) – Required. The end date of the requested credit usage in ISO format (YYYY-MM-DD)
      • +
      +
      Returns :A response with an integer that is the credit usage for the given account ID.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/sms/billing/credit_usage?from_date=2023-03-22&to_date=2024-01-29
      +123
      +                                
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/subscriptions.html b/api/external/subscriptions.html new file mode 100644 index 0000000..620b371 --- /dev/null +++ b/api/external/subscriptions.html @@ -0,0 +1,518 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Subscriptions

      +

      Using these endpoints you can create, edit, delete and get information about subscriptions in your account.

      +
      +
      +GET /#account_id/subscriptions
      +

      Get a list of all subscriptions in an account.

      + +++ + + + + + +
      Parameters:
        +
      • deleted_only – true or false. Returns deleted subscriptions only. Optional, defaults to false.
      • +
      • include_deleted – true or false. Returns deleted subscriptions along with active. Optional, defaults to false.
      • +
      +
      Returns:

      A list of subscriptions in an account along with related information, including member count and subscription ID.

      +
      +

      +

      +Sample Response +[showhide] +
      +GET /100/subscriptions
      +
      +[
      +  {
      +    "account_id": 100,
      +    "created_at": "Mon, 01 Apr 2019 18:40:58 GMT",
      +    "deleted_at": null,
      +    "description": "Company updates and news",
      +    "import_status": null,
      +    "member_count": 984,
      +    "modified_at": "Mon, 01 Apr 2019 18:40:58 GMT",
      +    "optout_count": 1,
      +    "purged_at": null,
      +    "settings": {
      +      "show_on_default_preference_form": true
      +    },
      +    "subscription_id": 1,
      +    "subscription_name": "General News",
      +    "subscription_order": 1
      +  }
      +]
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/subscriptions/subscription_id
      +

      Get detailed information for a specific subscription.

      + +++ + + + +
      Returns:Information about a subscription.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/subscriptions/200
      +
      +{
      +    "account_id": 100,
      +    "created_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +    "deleted_at": null,
      +    "description": "Regularly donate $1,500 or more.",
      +    "member_count": 0,
      +    "modified_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +    "optout_count": 0,
      +    "purged_at": null,
      +    "settings": null,
      +    "subscription_id": 200,
      +    "subscription_name": "Gold-Level Donors",
      +    "subscription_order": null
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/subscriptions/#subscription_id/members
      +

      Get a list of member IDs for members subscribed to a specific subscription.

      + +++ + + + + + +
      Parameters:
        +
      • start – Defaults to 0 if not specified.
      • +
      • end – Defaults to 500 if not specified.
      • +
      +
      Returns:A list of member IDs.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/subscriptions/200/members
      +
      +[
      +  {
      +    "member_id": 1
      +  },
      +  {
      +    "member_id": 2
      +  },
      +  {
      +    "member_id": 3
      +  },
      +  {
      +    "member_id": 4
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/subscriptions/#subscription_id/optouts
      +

      Get a list of member IDs for members who have opted out of a specific subscription.

      + +++ + + + + + +
      Parameters:
        +
      • start – Defaults to 0 if not specified.
      • +
      • end – Defaults to 500 if not specified.
      • +
      +
      Returns:A list of member IDs.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/subscriptions/200/optouts
      +
      +[
      +    {
      +        "member_id": 5
      +    },
      +    {
      +        "member_id": 6
      +    },
      +    {
      +        "member_id": 7
      +    },
      +    {
      +        "member_id": 8
      +    }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/subscriptions
      +

      Create a subscription.

      + +++ + + + + + +
      Parameters:
        +
      • name (string) – Required. Names the subscription, and will be visible in the Subscription Center.
      • +
      • description (string) – Describes the subscription, and will be visible in the Subscription Center. +
      • +
      +
      Returns:

      Information about the created subscription, including the subscription ID.

      +
      +

      +

      + Sample Response + [showhide] +
      +    POST /100/subscriptions
      +
      +    {
      +        "name": "Cat Fanatics",
      +        "description": "Cat-only newsletter subscribers"
      +    }
      +
      +    {
      +        "account_id": 100,
      +        "created_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +        "deleted_at": null,
      +        "description": "Cat-only newsletter subscribers",
      +        "member_count": 0,
      +        "modified_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +        "optout_count": 0,
      +        "purged_at": null,
      +        "settings": null,
      +        "subscription_id": 300,
      +        "subscription_name": "Cat Fanatics",
      +        "subscription_order": null
      +    }
      +    
      +
      +

      +
      + +
      +
      + POST /#account_id/subscriptions/#subscription_id/members/bulk
      +

      Bulk subscribe members to a subscription using either a list of member IDs or a single import ID.

      + + + + + + + +
      Returns:True if successful.
      +

      +

      + Sample Response + [showhide] +
      +        POST /100/subscriptions/200/members/bulk
      +        {
      +            "member_ids": [1, 2, 3, 4]
      +        }
      +
      +        true
      +    
      +
      +

      + +

      +

      + Sample Response + [showhide] +
      +        POST /100/subscriptions/200/members/bulk
      +        {
      +            "import_id": 1
      +        }
      +
      +        true
      +    
      +
      +

      +
      + +
      +
      +PUT /#account_id/subscriptions/#subscription_id
      +

      Edit a subscription's name or description.

      + +++ + + + + + +
      Parameters:
        +
      • name (string) – Only required if updating the name. Visible in the Subscription Center.
      • +
      • description (string) – Describes the subscription, and is visible in the Subscription Center. +
      • +
      +
      Returns:

      Information about the updated subscription.

      +
      +

      +

      +Sample Response +[showhide] +
      +    PUT /100/subscriptions/300
      +    {
      +        "name": "Cat Fanatics Only",
      +        "description": "A newsletter for those only interested in cat products"
      +    }
      +
      +    {
      +        "account_id": 100,
      +        "created_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +        "deleted_at": null,
      +        "description": "A newsletter for those only interested in cat products",
      +        "member_count": 0,
      +        "modified_at": "Fri, 27 Sep 2019 21:43:22 GMT",
      +        "optout_count": 0,
      +        "purged_at": null,
      +        "settings": null,
      +        "subscription_id": 300,
      +        "subscription_name": "Cat Fanatics Only",
      +        "subscription_order": null
      +    }
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/subscriptions/subscription_id
      +

      Delete a subscription.

      + +++ + + + +
      Returns:Information about the subscription, including the date and time it was deleted.
      +

      +

      +Sample Response +[showhide] +
      +    DELETE /100/subscriptions/200
      +
      +    {
      +        "account_id": 100,
      +        "created_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +        "deleted_at": "Thu, 26 Sep 2019 20:29:33 GMT",
      +        "description": "Regularly donate $1,500 or more.",
      +        "member_count": 150,
      +        "modified_at": "Wed, 25 Sep 2019 21:39:34 GMT",
      +        "optout_count": 8,
      +        "purged_at": null,
      +        "settings": null,
      +        "subscription_id": 200,
      +        "subscription_name": "Gold-Level Donors",
      +        "subscription_order": null
      +    }
      +
      +
      +

      +
      +
      +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/triggers.html b/api/external/triggers.html new file mode 100644 index 0000000..dcc2ef8 --- /dev/null +++ b/api/external/triggers.html @@ -0,0 +1,474 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Triggers

      +

      NOTICE: Triggers have been deprecated.

      +

      These endpoints provide CRUD operations for our trigger system. Viewing a +trigger is probably the most widely used of these operations.

      +
      +
      +GET /#account_id/triggers
      +

      Get a basic listing of all triggers in an account.

      +

      +

      +Sample Response +[showhide] +
      +GET /100/triggers
      +
      +[
      +  {
      +    "parent_mailing": {
      +      "mailing_type": "m",
      +      "send_started": null,
      +      "signup_form_id": null,
      +      "mailing_id": 200,
      +      "plaintext": "Hello [% member:first_name %]!",
      +      "recipient_count": 0,
      +      "cancel_ts": null,
      +      "created_ts": "@D:2013-08-22T09:41:45",
      +      "month": null,
      +      "failure_ts": null,
      +      "year": null,
      +      "datacenter": null,
      +      "started_or_finished": null,
      +      "account_id": 100,
      +      "disabled": false,
      +      "mailing_status": "c",
      +      "plaintext_only": false,
      +      "sender": "Kevin McConnell",
      +      "parent_mailing_id": null,
      +      "failure_message": null,
      +      "name": "Sample Mailing",
      +      "send_finished": null,
      +      "cancel_by_user_id": null,
      +      "send_at": null,
      +      "reply_to": null,
      +      "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +      "purged_at": null,
      +      "archived_ts": null,
      +      "html_body": "<p>Hello [% member:first_name %]!</p>"
      +    },
      +    "surveys": null,
      +    "event_type": "r",
      +    "links": null,
      +    "field_id": 203,
      +    "signup_integrations": null,
      +    "push_offset_units": "0:-14:0:0",
      +    "start_ts": "@D:2013-08-22T09:41:45",
      +    "trigger_id": 100,
      +    "name": "Birthday triggers",
      +    "signups": null,
      +    "push_offset": "@I:-1209600.0",
      +    "groups": null,
      +    "parent_mailing_id": 200,
      +    "deleted_at": null,
      +    "is_disabled": false,
      +    "account_id": 100
      +  },
      +  {
      +    "parent_mailing": {
      +      "mailing_type": "m",
      +      "send_started": null,
      +      "signup_form_id": null,
      +      "mailing_id": 200,
      +      "plaintext": "Hello [% member:first_name %]!",
      +      "recipient_count": 0,
      +      "cancel_ts": null,
      +      "created_ts": "@D:2013-08-22T09:41:45",
      +      "month": null,
      +      "failure_ts": null,
      +      "year": null,
      +      "datacenter": null,
      +      "started_or_finished": null,
      +      "account_id": 100,
      +      "disabled": false,
      +      "mailing_status": "c",
      +      "plaintext_only": false,
      +      "sender": "Kevin McConnell",
      +      "parent_mailing_id": null,
      +      "failure_message": null,
      +      "name": "Sample Mailing",
      +      "send_finished": null,
      +      "cancel_by_user_id": null,
      +      "send_at": null,
      +      "reply_to": null,
      +      "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +      "purged_at": null,
      +      "archived_ts": null,
      +      "html_body": "<p>Hello [% member:first_name %]!</p>"
      +    },
      +    "surveys": null,
      +    "event_type": "s",
      +    "links": null,
      +    "field_id": null,
      +    "signup_integrations": null,
      +    "push_offset_units": "0:3:0:0",
      +    "start_ts": "@D:2013-08-22T09:41:45",
      +    "trigger_id": 101,
      +    "name": "Test Signup Form triggers",
      +    "signups": [
      +      1,
      +      2,
      +      3
      +    ],
      +    "push_offset": "@I:259200.0",
      +    "groups": null,
      +    "parent_mailing_id": 200,
      +    "deleted_at": null,
      +    "is_disabled": false,
      +    "account_id": 100
      +  }
      +]
      +
      +
      +
      +

      +
      +
      +
      +GET /#account_id/triggers/#trigger_id
      +

      Look up a trigger by trigger id.

      + +++ + + + + + +
      Returns :A trigger.
      Raises :Http404 if no trigger is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/triggers/100
      +
      +{
      +  "parent_mailing": {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "signup_form_id": null,
      +    "mailing_id": 200,
      +    "plaintext": "Hello [% member:first_name %]!",
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "month": null,
      +    "failure_ts": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "mailing_status": "c",
      +    "plaintext_only": false,
      +    "sender": "Kevin McConnell",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "name": "Sample Mailing",
      +    "send_finished": null,
      +    "cancel_by_user_id": null,
      +    "send_at": null,
      +    "reply_to": null,
      +    "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +    "purged_at": null,
      +    "archived_ts": null,
      +    "html_body": "<p>Hello [% member:first_name %]!</p>"
      +  },
      +  "surveys": null,
      +  "event_type": "r",
      +  "links": null,
      +  "field_id": 203,
      +  "signup_integrations": null,
      +  "push_offset_units": "0:-14:0:0",
      +  "start_ts": "@D:2013-08-22T09:41:45",
      +  "trigger_id": 100,
      +  "name": "Birthday triggers",
      +  "signups": null,
      +  "push_offset": "@I:-1209600.0",
      +  "groups": null,
      +  "parent_mailing_id": 200,
      +  "deleted_at": null,
      +  "is_disabled": false,
      +  "account_id": 100
      +}
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/triggers/#trigger_id
      +

      Update or edit a trigger.

      + +++ + + + + + +
      Returns :The id of the updated trigger.
      Raises :Http404 if no trigger is found.
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/triggers/100
      +{
      +  "name": "A Better Trigger"
      +}
      +
      +100
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/triggers/#trigger_id
      +

      Delete a trigger.

      + +++ + + + + + +
      Returns :True if the trigger is deleted.
      Raises :Http404 if no trigger is found.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/triggers/100
      +
      +true
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/triggers/#trigger_id/mailings
      +

      Get mailings sent by a trigger.

      + +++ + + + + + +
      Returns :An array of mailings.
      Raises :Http404 if no trigger is found.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/triggers/101/mailings
      +
      +[
      +  {
      +    "mailing_type": "m",
      +    "send_started": null,
      +    "signup_form_id": null,
      +    "mailing_id": 200,
      +    "plaintext": "Hello [% member:first_name %]!",
      +    "recipient_count": 0,
      +    "cancel_ts": null,
      +    "created_ts": "@D:2013-08-22T09:41:45",
      +    "month": null,
      +    "failure_ts": null,
      +    "year": null,
      +    "datacenter": null,
      +    "started_or_finished": null,
      +    "account_id": 100,
      +    "disabled": false,
      +    "mailing_status": "c",
      +    "plaintext_only": false,
      +    "sender": "Kevin McConnell",
      +    "parent_mailing_id": null,
      +    "failure_message": null,
      +    "name": "Sample Mailing",
      +    "send_finished": null,
      +    "cancel_by_user_id": null,
      +    "send_at": null,
      +    "reply_to": null,
      +    "subject": "Sample Mailing for [% member:first_name %] [% member:last_name %]",
      +    "purged_at": null,
      +    "archived_ts": null,
      +    "html_body": "<p>Hello [% member:first_name %]!</p>"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/users.html b/api/external/users.html new file mode 100644 index 0000000..efdf15a --- /dev/null +++ b/api/external/users.html @@ -0,0 +1,264 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Users

      +

      These endpoints allow for the invitation and management of users to an HQ subaccount.

      +
      +
      + POST /#subccount_id/invitation/team
      +

      Invite a new user to a subaccount.

      +

      Users can only be invited to a single subaccount via the public api. To assign multiple subaccounts to a newly invited user, please do so via the web application.

      +

      Additionally, adding further permissions to a newly invited user must also be completed via the web application; this endpoint will assign role type only.

      + + + + + + + + + + +
      Parameters:
        +
      • invitee_email_address (string) – Required. The email address of the user you'd like to invite.
      • +
      • role (string) – Required. The role assigned to the newly created user. The invited user's role must be below your own assigned role. + Valid values include: ‘response_only’, ‘author’, ‘editor‘, ‘full’, ‘owner’ (defined as ‘administrator’ in app), and ‘manager’. + Role hierarchy is as follows: ‘parent’ > ‘manager’ > ‘owner’ (‘administrator’ in app) > ‘full’ > ‘editor’ > ‘author’ > ‘response_only’ +
      • +
      +
      Raises :Http400 if the role provided is invalid.
      Raises :Http401 if the requesting user is unable to create a user of that role type.
      +

      +

      + Sample Response + [showhide] +
      +POST /100/invitation/team
      +{
      +  "message": true
      +}
      +
      +
      +
      +
      +
      +
      + GET/#account_id/accounts/users
      +

      Lists the users of an account.

      +

      This endpoint allows owners and managers with the ‘manage_users’ permission to list the users for either the parent account, the parent account and all subs, or a particular subaccount.The list returned will include users that have accepted their invitation, and users that have not.

      +

      Additionally, there are params to include subaccount users, to filter via ‘account_id’, and to search for a specific user. This endpoint is paginated and will need to be called with pagination params if the response includes more than 500 users.

      + + + + + + + + + + + + +
      Parameters:
        +
      • include_sub_users (boolean) – Optional. Calling the endpoint using the ‘parent_account_id’ and this param set to ‘true’ will return the users associated with the parent account along with any users associated with any of the parent's subaccounts as well.
      • +
      • searchterm (string) – Optional. Allows searching by the ‘user_id’, ‘user_name_first’, and ‘user_name_last’ values.
      • +
      • filter_accounts (comma separated string) – Optional. Allows filtering of the results by returning users who have access to one of the passed accounts.
      • +
      +
      Returns :A response with a list of users including the accounts they have access to, the permissions they have, their role, and other user related data.
      Raises :Http404 if the parent account or requesting user does not exist.
      Raises :Http401 if the requesting user does not have access to the account or the ‘manage_users’ permission.
      +

      +

      + Sample Response + [showhide] +
      +GET /100/account/users
      +{
      +    "users": [
      +        {
      +            "accounts": [
      +                {
      +                    "account_id": 100,
      +                    "account_name": "Test Parent Account"
      +                }
      +            ],
      +            "create_ts": "Jun 21, 2012",
      +            "email": "emmaHQowner@myemma.com",
      +            "last_login_attempt": "Jul 22, 2021 02:47 PM",
      +            "role": "Parent",
      +            "user_group_list": [
      +                "account_create",
      +                "assets_access",
      +                "billing_access",
      +                "emma_account_default",
      +                "emma_agency_default",
      +                "emma_audience_default",
      +                "emma_campaigns_default",
      +                "emma_response_default",
      +                "exporting_access",
      +                "manage_api_key",
      +                "manage_sso",
      +                "manage_team",
      +                "public",
      +                "purging_access"
      +            ],
      +            "user_id": "emmaHQowner@myemma.com",
      +            "user_name_first": “Test”,
      +            "user_name_last": “Owner”
      +        }
      +    ]
      +}
      +                                
      +
      +

      +
      +
      +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/api/external/webhooks.html b/api/external/webhooks.html new file mode 100644 index 0000000..360125d --- /dev/null +++ b/api/external/webhooks.html @@ -0,0 +1,496 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Webhooks

      +

      You can manage your webhooks with these endpoints. Of particular interest +might be the GET /#account_id/webhooks/events endpoint which lets you +know which events our system can send out webhooks for. You can get more +info about how our webhooks work.

      +
      +
      +GET /#account_id/webhooks
      +

      Get a basic listing of all webhooks associated with an account.

      + +++ + + + +
      Returns :A list of webhooks that belong to the given account.
      +

      +

      +Sample Response +[showhide] +
      +GET /100/webhooks
      +
      +[
      +  {
      +    "url": "https://myemma.com",
      +    "webhook_id": 100,
      +    "method": "POST",
      +    "account_id": 100,
      +    "event": "mailing_finish"
      +  },
      +  {
      +    "url": "http://tech.myemma.com",
      +    "webhook_id": 101,
      +    "method": "POST",
      +    "account_id": 100,
      +    "event": "mailing_finish"
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/webhooks/#webhook_id
      +

      Get information for a specific webhook belonging to a specific account.

      + +++ + + + + + +
      Returns :Details for a single webhook
      Raises :Http404 if no webhook found
      +

      +

      +Sample Response +[showhide] +
      +GET /100/webhooks/100
      +
      +{
      +  "url": "https://myemma.com",
      +  "event": "mailing_finish",
      +  "method": "POST",
      +  "account_id": 100,
      +  "webhook_id": 100
      +}
      +
      +
      +

      +
      + +
      +
      +GET /#account_id/webhooks/events
      +

      Get a listing of all event types that are available for +webhooks.

      + +++ + + + +
      Returns :A list of event types and descriptions
      +

      +

      +Sample Response +[showhide] +
      +GET /100/webhooks/events
      +
      +[
      +  {
      +    "event_name": "mailing_finish",
      +    "webhook_event_id": 1,
      +    "description": "Fired when a mailing is finished."
      +  },
      +  {
      +    "event_name": "mailing_start",
      +    "webhook_event_id": 2,
      +    "description": "Fired when a mailing starts."
      +  },
      +  {
      +    "event_name": "member_signup",
      +    "webhook_event_id": 3,
      +    "description": "Fired when a member signs up through a signup form."
      +  },
      +  {
      +    "event_name": "message_open",
      +    "webhook_event_id": 4,
      +    "description": "Fired when a message is opened."
      +  },
      +  {
      +    "event_name": "message_click",
      +    "webhook_event_id": 5,
      +    "description": "Fired when a link in a message is clicked."
      +  },
      +  {
      +    "event_name": "member_optout",
      +    "webhook_event_id": 6,
      +    "description": "Fired when a member opts out."
      +  },
      +  {
      +    "event_name": "message_share",
      +    "webhook_event_id": 7,
      +    "description": "Fired when a member shares a message."
      +  },
      +  {
      +    "event_name": "message_share_click",
      +    "webhook_event_id": 8,
      +    "description": "Fired when a someone follows a link a member has shared."
      +  },
      +  {
      +    "event_name": "import_finish",
      +    "webhook_event_id": 9,
      +    "description": "Fired when a member import completes."
      +  },
      +  {
      +    "event_name": "member_update",
      +    "webhook_event_id": 10,
      +    "description": "Fired when a member is updated."
      +  },
      +  {
      +    "event_name": "member_delete",
      +    "webhook_event_id": 11,
      +    "description": "Fired when a member is deleted."
      +  },
      +  {
      +    "event_name": "member_add_to_group",
      +    "webhook_event_id": 12,
      +    "description": "Fired when a member(s) is added to a group(s)."
      +  },
      +  {
      +    "event_name": "member_remove_from_group",
      +    "webhook_event_id": 13,
      +    "description": "Fired when a member(s) is removed from a group(s)."
      +  },
      +  {
      +    "event_name": "group_create",
      +    "webhook_event_id": 14,
      +    "description": "Fired when a group is created."
      +  },
      +  {
      +    "event_name": "group_delete",
      +    "webhook_event_id": 15,
      +    "description": "Fired when a group is deleted."
      +  },
      +  {
      +    "event_name": "group_update",
      +    "webhook_event_id": 16,
      +    "description": "Fired when a group is updated."
      +  },
      +  {
      +    "event_name": "member_status_update",
      +    "webhook_event_id": 17,
      +    "description": "Fired when a member's status changes."
      +  },
      +  {
      +    "event_name": "message_forward",
      +    "webhook_event_id": 18,
      +    "description": "Fired when a message is forwarded."
      +  },
      +  {
      +    "event_name": "member_add",
      +    "webhook_event_id": 19,
      +    "description": "Fired when a single member is added."
      +  },
      +  {
      +    "event_name": "field_create",
      +    "webhook_event_id": 20,
      +    "description": "Fired when a field is created."
      +  },
      +  {
      +    "event_name": "field_delete",
      +    "webhook_event_id": 21,
      +    "description": "Fired when a field is deleted."
      +  },
      +  {
      +    "event_name": "field_update",
      +    "webhook_event_id": 22,
      +    "description": "Fired when a field is updated."
      +  }
      +]
      +
      +
      +
      +

      +
      + +
      +
      +POST /#account_id/webhooks
      +

      Create an new webhook.

      +

      If method is ‘POST’, the data will be posted to the given URL as a blob of JSON. If the method +is ‘GET’ the data will be added to the query string of your URL as a url encoded blob of JSON +in a key called ‘payload’.

      + +++ + + + +
      Parameters:
        +
      • event (string) – The name of an event to register this webhook for
      • +
      • url (string) – The URL to call when the event happens
      • +
      • method (string) – The method to use when calling the webhook. Can be GET or POST. Defaults to POST.
      • +
      • public_key – The public_key to use for authentication. Note: this can also be spelled “user_id” but this is deprecated.
      • +
      +
      +

      +

      +Sample Response +[showhide] +
      +POST /100/webhooks
      +{
      +  "url": "https://myemma.com/blog/",
      +  "event": "mailing_finish"
      +}
      +
      +1024
      +
      +
      +

      +
      + +
      +
      +PUT /#account_id/webhooks/#webhook_id
      +

      Update an existing webhook. Takes the same params as create_webhook.

      + +++ + + + + + +
      Returns :The id of the updated webhook, or False if the update failed.
      Raises :Http404 if the webhook cannot be found.
      +

      +

      +Sample Response +[showhide] +
      +PUT /100/webhooks/100
      +{
      +  "url": "http://tech.myemma.com/"
      +}
      +
      +100
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/webhooks/#webhook_id
      +

      Deletes an existing webhook.

      + +++ + + + + + +
      Returns :True if the webhook deleted successufully.
      Raises :Http404 if no webhook found
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/webhooks/101
      +
      +true
      +
      +
      +

      +
      + +
      +
      +DELETE /#account_id/webhooks
      +

      Delete all webhooks registered for an account.

      + +++ + + + +
      Returns :True if the webhooks deleted successufully.
      +

      +

      +Sample Response +[showhide] +
      +DELETE /100/webhooks
      +
      +true
      +
      +
      +

      +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + diff --git a/genindex.html b/genindex.html new file mode 100644 index 0000000..2c629b5 --- /dev/null +++ b/genindex.html @@ -0,0 +1,154 @@ + + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + + +

      Index

      + +
      + +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/http-routingtable.html b/http-routingtable.html new file mode 100644 index 0000000..19b9926 --- /dev/null +++ b/http-routingtable.html @@ -0,0 +1,631 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + + +

      HTTP Routing Table

      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
       
      + /#account_id
      + GET /#account_id/fields +
      + POST /#account_id/fields +
      + GET /#account_id/fields/#field_id +
      + PUT /#account_id/fields/#field_id +
      + DELETE /#account_id/fields/#field_id +
      + POST /#account_id/fields/#field_id/clear +
      + POST /#account_id/forwards/#mailing_id/#member_id +
      + GET /#account_id/groups +
      + POST /#account_id/groups +
      + PUT /#account_id/groups/#from_group_id/#to_group_id/members/copy +
      + GET /#account_id/groups/#member_group_id +
      + PUT /#account_id/groups/#member_group_id +
      + DELETE /#account_id/groups/#member_group_id +
      + GET /#account_id/groups/#member_group_id/members +
      + PUT /#account_id/groups/#member_group_id/members +
      + DELETE /#account_id/groups/#member_group_id/members +
      + PUT /#account_id/groups/#member_group_id/members/remove +
      + DELETE /#account_id/groups/#member_group_id/members/remove +
      + GET /#account_id/mailings +
      + POST /#account_id/mailings +
      + GET /#account_id/mailings/#mailing_id +
      + PUT /#account_id/mailings/#mailing_id +
      + POST /#account_id/mailings/#mailing_id +
      + DELETE /#account_id/mailings/#mailing_id +
      + GET /#account_id/mailings/#mailing_id/groups +
      + GET /#account_id/mailings/#mailing_id/headsup +
      + GET /#account_id/mailings/#mailing_id/members +
      + GET /#account_id/mailings/#mailing_id/messages/#member_id +
      + GET /#account_id/mailings/#mailing_id/searches +
      + POST /#account_id/mailings/#mailing_id/winner/#winner_id +
      + DELETE /#account_id/mailings/cancel/#mailing_id +
      + POST /#account_id/mailings/validate +
      + GET /#account_id/members +
      + POST /#account_id/members +
      + DELETE /#account_id/members +
      + PUT /#account_id/members/#group_id/copy +
      + GET /#account_id/members/#member_id +
      + PUT /#account_id/members/#member_id +
      + DELETE /#account_id/members/#member_id +
      + GET /#account_id/members/#member_id/groups +
      + PUT /#account_id/members/#member_id/groups +
      + DELETE /#account_id/members/#member_id/groups +
      + PUT /#account_id/members/#member_id/groups/remove +
      + GET /#account_id/members/#member_id/mailings +
      + GET /#account_id/members/#member_id/optout +
      + POST /#account_id/members/add +
      + PUT /#account_id/members/delete +
      + GET /#account_id/members/email/:email +
      + PUT /#account_id/members/email/optout/:email +
      + PUT /#account_id/members/groups/remove +
      + GET /#account_id/members/imports +
      + GET /#account_id/members/imports/#import_id +
      + GET /#account_id/members/imports/#import_id/members +
      + DELETE /#account_id/members/imports/delete +
      + POST /#account_id/members/signup +
      + PUT /#account_id/members/status +
      + PUT /#account_id/members/status/:status_from/to/:status_to +
      + GET /#account_id/response +
      + GET /#account_id/response/#mailing_id +
      + GET /#account_id/response/#mailing_id/clicks +
      + GET /#account_id/response/#mailing_id/customer_share_clicks +
      + GET /#account_id/response/#mailing_id/customer_shares +
      + GET /#account_id/response/#mailing_id/deliveries +
      + GET /#account_id/response/#mailing_id/forwards +
      + GET /#account_id/response/#mailing_id/in_progress +
      + GET /#account_id/response/#mailing_id/links +
      + GET /#account_id/response/#mailing_id/opens +
      + GET /#account_id/response/#mailing_id/optouts +
      + GET /#account_id/response/#mailing_id/sends +
      + GET /#account_id/response/#mailing_id/shares +
      + GET /#account_id/response/#mailing_id/shares/overview +
      + GET /#account_id/response/#mailing_id/signups +
      + GET /#account_id/response/#share_id/customer_share +
      + GET /#account_id/searches +
      + POST /#account_id/searches +
      + GET /#account_id/searches/#search_id +
      + PUT /#account_id/searches/#search_id +
      + DELETE /#account_id/searches/#search_id +
      + GET /#account_id/searches/#search_id/members +
      + GET /#account_id/signup_forms +
      + GET /#account_id/triggers +
      + POST /#account_id/triggers +
      + GET /#account_id/triggers/#trigger_id +
      + PUT /#account_id/triggers/#trigger_id +
      + DELETE /#account_id/triggers/#trigger_id +
      + GET /#account_id/triggers/#trigger_id/mailings +
      + GET /#account_id/webhooks +
      + POST /#account_id/webhooks +
      + DELETE /#account_id/webhooks +
      + GET /#account_id/webhooks/#webhook_id +
      + PUT /#account_id/webhooks/#webhook_id +
      + DELETE /#account_id/webhooks/#webhook_id +
      + GET /#account_id/webhooks/events +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..aaa59a7 --- /dev/null +++ b/index.html @@ -0,0 +1,391 @@ + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + + +
      +
      +
      +
      + +
      +

      Emma API

      +
      +

      A word to the wise...

      +

      + Use the information on this page to set up and troubleshoot your API calls. If you are interested in paid API support, visit our Custom Integrations page and fill out a request. Our system is monitored around the clock – and if there’s ever a dropped connection or outage, we’ll be sure to notify users on our status page. +

      All JSON payloads must not exceed 10MB +

      +
      +
      +

      Overview

      +

      Emma’s platform is accessible through our public API, which provides access to the following areas:

      +
        +
      • +
        Managing member lists:
        +
          +
        • Importing, editing and deleting
        • +
        • Organizing members into groups
        • +
        • Searching for members
        • +
        +
        +
        +
      • +
      • +
        Mailings:
        +
          +
        • Viewing past mailings
        • +
        • Controlling the status of pending mailings
        • +
        +
        +
        +
      • +
      • +
        Retrieving response:
        +
          +
        • Accessing mailing response information by mailing or member of time period
        • +
        • Accessing response at summary and detail levels
        • +
        +
        +
        +
      • +
      +

      +Note: If you are an HQ customer, please be sure to use a subaccount's ID in the path of your API call. +

      +
      +
      +

      API wrappers

      +

      Emma’s wrappers make it a breeze to connect to our API no matter which programming language you like to use. Just select your language and you’ll be able to integrate with Emma without the hassle of having to study all the ins and outs of our API first.

      +

      This collection is young (but growing!) and includes wrappers commissioned by Emma as well as some built by members of our community. Unless otherwise noted, all wrappers provide full coverage of our current API. If you see something that needs to be fixed or improved, please don’t hesitate submit a pull request. And if you’ve built a wrapper that you’d like to have listed here, let us know!

      +
      +
      PHP
      +

      EmmaPHP : Commissioned by Emma and built by Nashville developer Dennis Monsewicz.

      +

      OhMyEmma: Built by Nashville developer Jacques Woodcock.

      +

      Emma: Built by Nashville-based Abenity, Inc.

      +
      +
      Python
      +
      EmmaPython: Built by Emma’s own Doug Hurst.
      +
      Ruby
      +
      EmmaRuby: Commissioned by Emma and built by Nashville developer Dennis Monsewicz.
      +
      Objective-C
      +
      EmmaSDK: Commissioned by Emma and built by Portland developer Benjamin Van Der Veen.
      +
      Node.js
      +
      emma-sdk: Built by New York City developer Nathan Peck for StoryDesk.
      +
      .NET
      +
      EmmaSharp: Built by developer Kyle Gregory
      +
      +
      +
      +

      Quickstart

      +

      Let’s get started by building some PHP code that will add a member to our audience.

      + +

      + Before you do this, you will need a valid set of API keys. If you have a regular account you can + generate your API keys using these steps: +

      +
        +
      1. Go to account settings
      2. +
      3. Find the "API Key" tab
      4. +
      5. Click "Generate API Key"
      6. +
      + +

      If your account is part of an agency account, you will need to follow these steps instead:

      +
        +
      1. Go to "Menu" and select "Accounts"
      2. +
      3. Click the downward-pointing arrow to the right of the account you need a key for and select its settings
      4. +
      5. Scroll to the API key section to generate the key
      6. +
      + +

      Next, let’s add these authentication bits to our code.

      +
      // Authentication Variables
      +$account_id = "xxx";
      +$public_api_key = "xxx";
      +$private_api_key = "xxx";
      +
      +
      +

      Then we’ll want to capture the POSTed form variables from the request.

      +
      // Form variable(s)
      +$email = $_POST['email'];
      +$first_name = $_POST['first_name'];
      +$last_name = $_POST['last_name'];
      +$groups = array(123456, 654321);
      +
      +// Member data other than email should be passed in an array called "fields"
      +$member_data = array(
      +  "email" => $email,
      +  "fields" => array(
      +    "first_name" => $first_name,
      +    "last_name" => $last_name
      +  ),
      +  "group_ids" => $groups
      +);
      +
      +
      +

      Please note that the group_ids that you’re adding members to are passed as an array of integers. In addition, you’ll always want to make sure that you sanitize any of these form inputs to protect your application.

      +

      Now we’ll need to set the URL for the API call. The endpoint for all of our API calls is + https://api.e2ma.net/. NOTE: You must use TLS version 1.1 or higher to connect. TLSv1 and all versions of SSL ciphers (e.g. SSLv2, SSLv3) are not supported.
      +In this case, we’re using the endpoint that corresponds to adding a single member. There’s a separate call for adding bulk members.

      +
      // Set URL
      +$url = "https://api.e2ma.net/".$account_id."/members/add";
      +
      +
      +

      Next, we’ll do a little dance with cURL that should look familiar to you. We’ll explain some particulars below the code block.

      +
      // setup and execute the cURL command
      +$ch = curl_init();
      +curl_setopt($ch, CURLOPT_USERPWD, $public_api_key . ":" . $private_api_key);
      +curl_setopt($ch, CURLOPT_URL, $url);
      +curl_setopt($ch, CURLOPT_POST, count($member_data));
      +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($member_data));
      +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
      +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      +curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      +curl_setopt($ch, CURLOPT_SSLVERSION, 6);
      +$head = curl_exec($ch);
      +$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      +curl_close($ch);
      +
      +
      +

      Line 3 is where we use the public/private keys to authenticate our call. On lines 6-7, we force the API call to make its request in JSON and expect JSON in return.

      +

      At this point, the API call has been made. We might also want to inspect the result to see what happened. The API returns true HTTP response codes that you can examine to determine a request’s disposition.

      +
      //execute post
      +if($http_code > 200) {
      +  $app_message = "Error sending subscription request";
      +} else {
      +  $app_message = "Success!";
      +}
      +
      +echo $app_message;
      +
      +
      +

      You can see the complete PHP script here. +There’s also a PHP example to get members using their email +address.

      +

      + To extend this example further, you could make the API call associate the new member with a particular signup form. As written above, the member would be added to the audience but would not appear in the “recent activity” type searches or really any searches related to signups. Don’t worry – we’re currently working on a cleaner way to handle this signup form issue in the future. +

      +
      +
      +

      API calls by category

      +

      + In the following sections, we’ve organized API calls by their main entity type. Each call includes sample request and response data. +

      + +
      +
      +

      API rate limit

      +

      + To prevent accidental overuse, calls to Emma's API are limited to 180 calls per +minute. If you exceed the limit, you‘ll receive a response of 403 Rate Limit Exceeded until enough time has elapsed between calls. +

      +
      + +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + + +
      +
      +
      +
      + + + diff --git a/member_search.html b/member_search.html new file mode 100644 index 0000000..672abd5 --- /dev/null +++ b/member_search.html @@ -0,0 +1,265 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Search Syntax

      +
      +

      Syntax Overview

      +

      Searches are constructed using nested JSON arrays of filters and boolean predicates. Here is an example of a simple filter:

      +
      ["member_field:foo", "eq", "bar"]
      +
      +
      +

      A filter is composed of one or more parts. The first part is always a filter term. In general, a filter term maps directly to a field in the results. A filter term can accept an argument (the :foo in the example above) that will have different meanings for different filter terms. If the filter has more than one part, the second part is always an operator. The remaining parts are arguments for the operator. Different operators will have different arguments, but will always have at least one.

      +

      In addition, filters can be nested using boolean predicates. Here’s an example of a nested query:

      +
      ["and",
      +    ["member_field:foo", "eq", "bar"],
      +    ["member_since", "in last", {"day": 5}]]
      +
      +
      +

      This example will return all members who joined in the last 5 days and have their member_field foo set to bar. The available boolean predicates and examples of their use are below.

      +
      +
      +

      Operators

      +

      There are a bunch of operators available:

      +
        +
      • eq and =: Basic equality. Example: ["member_field:some_string_field", "eq", "bar"]
      • +
      • lt and <: Less than. Example: ["member_field:some_numeric_field", "lt", 5]
      • +
      • gt and >: Greater than. Example: ["member_field:some_numeric_field", "gt", 5]
      • +
      • between: Between. Takes two arguments. Example: ["member_field:some_numeric_field", "between", 5, 10]
      • +
      • in last and in next: Relative date. Takes an interval (explained below). Example: ["member_since", "in last", {"day": 4}]
      • +
      • datematch: Match a date argument. All parts of the date must match. Example: ["member_since", "datematch", {"year": 2011}]
      • +
      • contains: Match a string against a shell-glob-style expression. Example: ["member_field:some_string_field", "contains", "*foo*"]
      • +
      • in: Match a field against a list of values. Example: ["member_field:some_number_field", "in", 3, 4, 5, 6]
      • +
      • any: Match a given value against an array field. Example: ["member_field:some_array_field", "any", "ten"]
      • +
      +

      In addition to these basic operators, there is one advanced operator available:

      +
        +
      • zip-radius:n: where n can be one of 5, 10, 15, 20, 25, or 50. Takes a single zip code which will be the center of the search. Example: ["member_field:some_zipcode_field", "zip-radius:10", "97202"] will return all members with a zip_code_field within 10 miles of 97202.
      • +
      +
      +

      Intervals

      +

      An interval is defined as a hash that contains one or more of the following keys:

      +
        +
      • year
      • +
      • month
      • +
      • day
      • +
      • hour
      • +
      • minute
      • +
      • second
      • +
      +

      For example, {"year": 2, "day": 4} would specify an interval of two years and four days.

      +
      +
      +

      Dates

      +

      A date is defined as a hash that contains one or more of the following keys:

      +
        +
      • year
      • +
      • month
      • +
      • day
      • +
      • hour
      • +
      • minute
      • +
      • second
      • +
      • dow (day of week)
      • +
      +

      For example, {"day", 31} would match the 31st of every month with a 31st day, while {"dow": 2} would match every Tuesday. Sunday is 0.

      +
      +
      +
      +

      Boolean Predicates

      +

      Boolean predicates operate on one or more nested clauses. These predicates are available:

      +
        +
      • and: All clauses must be true. Example: ["and", ["member_field:foo", "eq", 1], ["member_field:bar", "eq", 2]]
      • +
      • or: At least one clause must be true. Example: ["or", ["member_field:foo", "eq", 1], ["member_field:bar", "eq", 2]]
      • +
      • not: The single nested clause must not be true. Example: ["not", ["member_field:foo", "eq", 1]]
      • +
      +
      +
      +

      Filter Terms

      +

      In general, every key in the result records can be used as a filter term. Just use the key as the filter term. For example, to filter on send_start, you’d say ["send_start", "gt", "2011-12-15"]. In addition, there is a large set of advanced filter terms for filtering members:

      +
        +
      • opened, clicked, shared, forwarded. Will match on the timestamp of the corresponding response if it exists. All of these filter terms also allow a mailing_id as an argument (i.e. opened:12345 matches if they opened mailing 12345.
      • +
      • member_field:x where x is the short name of a member field. You can also use x by itself without member_field:.
      • +
      • group. Will match the name of a member group. Takes the special operators defined (belongs to any group) and undefined (does not belong to any group).
      • +
      • received Will match if the member received a mailing. Takes an optional mailing_id argument. If not given, will match if the member has received any mailing.
      • +
      • clicked link. Will match if the member has clicked on a link. Takes an optional link_id argument. If not given, will match if the member has clicked on any link.
      • +
      • manage: Will match if the member has manged their preferences. Optionally takes a date filter on the timestamp of the manage action. Optionally takes a signup_form_id argument. Example: ["manage:1234", "in last", {"day", 30}].
      • +
      • unsubscribed: Will match if the member has unsubscribed. Optionally takes a date filter on the timestamp of the opt-out action. Optionally takes a signup_form_id filter argument.
      • +
      • unsubscribed mailing: Will match if the member has unsubscribed. Optionally takes a date filter on the timestamp of the opt-out action. Optionally takes a mailing_id filter argument.
      • +
      • bounced: Will match if the member had either a soft or hard bounce. Optionally takes a date filter on the timestamp of the bounce. Optionally takes a mailing_id filter argument.
      • +
      • email_user: Will match on the user portion of the member’s email address
      • +
      • email_domain: Will match on the domain portion of the member’s email address
      • +
      • email: Will match on the member’s entire email address
      • +
      • signup: Will match if the member has signed up. Optionally takes a date filter on the timestamp of the signup action. Optionally takes a signup_form_id filter argument.
      • +
      • signup_mailing: Will match if the member has signed up. Optionally takes a date filter on the timestamp of the signup action. Optionally takes a mailing_id filter argument.
      • +
      +
      +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/objects.inv b/objects.inv new file mode 100644 index 0000000..77c3f01 Binary files /dev/null and b/objects.inv differ diff --git a/pagination.html b/pagination.html new file mode 100644 index 0000000..b1e4f2a --- /dev/null +++ b/pagination.html @@ -0,0 +1,177 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + + + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/php_get_member_example.html b/php_get_member_example.html new file mode 100644 index 0000000..6c5c463 --- /dev/null +++ b/php_get_member_example.html @@ -0,0 +1,192 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      PHP Get Member By Email Example

      +

      Here’s the complete example of the PHP code to find a member by email address.

      +
      <?php
      +// Authentication Variables
      +$account_id = "xxxx";
      +$public_api_key = "xxxxx";
      +$private_api_key = "xxxxx";
      +
      +// Form variable(s)
      +$email = 'me@test.com';
      +
      +// Set URL
      +$url = "https://api.e2ma.net/" . $account_id . "/members/email/" . $email;
      +
      +// Open connection
      +$ch = curl_init();
      +
      +// Make the curl call
      +curl_setopt($ch, CURLOPT_USERPWD, $public_api_key . ":" . $private_api_key);
      +curl_setopt($ch, CURLOPT_URL, $url);
      +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
      +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      +curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      +$head = curl_exec($ch);
      +$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      +curl_close($ch);
      +
      +// check for errors
      +if($http_code > 200) {
      +    print "Error getting member:\r\n";
      +    print_r($head);
      +} else {
      +    print "Member information:\r\n";
      +    print_r($head);
      +}
      +?>
      +
      +
      +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/php_signup_example.html b/php_signup_example.html new file mode 100644 index 0000000..c5b9227 --- /dev/null +++ b/php_signup_example.html @@ -0,0 +1,214 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      PHP Signup Example

      +

      Here’s the complete example of the PHP code to signup a single member.

      +
      <?php
      +// Authentication Variables
      +$account_id = "xxx";
      +$public_api_key = "xxx";
      +$private_api_key = "xxx";
      +
      +// Form variable(s)
      +$email = $_POST['email'];
      +$first_name = $_POST['first_name'];
      +$last_name = $_POST['last_name'];
      +$groups = array(123456, 654321);
      +
      +// Member data other than email should be passed in an array called "fields"
      +$member_data = array(
      +    "email" => $email,
      +    "fields" => array(
      +        "first_name" => $first_name,
      +        "last_name" => $last_name
      +    ),
      +    "group_ids" => $groups
      +);
      +
      +// Set URL
      +$url = "https://api.e2ma.net/".$account_id."/members/add";
      +
      +// Open connection
      +$ch = curl_init();
      +
      +// Set the url, number of POST vars, POST data
      +curl_setopt($ch, CURLOPT_USERPWD, $public_api_key . ":" . $private_api_key);
      +curl_setopt($ch, CURLOPT_URL, $url);
      +curl_setopt($ch, CURLOPT_POST, count($member_data));
      +curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($member_data));
      +curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: application/json'));
      +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
      +curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
      +$head = curl_exec($ch);
      +$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
      +curl_close($ch);
      +
      +//execute post
      +if($http_code > 200) {
      +    $app_message = "Error sending subscription request";
      +    print_r($head);
      +} else {
      +    print_r($head);
      +    $app_message = "Success!";
      +}
      +
      +echo $app_message;
      +?>
      +
      +
      +
      + + +
      +
      +
      +
      +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/placeholders.html b/placeholders.html new file mode 100644 index 0000000..860c734 --- /dev/null +++ b/placeholders.html @@ -0,0 +1,192 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Placeholder Syntax

      +
      +

      Syntax Overview

      +

      The content of messages can be customized using the template tag library. +Each template tag should be enclosed in a [% %] pair. Where a tag +requires a qualifier value, the value should be attached with a colon.

      +

      For example, the following extract shows a member’s name being inserted into a +greeting:

      +
      Hello [% member:first_name %] [% member:last_name %],
      +
      +Welcome to the "Exciting Onions" mailing list, where you can be kept up to
      +date on all the latest onion-related news ...
      +
      +

      Some tags also accept additional key/value pairs to control their behavior. +For example, adding a default value to a member field:

      +
      Hello [% member:first_name default="Friend" %]
      +
      +

      ...or specifying the link text for a trackable link:

      +
      Please visit [% link:http://fancyonions.com/home name="our website" %]
      +
      +
      +

      Todo

      +

      fully document the available tags

      +
      +
      +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/robots.txt b/robots.txt new file mode 100644 index 0000000..853b003 --- /dev/null +++ b/robots.txt @@ -0,0 +1,6 @@ +User-agent: * +Disallow: +Disallow: _images/ +Disallow: _sources/ +Disallow: _static/ + diff --git a/search.html b/search.html new file mode 100644 index 0000000..e070998 --- /dev/null +++ b/search.html @@ -0,0 +1,164 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +

      Search

      +
      + +

      + Please activate JavaScript to enable the search + functionality. +

      +
      +

      + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

      +
      + + + +
      + +
      + +
      + +
      +
      +
      +
      +

      Related Topics

      + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file diff --git a/searchindex.js b/searchindex.js new file mode 100644 index 0000000..b5bd5af --- /dev/null +++ b/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({envversion:42,terms:{all:[0,1,4,5,8,9,10,11,12,13,14],code:[0,1,6,3],change_typ:8,queri:[0,2,4],month:[0,5,9,14],four:[0,5],mile:0,least:0,follow:[0,1,4,5,7,8,9,11,13],link_target:[5,9],privat:[1,9],specif:[8,9,4],friendli:5,send:[1,3,4,5,8,9],program:1,customer_share_click:5,those:[1,12,5],group_upd:[12,4],sent:[5,8,12,9,14],curl_clos:[1,6,3],certain:12,brown:[7,8],digit:5,everi:0,string:[0,4,5,7,8,9,10,12,13,14],fals:[1,3,4,5,6,7,8,9,10,13,14],end:[2,8],mailing_status:9,trigger_id:14,"22t09":[9,14],webview_share_click:5,affect:[7,8],member_add:[12,4],create_mail:9,new_boolean:10,foo:0,level:1,group_delet:[12,4],list:[0,1,2,4,5,7,8,9,10,11,12,13,14],upload:8,ryan:8,"try":8,item:2,plaintext_onli:[9,14],div:[4,5,7,8,9,10,13,14],survey_id:14,setup:1,pleas:[1,8,11,9],prevent:2,work:[1,4],ten:0,sync:10,sign:[0,5,8,4],past:1,second:[0,7,14],field_creat:[12,4],further:1,durat:9,click:[0,4,5,7,8,14],append:2,even:10,what:1,hide:[4,5,7,8,9,10,13,14],appear:[1,8],clock:1,section:1,workflow:8,current:[1,8,12,9],delet:[1,4,7,8,9,10,13,14],"new":[1,4,5,7,8,9,10,11,13,14],net:[1,2,6,3],delivery_t:8,ever:1,method:[5,8,13,4,9],can:[0,1,2,4,5,7,8,9,11,12,13],created_t:[9,14],widget:[7,10,8,9,13],full:1,hash:0,datematch:0,displai:10,variat:9,gener:[0,8,12,14],onli:[5,8],here:[0,1,3,5,6,8],json:[0,1,3,4,6,7],bodi:[8,9],let:[1,4,10],address:[0,1,8,6,9],along:8,sinc:8,valu:[0,5,7,8,10,11],field_upd:[12,4],search:[8,9],survei:14,sender:[9,14],larger:2,queue:5,prior:9,permit:9,action:[0,8],chang:[8,4],overrid:8,campaign:5,newbi:5,appli:[7,14],app:14,prefer:0,young:1,myemma:[4,5,7,8,9,13],filenam:8,customer_shar:5,api:[8,9],curlopt_postfield:[1,3],total:5,jone:[7,5,8,13],select:[1,10],"12t11":[7,5,8,9,13],newslett:[7,8,13],describ:7,would:[0,1],commun:1,from_group_id:13,regist:4,two:[0,5],coverag:1,next:[0,1],create_webhook:4,few:[5,8],call:[8,4],criteria:7,member_add_to_group:[12,4],type:[1,3,4,5,6,7,10,9,14],until:2,more:[0,4,7,8,9,13],peopl:5,relat:[1,8,11,9],about:[10,8,12,4,9],notic:8,thide:[4,5,7,8,9,10,13,14],flag:[5,7,8,10,9,14],exce:2,indic:8,examin:1,particular:[1,4,5,8,10,12,9],in_progress:5,curl_getinfo:[1,6,3],origin:9,must:[0,7,8,13,10],none:9,endpoint:[1,4,5,7,8,9,10,13,14],join:[0,7],hour:0,der:1,member_sinc:[0,5,7,8,9,13],uniqu:5,histori:8,soup:7,remain:[0,9],archiv:[5,9],member_optout:[12,4],drill:5,control:[1,11,9],give:5,process:8,forward_mailing_id:5,email_domain:[0,5],share:[0,5,8,4],accept:[0,5,7,8,9,10,11,13,14],total_click:5,tag:[8,11,9],want:[1,12,13,5],opt_in_url:8,occur:[7,12],some_numeric_field:0,delai:14,alwai:0,webhook_event_id:4,cours:1,multipl:[10,8],first_nam:[1,3,5,7,8,9,10,11,13,14],started_or_finish:[9,14],anoth:[9,13],get:[1,4,5,7,8,9,10,13,14],message_open:[12,4],html_bodi:[9,14],share_statu:5,push_offset:14,del_statu:5,tild:5,num_members_upd:8,simpl:0,chri:9,pizza:[7,8],map:0,birthdai:[10,14],referenc:7,sundai:0,jacqu:1,membership:13,taco:[7,5,8,9,13],date:[5,8,14,10],xxxx:6,associ:[1,8,9,4,5],grow:1,welcom:11,add_onli:8,"short":0,json_encod:[1,3],optout:[5,8,13],num_dupl:8,favorit:10,correspond:[0,1],greet:11,predic:1,issu:[1,10],inform:[1,4,6,8,9,10,13],combin:7,allow:[0,7,8],some_zipcode_field:0,signed_up:5,order:[5,10],michel:[8,9],mailing_nam:5,checkbox:10,fields_upd:8,over:2,becaus:12,buyer:[7,8,9,13],comma:[9,13],is_dis:14,vari:8,paramet:[2,4,5,7,8,9,10,13,14],widget_typ:10,style:[0,4,5,7,8,9,10,13,14],monitor:1,how:[7,1,2,4],fix:1,import_start:8,better:[13,14],platform:1,pend:[1,9],mailing_list:9,onc:9,hidden:13,main:1,might:[1,4],link_nam:[5,9],them:[8,9],"return":[0,1,4,5,7,8,9,10,12,13,14],greater:[0,8],thei:[0,9],food:10,timestamp:[0,5,12,9,10],spell:4,nashvil:1,dai:0,auth:1,instead:[12,2,8],now:5,down:5,term:1,alex:9,name:[0,4,5,7,8,9,10,11,13,14],edit:[7,1,14,10],troubleshoot:1,drop:1,authent:[1,6,4,3],successufulli:4,separ:[1,9,13],each:[1,2,5,9,12,11,13],found:[8,9,4,14],updat:[4,7,8,9,10,13,14],denni:1,status:[8,9],domain:0,weight:[4,5,7,8,9,10,13,14],resum:9,individu:[5,8],hard:[0,5],last_nam:[1,3,5,7,8,9,10,11,13,14],"05t15":5,connect:[1,6,3],doug:1,our:[1,11,12,4,14],happen:[1,4,5],commiss:1,short_display_nam:10,special:[0,7,8,13],out:[0,1,4,5,7,8,10,13],variabl:[1,6,3],message_shar:[12,4],network:[5,12],private_api_kei:[1,6,3],check_multipl:10,content:[1,11,6,9,3],cancel_t:[9,14],rel:0,print:6,correct:10,integr:[1,14],benjamin:[1,8],qualifi:11,insid:1,advanc:0,contain:[0,5,7,13,10,9],given:[0,8,9,4],standard:[5,9],status_from:8,base:[1,8,5],recipient_search:9,dictionari:8,put:[4,7,8,9,10,13,14],span:[4,5,7,8,9,10,13,14],"13t23":[7,5,8],refer:[5,7,8,13,10,9],visit:11,enlist:8,could:1,omit:5,success:[1,3,7,8,9,13],filter:[7,1,9],pagin:1,member_id:[5,7,8,9,12,13],summari:[1,5],assign:9,first:[0,1,10,5],oper:[7,1,14],rang:5,notifi:[1,12],directli:0,curlopt_ssl_verifyp:[1,6,3],curl_init:[1,6,3],number:[5,2,13,3,10],placehold:1,mai:12,unlik:9,alreadi:[10,8,9,13],done:8,plaintext_pref:[7,8,9,13],oppos:8,open:[0,3,4,5,6,7,8],payload:4,fanci:5,size:2,differ:0,"long":10,script:1,data:[1,10,4,3,5],system:[1,8,12,4,14],messag:[4,5,8,11,9,14],attach:11,outag:1,friend:11,curlinfo_http_cod:[1,6,3],shell:0,option:[0,5,7,8,9,10,13,14],especi:8,signup:[0,1,4,5,8,14],copi:[8,13],member_upd:[12,4],specifi:[0,2,7,8,10,11,9,14],curl_exec:[1,6,3],curlopt_httphead:[1,6,3],member_signup:[12,4],create_search:7,part:[0,9],enclos:11,initi:[10,9],than:[0,1,2,3,12,13],with_plaintext:9,"02t10":[5,8],"02t11":[5,8],"02t13":5,nathan:8,whenev:8,provid:[1,5,8,12,9,14],remov:[8,13,4],mailing_start:4,rate:2,structur:7,charact:9,greg:8,trackabl:11,were:5,minut:0,danc:1,error_count:[7,8,9,13],pre:[4,5,7,8,9,10,13,14],cleaner:1,sai:0,share_id:5,signup_form_id:[0,8,12,9,14],plaintext:[5,9,14],pass:[1,8,9,3],ani:[0,1,2,7,8,9],have:[0,1,5,8,12,9],tabl:5,need:1,seen:5,"null":[7,8,13,10,9,14],kevin:[9,14],signup_mail:0,caus:14,built:1,min:5,check:[8,6,9],offer:1,object_id:14,note:[1,8,9,4],also:[0,4,5,7,8,9,11,13],exampl:[0,1,8,7,5],take:[0,8,4],which:[0,1,4,8,10,12,9,14],some_number_field:0,datacent:[9,14],singl:[0,1,3,4,5,8,10,12,13],excit:11,sure:1,delete_memb:13,normal:9,parent_mail:14,recipient_count:[5,9,14],previou:9,field_id:[10,12,14],last_run_at:7,most:14,rsvp_email:8,"class":[4,5,7,8,9,10,13,14],don:1,member_group_id:[8,9,13],mcconnel:[9,14],url:[1,3,4,5,6,12],mailing_finish:[12,4],clear:10,request:[1,2,9,3],doe:[0,5,7,8,9,10,13],member_status_upd:[12,4],declar:9,tech:4,determin:[1,9],add:[1,8,13,3],dataset:10,dow:0,recipi:9,"6db0cc7e6fdb2da589b65f29d90c96b6":9,show:[4,5,7,8,9,10,11,13,14],text:[10,11,12],radiu:0,syntax:[1,9],radio:10,font:[4,5,7,8,9,10,13,14],fine:9,find:[1,6,5],status_to:8,toast:[7,5,8,13],access:[1,5],giant:12,just:[0,1,9],pretti:8,column_ord:10,"true":[0,1,2,3,4,6,7,8,9,10,13,14],explain:[0,1],winner:9,activ:[1,5,7,8,13,9],figur:1,should:[1,2,3,7,8,11,9],"public":[1,9],templat:[11,14],share_count:5,count:[1,2,3,5],variou:[8,13],confirmed_opt_in:[7,8,9,13],familiar:1,express:0,account:[1,4,5,7,8,9,10,13,14],repo:1,cannot:[8,9,4],progress:9,report:[10,8],requir:[1,7,8,10,11,9],object:[1,13,5],receiv:[0,2,5,8,12,9],favorite_food:[5,7,8,13,10,9],bar:0,organ:1,include_archiv:[5,9],search_id:7,"default":[5,11,13,4,9],ref_member_id:5,message_share_click:[12,4],through:[1,8,9,4],where:[0,1,8,11,7],view:1,respond:8,set:[0,1,2,3,6,8,9,12,13],link_id:[0,5,12,9,14],see:[7,1,8],result:[0,1,2,5,8,9],respons:[10,8,9,13],fail:[5,9,4],themselv:2,member_field:[0,7],xxxxx:6,subject:[5,8,12,9,14],statu:[1,4,5,7,8,9,13],fancyonion:11,kei:[0,1,8,11,4],is_schedul:9,message_forward:[12,4],databas:8,someth:1,last_modified_at:[7,8,9,13],addresse:5,written:1,between:[0,7,2],"import":[1,8,4,10],subscript:[1,3],entiti:1,curlopt_url:[1,6,3],email:[0,1,5,7,8,9,13],wide:14,cancel_by_user_id:[9,14],extend:1,numer:10,http404:[4,5,7,8,9,10,13,14],job:13,entir:[0,8],share_click:5,to_group_id:13,curlopt_returntransf:[1,6,3],curl_setopt:[1,6,3],member_remove_from_group:[12,4],send_start:[0,9,14],protect:1,accident:2,last:[0,5,10],delimit:5,lentil:7,pertain:5,message_click:[12,4],curlopt_post:[1,3],audienc:[1,8,9],mang:0,improv:1,http500:14,seri:5,com:[4,5,6,7,8,9,11,13],zip_code_field:0,"03t15":[7,5,8,13],point:1,toni:[7,8],overview:5,period:1,colon:[7,11],optout_count:[7,8,9,13],suppli:9,cancel:9,tuesdai:0,duplic:5,quit:[5,8],user_id:4,recur:14,headsup:9,addition:[1,2],due:5,been:[1,8,10,5],mark:[8,9],whom:9,tshow:[4,5,7,8,9,10,13,14],trigger:[5,7,8,13,10,9],unsubscrib:0,treat:8,interest:[10,4],basic:[0,1,4,8,13,14],monthli:[7,8,13],addit:[8,9,13],member_delet:[12,4],hesit:1,blob:4,email_us:[0,5],mailing_mailing_id:5,mailing_id:[0,5,8,12,9,14],fire:[8,4,14],xxx:[1,3],rubi:1,argument:[0,5],link_ord:[5,9],input:1,present:7,statist:8,"case":[1,8],look:[1,14,10],frozen:9,shortcut_nam:10,email_error:[7,8,9,13],defin:[0,10,8,9],"while":0,smith:[7,5,8,9,13],outcom:5,abov:[0,1,8,7],error:[1,3,6,8,10,13],veen:1,loop:8,opt:[0,4,5,7,8,13],readi:9,deliv:5,recipient_group:9,equal:0,itself:0,new_statu:12,webhook_id:4,account_id:[1,3,4,5,6,7,8,9,10,12,13,14],develop:1,recipient_memb:9,perform:8,make:[1,12,6,10],belong:[0,8,4],same:[8,4],easier:12,member:[10,9,13],python:1,html:9,split:9,opt_in_messag:8,complet:[1,3,4,6,8,9],week:0,finish:[5,4],http:[1,2,3,4,5,6,11,9],nest:0,someon:4,rais:[4,5,7,8,9,10,13,14],winner_id:9,php:1,studi:1,recent:[1,8],kept:11,center:0,well:[1,5],inherit:9,person:9,mailing_typ:[9,14],without:[0,1],command:1,thi:[0,1,4,5,7,8,9,10,12,13,14],undefin:0,http_code:[1,6,3],latest:11,construct:[0,7,9],identifi:8,paus:9,execut:[1,3],less:0,"boolean":[1,5,7,8,9,10,13,14],resp:[4,5,7,8,9,10,13,14],"_post":[1,3],against:0,aspect:13,recipient_email:9,source_filenam:8,yet:5,languag:1,"12t09":[7,8],display_nam:10,easi:[1,12,10],"01t00":8,had:0,littl:1,blog:4,rsvp_name:8,other:[1,8,9,3,5],curlopt_userpwd:[1,6,3],import_finish:[8,12,4],schedul:9,els:[1,6,3],save:7,match:[0,7],build:1,sanit:1,applic:[1,6,3],around:1,handl:1,disposit:1,crud:[8,13,14],print_r:[6,3],mailing_statu:[9,14],know:[1,4,5],background:13,parent_mailing_id:[9,14],bit:1,insert:11,ignor:8,emma:[7,5,8,9,13],like:1,onion:11,deprec:4,arbitrari:8,manual:9,integ:[1,8,14,10,5],collect:1,href:[4,5,7,8,9,10,13,14],necessari:8,either:[0,5,7],bunch:0,output:9,group_id:[1,8,12,3],soft:[0,5],manag:[0,1,13,4],import_id:[8,12],www:[5,9],old:7,deal:[8,13],captur:1,arrai:[0,1,3,5,6,7,8,9,10,12,13,14],some:[1,11,5],back:8,field_delet:[12,4],opt_in_subject:8,intern:10,sampl:[1,4,5,7,8,9,10,13,14],elaps:[2,9],unless:1,deleted_at:[7,8,13,10,9,14],some_string_field:0,librari:11,woodcock:1,emmarubi:1,bounce_count:[7,8,9,13],emmapython:1,public_kei:4,deliveri:5,broad:12,per:5,send_finish:[9,14],larg:[0,2],condit:7,three:9,network_cod:12,localhost:9,emmaphp:1,with_html_bodi:9,who:[0,5,8],bold:[4,5,7,8,9,10,13,14],event_typ:14,inspect:1,usag:[1,8],monsewicz:1,num_members_ad:8,fulli:11,from:[1,4,8,9,13,14],post:[1,3,4,7,8,9,10,13,14],group_creat:[12,4],gladi:[7,5,8,13],hurst:1,actual:5,zip:0,groups_upd:8,column:10,page:[1,2],includ:[1,5,7,8,9,10,13],webview:9,mean:0,disabl:[9,14],block:[1,2],yyyi:5,own:[1,8],member_data:[1,3],glob:0,bounc:[0,5],within:[0,8],encod:[9,4],delivery_typ:[5,8],compos:0,webview_shar:5,pair:11,field_typ:10,active_count:[7,8,9,13],public_webview_url:9,aben:1,pivot:5,your:[1,4,5,7,8,9,10,13],websit:11,fast:8,van:1,wai:[1,12],area:1,overus:2,group_nam:[8,12,13,9],support:[1,12],unique_click:5,iter:2,submit:1,custom:[5,8,11,10],avail:[0,11,4],start:[1,2,8,4],interfac:12,send_at:[9,14],exceed:2,"var":3,purged_at:[7,8,9,13,14],interv:14,fork:1,head:[1,6,9,3],form:[1,3,4,6,8,10,14],enough:2,forc:1,forward:[0,5,8,9,4],"31st":0,group_typ:[8,9,13],push_offset_unit:14,link:[0,4,5,11,9,14],oauth:14,line:[1,5],realli:1,opt_out_url:8,archived_t:[9,14],info:4,pull:[1,2],made:1,possibl:[5,8,12],whether:8,maximum:2,tell:12,http403:9,record:[0,7,8],below:[0,1,8,12],http400:[7,8,9],limit:[5,2,8,9],some_array_field:0,otherwis:[1,8,10],start_t:14,mta:5,expect:1,notif:9,creat:[4,5,7,13,10,9,14],"int":5,retriev:[7,1,2,8,9],year:[0,5,9,14],repres:5,exist:[0,4,5,7,8,10,13],behavior:11,bob:[7,5],curl:[1,6],failure_messag:[9,14],portland:1,probabl:14,echo:[1,3],successfulli:[5,8,9],mailing_subject:12,grp:13,extract:11,user:[0,1,8,9,13],when:[8,12,4,9],detail:[1,4,7,8,9,10,13],invalid:[7,8,9],event:[4,7,8,13,12,9,14],valid:[5,8,9,13],futur:1,num_skip:8,failure_t:[9,14],test:[5,6,7,13,9,14],signup_integr:14,you:[0,1,2,4,5,7,8,9,10,11,12,13],emmasdk:1,member_status_id:[7,5,8,9,13],public_api_kei:[1,6,3],stat:[5,9],claus:[0,7],event_nam:[12,4],e2ma:[1,2,6,3],error_messag:8,param:[9,4],app_messag:[1,3],ella:8,bulk:[1,8],clicked_uniqu:5,heads_up_email:9,longer:9,home:11,confirm:8,descript:[4,14],ohmyemma:1,portion:0,opted_out:5,time:[1,2,8,13,5],reply_to:[9,14],resource_url:12,inc:1,hello:[11,9,14]},objtypes:{"0":"http:get","1":"http:put","2":"http:post","3":"http:delete"},objnames:{"0":["http","get","HTTP get"],"1":["http","put","HTTP put"],"2":["http","post","HTTP post"],"3":["http","delete","HTTP delete"]},filenames:["member_search","index","pagination","php_signup_example","api/external/webhooks","api/external/response","php_get_member_example","api/external/searches","api/external/members","api/external/mailings","api/external/fields","placeholders","webhooks","api/external/groups","api/external/triggers"],titles:["Search Syntax","Emma API","Pagination","PHP Signup Example","Webhooks","Response","PHP Get Member By Email Example","Searches","Members","Mailings","Fields","Placeholder Syntax","Webhook Usage","Groups","Triggers"],objects:{"":{"/#account_id/members/#member_id/groups/remove":[8,1,1,"put--#account_id-members-#member_id-groups-remove"],"/#account_id/mailings/#mailing_id/winner/#winner_id":[9,2,1,"post--#account_id-mailings-#mailing_id-winner-#winner_id"],"/#account_id/response/#mailing_id/in_progress":[5,0,1,"get--#account_id-response-#mailing_id-in_progress"],"/#account_id/members/groups/remove":[8,1,1,"put--#account_id-members-groups-remove"],"/#account_id/mailings/#mailing_id/searches":[9,0,1,"get--#account_id-mailings-#mailing_id-searches"],"/#account_id/fields":[10,2,1,"post--#account_id-fields"],"/#account_id/members/#group_id/copy":[8,1,1,"put--#account_id-members-#group_id-copy"],"/#account_id/members/signup":[8,2,1,"post--#account_id-members-signup"],"/#account_id/members/status":[8,1,1,"put--#account_id-members-status"],"/#account_id/response/#mailing_id/shares/overview":[5,0,1,"get--#account_id-response-#mailing_id-shares-overview"],"/#account_id/webhooks/events":[4,0,1,"get--#account_id-webhooks-events"],"/#account_id/members/#member_id/optout":[8,0,1,"get--#account_id-members-#member_id-optout"],"/#account_id/webhooks":[4,3,1,"delete--#account_id-webhooks"],"/#account_id/fields/#field_id":[10,3,1,"delete--#account_id-fields-#field_id"],"/#account_id/response/#mailing_id":[5,0,1,"get--#account_id-response-#mailing_id"],"/#account_id/groups/#member_group_id/members/remove":[13,3,1,"delete--#account_id-groups-#member_group_id-members-remove"],"/#account_id/searches":[7,2,1,"post--#account_id-searches"],"/#account_id/members/imports":[8,0,1,"get--#account_id-members-imports"],"/#account_id/forwards/#mailing_id/#member_id":[9,2,1,"post--#account_id-forwards-#mailing_id-#member_id"],"/#account_id/response/#mailing_id/customer_share_clicks":[5,0,1,"get--#account_id-response-#mailing_id-customer_share_clicks"],"/#account_id/mailings/#mailing_id/messages/#member_id":[9,0,1,"get--#account_id-mailings-#mailing_id-messages-#member_id"],"/#account_id/members/#member_id/mailings":[8,0,1,"get--#account_id-members-#member_id-mailings"],"/#account_id/groups/#from_group_id/#to_group_id/members/copy":[13,1,1,"put--#account_id-groups-#from_group_id-#to_group_id-members-copy"],"/#account_id/triggers":[14,2,1,"post--#account_id-triggers"],"/#account_id/triggers/#trigger_id":[14,3,1,"delete--#account_id-triggers-#trigger_id"],"/#account_id/members/delete":[8,1,1,"put--#account_id-members-delete"],"/#account_id/mailings/#mailing_id/groups":[9,0,1,"get--#account_id-mailings-#mailing_id-groups"],"/#account_id/response/#mailing_id/forwards":[5,0,1,"get--#account_id-response-#mailing_id-forwards"],"/#account_id/members/#member_id":[8,3,1,"delete--#account_id-members-#member_id"],"/#account_id/triggers/#trigger_id/mailings":[14,0,1,"get--#account_id-triggers-#trigger_id-mailings"],"/#account_id/searches/#search_id/members":[7,0,1,"get--#account_id-searches-#search_id-members"],"/#account_id/members/status/:status_from/to/:status_to":[8,1,1,"put--#account_id-members-status--status_from-to--status_to"],"/#account_id/response/#mailing_id/sends":[5,0,1,"get--#account_id-response-#mailing_id-sends"],"/#account_id/members":[8,3,1,"delete--#account_id-members"],"/#account_id/members/email/:email":[8,0,1,"get--#account_id-members-email--email"],"/#account_id/response/#mailing_id/links":[5,0,1,"get--#account_id-response-#mailing_id-links"],"/#account_id/searches/#search_id":[7,3,1,"delete--#account_id-searches-#search_id"],"/#account_id/members/imports/#import_id/members":[8,0,1,"get--#account_id-members-imports-#import_id-members"],"/#account_id/fields/#field_id/clear":[10,2,1,"post--#account_id-fields-#field_id-clear"],"/#account_id/groups/#member_group_id/members":[13,3,1,"delete--#account_id-groups-#member_group_id-members"],"/#account_id/members/imports/#import_id":[8,0,1,"get--#account_id-members-imports-#import_id"],"/#account_id/response":[5,0,1,"get--#account_id-response"],"/#account_id/response/#mailing_id/opens":[5,0,1,"get--#account_id-response-#mailing_id-opens"],"/#account_id/members/imports/delete":[8,3,1,"delete--#account_id-members-imports-delete"],"/#account_id/mailings":[9,2,1,"post--#account_id-mailings"],"/#account_id/mailings/cancel/#mailing_id":[9,3,1,"delete--#account_id-mailings-cancel-#mailing_id"],"/#account_id/mailings/validate":[9,2,1,"post--#account_id-mailings-validate"],"/#account_id/response/#mailing_id/deliveries":[5,0,1,"get--#account_id-response-#mailing_id-deliveries"],"/#account_id/mailings/#mailing_id/members":[9,0,1,"get--#account_id-mailings-#mailing_id-members"],"/#account_id/response/#share_id/customer_share":[5,0,1,"get--#account_id-response-#share_id-customer_share"],"/#account_id/webhooks/#webhook_id":[4,3,1,"delete--#account_id-webhooks-#webhook_id"],"/#account_id/members/add":[8,2,1,"post--#account_id-members-add"],"/#account_id/members/email/optout/:email":[8,1,1,"put--#account_id-members-email-optout--email"],"/#account_id/response/#mailing_id/optouts":[5,0,1,"get--#account_id-response-#mailing_id-optouts"],"/#account_id/response/#mailing_id/shares":[5,0,1,"get--#account_id-response-#mailing_id-shares"],"/#account_id/groups/#member_group_id":[13,3,1,"delete--#account_id-groups-#member_group_id"],"/#account_id/mailings/#mailing_id":[9,3,1,"delete--#account_id-mailings-#mailing_id"],"/#account_id/members/#member_id/groups":[8,3,1,"delete--#account_id-members-#member_id-groups"],"/#account_id/groups":[13,2,1,"post--#account_id-groups"],"/#account_id/response/#mailing_id/clicks":[5,0,1,"get--#account_id-response-#mailing_id-clicks"],"/#account_id/mailings/#mailing_id/headsup":[9,0,1,"get--#account_id-mailings-#mailing_id-headsup"],"/#account_id/response/#mailing_id/signups":[5,0,1,"get--#account_id-response-#mailing_id-signups"],"/#account_id/response/#mailing_id/customer_shares":[5,0,1,"get--#account_id-response-#mailing_id-customer_shares"]}},titleterms:{oper:0,quickstart:1,creat:12,"boolean":0,overview:[0,1,11,12],interv:0,share:12,syntax:[0,11],api:1,wrapper:1,respons:5,open:12,click:12,categori:1,statu:12,from:12,delet:12,todo:11,messag:12,member:[8,6,12],field:[10,12],add:12,trigger:14,call:1,forward:12,mail:[12,9],document:1,email:6,updat:12,finish:12,get:6,webhook:[12,4],signup:[12,3],usag:12,search:[0,7],word:1,"import":12,date:0,group:[12,13],post:12,php:[6,3],data:12,addit:1,placehold:11,term:0,wise:1,optout:12,remov:12,predic:0,filter:0,exampl:[6,3],pagin:2,emma:1}}) \ No newline at end of file diff --git a/webhooks.html b/webhooks.html new file mode 100644 index 0000000..7dd1636 --- /dev/null +++ b/webhooks.html @@ -0,0 +1,532 @@ + + + + + + + + + Emma API Documentation | Emma, Inc. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +

      Emma API Documentation

      +
      +
      + + +
      +
      +
      +
      + +
      +

      Webhook Usage

      +
      +

      Webhook Overview

      +

      Webhooks are an easy way to have Emma’s system notify you when certain events +occur. In general, you will use our API to tell us which events you want to +be notified about. When those events occur, we will make a POST to the URL +you have provided with a particular set of data.

      +

      We have a broad array of triggering events and an easy API interface +to create webhooks for each event. We do have documentation of the webhook +API.

      +

      Below is a list of each triggering event we currently support and the data +that will be sent when that event occurs.

      +
      +
      +

      Webhook Post Data

      +
      +

      Member Signup

      +
      {
      +        "event_name": "member_signup",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id
      +            }
      +}
      +
      +
      +
      +
      +

      Message Open

      +
      {
      +        "event_name": "message_open",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Message Click

      +
      {
      +        "event_name": "message_click",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp,
      +            "link_id": link_id
      +            }
      +}
      +
      +
      +
      +
      +

      Member Optout

      +
      {
      +        "event_name": "member_optout",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Message Share

      +
      {
      +        "event_name": "message_share",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp,
      +            "network": network_code
      +            }
      +}
      +
      +
      +
      +
      +

      Message Share Click

      +
      {
      +        "event_name": "message_share_click",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp,
      +            "network": network_code
      +            }
      +}
      +
      +
      +
      +
      +

      Message Forward

      +
      {
      +        "event_name": "message_forward",
      +        "data": {
      +            "account_id": account_id,
      +            "member_id": member_id,
      +            "mailing_id": mailing_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Mailing Finish

      +
      {
      +        "event_name": "mailing_finish",
      +        "data": {
      +            "mailing_id": mailing_id,
      +            "account_id": account_id,
      +            "subject": mailing_subject,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Import Finish

      +
      {
      +        "event_name": "import_finish",
      +        "data": {
      +            "import_id": import_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url,
      +            "group_ids": group_ids,
      +            "contact_count": contact_count
      +            }
      +}
      +
      +
      +
      +
      +

      Member Add

      +
      {
      +        "event_name": "member_add",
      +        "data": {
      +            "member_id": member_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "signup_form_id": signup_form_id,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Member Update

      +
      {
      +        "event_name": "member_update",
      +        "data": {
      +            "member_id": member_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Member Delete

      +
      {
      +        "event_name": "member_delete",
      +        "data": {
      +            "member_id": member_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Member Add To Group

      +

      It’s possible that instead of an array for member_ids or group_ids you +may receive a string with the text all. Because of calls that can add a +member to all groups or add all members to a single group, this is easier +than returning a giant list of IDs.

      +
      {
      +        "event_name": "member_add_to_group",
      +        "data": {
      +            "member_ids": {member_ids},
      +            "account_id": account_id,
      +            "timestamp": timestamp.
      +            "group_ids": {group_ids}
      +            }
      +}
      +
      +
      +
      +

      Member Remove From Group

      +

      It’s possible that instead of an array for member_ids or group_ids you +may receive a string with the text all. Because of calls that can remove a +member from all groups or remove all members from a single group, this is +easier than returning a giant list of IDs.

      +
      {
      +        "event_name": "member_remove_from_group",
      +        "data": {
      +            "member_ids": {member_ids},
      +            "account_id": account_id,
      +            "timestamp": timestamp.
      +            "group_ids": {group_ids}
      +            }
      +}
      +
      +
      +
      +

      Group Create

      +
      {
      +        "event_name": "group_create",
      +        "data": {
      +            "group_id": group_id,
      +            "group_name": group_name,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Group Delete

      +
      {
      +        "event_name": "group_delete",
      +        "data": {
      +            "group_id": group_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Group Update

      +
      {
      +        "event_name": "group_update",
      +        "data": {
      +            "group_id": group_id,
      +            "group_name": group_name,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Field Create

      +
      {
      +        "event_name": "field_create",
      +        "data": {
      +            "field_id": field_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Field Delete

      +
      {
      +        "event_name": "field_delete",
      +        "data": {
      +            "field_id": field_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Field Update

      +
      {
      +        "event_name": "field_update",
      +        "data": {
      +            "field_id": field_id,
      +            "account_id": account_id,
      +            "timestamp": timestamp,
      +            "resource_url": resource_url
      +            }
      +}
      +
      +
      +
      +
      +

      Member Status Update

      +
      {
      +        "event_name": "member_status_update",
      +        "data": {
      +            "member_ids": {member_ids},
      +            "account_id": account_id,
      +            "new_status": new_status,
      +            "timestamp": timestamp
      +            }
      +}
      +
      +
      +
      +
      +

      Subscriptions Member Opted Out

      +
      {
      +        "event_name": "subscriptions-member-opted-out",
      +        "data": {
      +            "member_id": member_id,
      +            "subscripition_id": subscripition_id,
      +            "account_id": account_id,
      +            }
      +}
      +
      +
      +
      +
      +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + +

      Related Topics

      + + + + + +
      +

      Interested in Emma?

      +

      Emma's email marketing makes communicating simple and stylish. Get started today.

      +
      +
      +
      +
      +
      + + + \ No newline at end of file