Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CRM-5998] #52

Draft
wants to merge 264 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
264 commits
Select commit Hold shift + click to select a range
c6dbfe4
Update audience documentation.
lroggendorff Jan 3, 2013
cb80fbe
Update audience documentation.
lroggendorff Jan 3, 2013
e12473c
Update audience documentation.
lroggendorff Jan 4, 2013
41c9922
Update audience documentation.
Jan 7, 2013
483d514
Update audience documentation.
Jan 9, 2013
9d56004
Update audience documentation.
Jan 10, 2013
f4f961c
Update audience documentation.
Jan 10, 2013
0b1f7fe
Update audience documentation.
Jan 11, 2013
50d5edb
Update audience documentation.
Jan 11, 2013
2e76834
Update audience documentation.
Jan 11, 2013
0cffd90
Update audience documentation.
Jan 22, 2013
90d1ba6
Update audience documentation.
Jan 24, 2013
43f7142
Update audience documentation.
Jan 29, 2013
ad2180f
Update audience documentation.
Feb 5, 2013
71dfff6
Update audience documentation.
Feb 5, 2013
f6d5a06
Update audience documentation.
Feb 19, 2013
41b7276
Update audience documentation.
Feb 19, 2013
0ce4291
Update audience documentation.
Feb 26, 2013
89f3d71
Update audience documentation.
Mar 5, 2013
222e481
Update audience documentation.
Mar 19, 2013
4071b38
Update audience documentation.
Mar 20, 2013
daa1c55
Update audience documentation.
Apr 4, 2013
47c7412
Update audience documentation.
Apr 4, 2013
8f6bdd8
Update audience documentation.
Apr 4, 2013
c3d6fa8
Update audience documentation.
Apr 12, 2013
749f3fe
Update audience documentation.
Apr 26, 2013
1b03a93
Update audience documentation.
May 10, 2013
130c9ad
Update audience documentation.
May 14, 2013
25e9a8b
Update audience documentation.
May 22, 2013
14e3fe6
Update audience documentation.
May 29, 2013
eac6bf7
Update audience documentation.
May 29, 2013
2df4387
Update audience documentation.
Jun 27, 2013
0181232
Update audience documentation.
Jul 19, 2013
29f3889
Update audience documentation.
Jul 19, 2013
3e9eba5
Update audience documentation.
Jul 19, 2013
8a33030
Update audience documentation.
Jul 24, 2013
bf5996b
Update audience documentation.
Jul 29, 2013
b19774c
Update audience documentation.
Jul 29, 2013
d6bdf0c
Update audience documentation.
Jul 29, 2013
e6984ae
Update audience documentation.
Jul 29, 2013
821e2fa
Update audience documentation.
Jul 30, 2013
e35c0b9
Update audience documentation.
Aug 22, 2013
efa8c97
Update audience documentation.
Aug 22, 2013
1978bff
Added note to POST /#account_id/members/add
Nov 20, 2013
6b56754
Updated note in Post /#account_id/members/add
Nov 20, 2013
2f0148b
One more time...
Nov 20, 2013
339c3be
Tweaked formatting... last time.
Nov 20, 2013
d5ee029
Update PUT /#account_id/members/#member_id
Nov 20, 2013
9a62c29
Added API Rate Limit Note
Nov 21, 2013
481d949
API Rate Limit Note
Nov 21, 2013
2bd1b95
Update response.html
Jan 28, 2014
7a3effe
Update triggers.html
Feb 18, 2014
70a38b0
Updating docs to reflect API member data field trigger changes.
Feb 18, 2014
faa69c9
Correcting formatting mistakes.
Feb 18, 2014
ec1bf9e
Correcting formatting mistakes.
Feb 18, 2014
de35aa9
Still correcting formatting issues.
Feb 18, 2014
251c041
It's been a while since I've formatted HTML...
Feb 18, 2014
b1f266c
...
Feb 18, 2014
c127522
...
Feb 18, 2014
01cf22c
I'm trying
Feb 18, 2014
6ed589b
I'm trying
Feb 18, 2014
87b1d1e
I'm trying
Feb 18, 2014
556293c
I'm trying
Feb 18, 2014
170f600
Last time
Feb 18, 2014
e6e91c2
Acceptance changes.
Feb 18, 2014
d4600ee
Acceptance changes.
Feb 18, 2014
0373925
Added the S (split) mailing type.
Apr 10, 2014
0424358
Merge branch 'gh-pages' of github.com:myemma/emma-api-documentation i…
rspielvogel Sep 23, 2014
a8d38ed
Add in Node.js wrapper from Nathan Peck
rspielvogel Sep 23, 2014
edc5bac
Merge pull request #1 from myemma/add_node_wrapper
Sep 23, 2014
ac1648b
New signup forms list public api
Mar 9, 2015
d20285d
This param has never been del_status, changing to result, which is wh…
Mar 26, 2015
57e6f60
Update API Copyright on footer. Removing POST for Triggers
Jun 8, 2015
332818e
Add up-to-date img for API Key location
Jun 9, 2015
ba7799b
Removing DELETE /imports/delete because of 500 error. Marked in TDEB-128
Jun 9, 2015
4492d4d
add opt in confirmation paramter
Jun 12, 2015
ed3ed38
remove unecessary period
Jun 15, 2015
e1e453e
Merge pull request #3 from myemma/add-opt-in-confirmation-members-signup
Jun 16, 2015
8fe002a
Add .NET wrapper for Emma API to index.html
Jun 30, 2015
379acdb
Removing public portal that brings to light our private send_mailing API
Jul 2, 2015
a27c641
Content Writer Edit - Index.html
Jul 7, 2015
027b151
Update index.html
dmhalejr Sep 8, 2015
33c0392
Update 10MB taxonomy and import_status
Sep 14, 2015
b8e3042
Merge branch 'gh-pages' of https://github.com/myemma/emma-api-documen…
Sep 14, 2015
6eb0f16
rephrase endpoint description and remove misleading and unused query …
Dec 9, 2015
1888a36
rephrase to match what we went with in audience
Dec 10, 2015
27cd9ff
Merge pull request #5 from myemma/STAB/176_new_approach_v2_fixed_branch
Dec 10, 2015
96b2abc
Updated copy per Emma Mathews (Client Services) to include copy on av…
Jan 4, 2016
33d154b
Merge pull request #6 from myemma/services-content-change-request
Jan 4, 2016
f7bb5df
Added note to ADD and SIGNUP calls that pointed user to relevant Auto…
Mar 31, 2016
889e6ef
Oops...
Mar 31, 2016
41ab43b
One more time...
Mar 31, 2016
c853ceb
added a sample response to the endpoint to get optout informaiton for…
May 5, 2016
5c8d7ca
Creating the page placeholder.
May 26, 2016
4d4524f
checking
May 26, 2016
dd5db61
Checking again
May 26, 2016
f272b10
Let's see what this does...
May 26, 2016
0d9c4d7
Almost there.
May 26, 2016
04e68bd
Update event_api.html
May 26, 2016
2e7bc16
Update event_api.html
May 26, 2016
de70748
Updates from Rodney
May 26, 2016
eab0d3c
Updated links
May 26, 2016
4153e05
Updated response sample
May 26, 2016
e8aecec
no more apostrophe
msdolbey May 31, 2016
2db79f3
Merge pull request #7 from msdolbey/patch-1
May 31, 2016
3cf4827
Link to the Event API doc on homepage.
Jun 3, 2016
750a27d
Undo... that was bad.
Jun 3, 2016
7d0e085
This is the right spot for the menu, but not sure about the right cod…
Jun 3, 2016
c809098
Adjusting
Jun 3, 2016
4030dc9
HTML is hard...
Jun 3, 2016
963885a
Update index.html
bwanamaker Jan 6, 2017
02c651d
Add deprecation notice
bwanamaker Jan 6, 2017
d1126c9
Updated Prev/Next navigation to skip Triggers
Jan 9, 2017
77b82c1
Update `Raises:` in `response.html`
Mar 8, 2017
6814971
Adding automate_field_changes to Members endpoint
Mar 8, 2017
0100ff8
Another update to Members endpoint
Mar 8, 2017
c753263
Correct incorrect placement
Mar 8, 2017
10ce02c
Changed too much last time. Correcting.
Mar 8, 2017
06af24b
Info in wrong spot
Mar 8, 2017
cc1bfcf
Dumb mistake
Mar 8, 2017
ea5b62d
Reformatting
Mar 8, 2017
eb92ba1
Updating paremeter for Members
Mar 8, 2017
61918df
Updating for unapproved status
bwanamaker Jun 16, 2017
a1f3ab8
Update missed doc
bwanamaker Jun 16, 2017
e2111a7
Update index.html
bwanamaker Aug 23, 2017
4b1a349
Update POST URL
bwanamaker Sep 14, 2017
944b484
Update event_api.html
bwanamaker Sep 14, 2017
9f7c298
Adding revision to quickstart guide
Nov 29, 2017
e07a961
Merge pull request #8 from myemma/update/revising-quickstart-guide
travishathaway Nov 29, 2017
c208f63
Adding new resource to documentation
Feb 8, 2018
cee6188
adding another API endpoint
Feb 8, 2018
452389b
change the counts endpoint
Feb 8, 2018
5828cc8
Merge pull request #9 from myemma/update/revising-quickstart-guide
travishathaway Feb 8, 2018
e75e42a
adding missing menu item
Feb 8, 2018
be1f261
Merge branch 'gh-pages' of github.com:myemma/emma-api-documentation i…
Feb 8, 2018
cbc08e6
adding a new parameter to member endpoints
Apr 12, 2018
bea87a8
Merge pull request #10 from myemma/update-member-docs
travishathaway Apr 12, 2018
a261613
adds new param to the PUT method for udpating a member
Apr 13, 2018
1811879
Merge pull request #11 from myemma/update-member-docs
travishathaway Apr 16, 2018
d15b88f
Update members.html
travishathaway Apr 23, 2018
cdaefd8
updating logo, text
Jun 21, 2018
074bc00
adding css rule
Jun 21, 2018
f514328
Reduce logo size.
Cale Jul 2, 2018
650af41
[CAMP-2684] Whitespace.
trey Sep 20, 2018
89782bf
[CAMP-2662] Updating Public API Documentation for the mailings.py API…
donnasmith Sep 21, 2018
576af69
[CAMP-2662] Changing ¶ => ¶
donnasmith Sep 24, 2018
77f7fa6
Merge pull request #12 from myemma/CAMP/2684-documentation-update
trey Sep 24, 2018
34c1932
Merge pull request #13 from myemma/CAMP-2662/update-public-api-docs-f…
donnasmith Sep 24, 2018
5ebc7aa
Synchronize fields api docs to audience docs
biggert Sep 24, 2018
06b0a26
updating response documentation
Courey Sep 28, 2018
9a0b7fd
tweaking hrefs
Courey Sep 28, 2018
3c65c64
Synchronize members api docs to audience docs
biggert Sep 28, 2018
83191ae
fiddly bits
Courey Sep 28, 2018
f738b21
Merge pull request #15 from Courey/CAMP-2683/response_documentation
lroggendorff Sep 28, 2018
8629634
Add exports documentation
biggert Sep 29, 2018
5757e0c
Update webhooks documentation; clarify export download doc
biggert Oct 1, 2018
7573a1e
Merge pull request #14 from myemma/CRM/1711-update-fields-api-doc
biggert Oct 1, 2018
e2fb469
Merge branch 'CRM/1718-add-exports-page' of github.com:myemma/emma-ap…
biggert Oct 1, 2018
3a0a29c
Merge pull request #16 from myemma/CRM/1713-update-members-api-docs
biggert Oct 1, 2018
6283756
updating emma rebrand logo
kcampen Oct 15, 2018
0ede508
Adjusting background-size for new logo.
lroggendorff Oct 15, 2018
7822615
Merge pull request #18 from emmaux/gh-pages
lroggendorff Oct 15, 2018
710f03c
Revert "updating emma rebrand logo"
lroggendorff Oct 15, 2018
71b4e4e
Merge pull request #19 from myemma/revert-18-gh-pages
lroggendorff Oct 15, 2018
3acab13
Ok, new logo is a go!
lroggendorff Oct 15, 2018
512b680
Merge pull request #20 from myemma/reverting-the-revert-of-the-new-logo
lroggendorff Oct 15, 2018
d5f1fb4
update to brand colors, clean up affect
Oct 16, 2018
a45a085
include new header, adjust for new content width
Oct 16, 2018
ba3d768
Replace Proxima with Roboto sitewide
Oct 16, 2018
ffa0c83
remove errant commented code from css
Oct 16, 2018
e8f34a8
Merge pull request #21 from myemma/mkt-style-updates
jperegoy Oct 16, 2018
c2ac3c5
Add the import status of q
biggert Mar 11, 2019
8697b81
Merge pull request #22 from myemma/CRM/2049-add-import-status-q
biggert Mar 12, 2019
b40bee9
Resolves CSE-2645.
Apr 16, 2019
1c92006
Wrapping, escaping link.
Apr 16, 2019
7e11ed6
Merge pull request #23 from slyeargin/CSE/2645-pagination-docs
lroggendorff Apr 16, 2019
dc167bd
Without backticks, this time.
Apr 16, 2019
6245dbb
Merge branch 'gh-pages' into CSE/2645-fix
slyeargin Apr 16, 2019
ee1022a
Merge pull request #24 from slyeargin/CSE/2645-fix
lroggendorff Apr 16, 2019
e667ac1
Updates links to use ssl where appropriate
May 1, 2019
4d10c17
Merge pull request #25 from justinseiter/hc-110/https-links
jairoglyph May 1, 2019
ed1d509
Add document for sending mailings to subscriptions
biggert Jul 29, 2019
a088cbf
new import status
bhenry Aug 14, 2019
c810076
Merge pull request #28 from myemma/crm-2420
bhenry Aug 14, 2019
574b0e3
Adding Exports-API documentation (#29)
meganemorris Sep 17, 2019
185a90e
Adding documentation for subscriptions-api to public documentation (#30)
meganemorris Sep 27, 2019
7abf981
Merge pull request #27 from myemma/CRM/2399-add-mailing-subscriptions
biggert Sep 27, 2019
022fe9c
[CAMP-3664] Adding line about automate_contact_imports to API documen…
donnasmith Oct 15, 2019
7f5d9ee
Merge pull request #31 from myemma/CAMP-3664/update-api-docs-for-manu…
donnasmith Oct 15, 2019
401b10d
first, and most importantly
bhenry Jan 9, 2020
fbc8b8d
include details about valid widget types
bhenry Jan 10, 2020
75fc175
fix typo
bhenry Jan 10, 2020
449af40
use more realistic example request
bhenry Jan 10, 2020
82e7243
add options parameter to field docs
bhenry Jan 10, 2020
43c7cda
verbiage
bhenry Jan 10, 2020
95a8ef8
Merge pull request #34 from myemma/crm-2628
bhenry Jan 13, 2020
5361d3a
Update member delete verbiage in API docs (#35)
meganemorris Jun 12, 2020
c3f76a8
Response Exports API documentation (#36)
meganemorris Feb 23, 2021
b735ddb
Adding tip about account ID for HQ accounts (#37)
meganemorris Apr 27, 2021
98402ed
Add subaccount create documentation
nathanwritescode Jul 15, 2021
5ad95a6
remove from index, leave automation in it's current state
nathanwritescode Jul 15, 2021
717f22c
Merge pull request #38 from nathanwritescode/gh-pages
Jul 15, 2021
953cae1
add documentation for retiring a subaccount
nathanwritescode Jul 21, 2021
ff61799
Merge pull request #39 from nathanwritescode/gh-pages
nathanwritescode Jul 21, 2021
f619a80
add documentation for listing subaccounts
nathanwritescode Jul 26, 2021
a83ee6a
query param is status not statuses
nathanwritescode Jul 26, 2021
cdf5753
Merge pull request #40 from nathanwritescode/gh-pages
nathanwritescode Jul 26, 2021
7db4811
add invite user endpoint documentation, change accounts description
nathanwritescode Jul 28, 2021
37f9d16
remove empty line at top of file, fix links to next page
nathanwritescode Jul 28, 2021
ac0f6e6
Merge pull request #41 from nathanwritescode/gh-pages
nathanwritescode Jul 28, 2021
d98e9b9
correct user invite response shape to final version, remove returns s…
nathanwritescode Aug 2, 2021
da8086d
Merge pull request #42 from nathanwritescode/gh-pages
nathanwritescode Aug 2, 2021
70a083e
add update_user_subaccounts endpoint, link Accounts and Users pages up
nathanwritescode Aug 6, 2021
c1c9230
add list users endpoint
nathanwritescode Aug 10, 2021
df57952
Merge pull request #43 from nathanwritescode/gh-pages
nathanwritescode Aug 10, 2021
67a0e01
fixing link for download endpoint (#44)
meganemorris Sep 29, 2021
7db4c1b
add updated route
nathanwritescode Apr 13, 2022
a8bb4e6
Merge pull request #45 from nathanwritescode/UMAMI-4694_update_list_u…
nathanwritescode Apr 13, 2022
2cfd7cf
member responses updated
epeatfield Mar 23, 2023
b83d50a
adding phone number for adding or updating a member
epeatfield Mar 23, 2023
c4e562f
Adding desciption for criteria
epeatfield Mar 27, 2023
9416830
update to sms
epeatfield Mar 28, 2023
3a4cb63
Merge pull request #46 from myemma/SMS-594-api-docs
epeatfield Apr 3, 2023
7d42ad5
Update plan names to latest offerings
biggert Jul 10, 2023
b21175c
Merge pull request #47 from myemma/CRM/4893-package-names-update
biggert Jul 10, 2023
d34acfd
remove calendar call from documentation
nathanwritescode Aug 4, 2023
6e7f8d9
Merge pull request #48 from myemma/UMAMI-6034_remove_calendar_call
nathanwritescode Aug 4, 2023
9782daa
set up & adding first endpoint
Nov 17, 2023
199992c
fix navigation
Nov 17, 2023
c8571bf
second endpoint & adding to index
Nov 17, 2023
e857e2b
third endpoint
Nov 17, 2023
91f0b6f
fourth endpoint
Nov 17, 2023
8438cf9
descriptions updates
Nov 17, 2023
8232cc6
branding
Nov 17, 2023
1d72610
Update api/external/sms.html
epeatfield Nov 17, 2023
94c8590
Merge branch 'CRM-5237' of github.com:myemma/emma-api-documentation i…
Nov 17, 2023
436e1d8
fixing next & previous
Nov 17, 2023
e63834d
adding sms key to individual member add
Nov 20, 2023
cf9d25d
final points for sms stuff
Nov 20, 2023
b4db74c
Merge pull request #49 from myemma/CRM-5237
biggert Dec 7, 2023
88939af
bare minimum change to documentation (#50)
bhenry Jan 8, 2024
8ae82fa
adding billing credit usage endpoint
Feb 15, 2024
98383be
Adding parameters
Feb 15, 2024
308ab58
Update api/external/sms.html
epeatfield Feb 15, 2024
d7a22d8
adding some extra info
Feb 15, 2024
7d8e84e
Merge pull request #51 from myemma/CRM-5400
epeatfield Feb 16, 2024
674f482
add section of documentation for new webhook
briwyatt Jul 23, 2024
5558c5c
add link
briwyatt Jul 24, 2024
fab38e3
member opt out
briwyatt Jul 24, 2024
d324e36
change name
briwyatt Jul 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
.buildinfo
.idea

*.swp
*.swo

Empty file added .nojekyll
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
api.myemma.com
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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/.
Binary file added _images/api_key.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions _sources/api/external/fields.txt
Original file line number Diff line number Diff line change
@@ -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

12 changes: 12 additions & 0 deletions _sources/api/external/groups.txt
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions _sources/api/external/mailings.txt
Original file line number Diff line number Diff line change
@@ -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

19 changes: 19 additions & 0 deletions _sources/api/external/members.txt
Original file line number Diff line number Diff line change
@@ -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

11 changes: 11 additions & 0 deletions _sources/api/external/response.txt
Original file line number Diff line number Diff line change
@@ -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

9 changes: 9 additions & 0 deletions _sources/api/external/searches.txt
Original file line number Diff line number Diff line change
@@ -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

8 changes: 8 additions & 0 deletions _sources/api/external/triggers.txt
Original file line number Diff line number Diff line change
@@ -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

10 changes: 10 additions & 0 deletions _sources/api/external/webhooks.txt
Original file line number Diff line number Diff line change
@@ -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

182 changes: 182 additions & 0 deletions _sources/index.txt
Original file line number Diff line number Diff line change
@@ -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 <https://myemma.com/status>`_.

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! <mailto:[email protected]>`_

**PHP**
`EmmaPHP <https://github.com/myemma/EmmaPHP>`_ : Commissioned by Emma and built by Nashville developer `Dennis Monsewicz <https://github.com/dennismonsewicz>`_.

`OhMyEmma <https://github.com/jwoodcock/OhMyEmma>`_: Built by Nashville developer `Jacques Woodcock <https://github.com/jwoodcock>`_.

`Emma <https://github.com/markroland/emma>`_: Built by Nashville-based `Abenity, Inc <http://www.abenity.com/>`_.

**Python**
`EmmaPython <https://github.com/myemma/EmmaPython>`_: Built by Emma's own `Doug Hurst <https://github.com/dalanhurst>`_.

**Ruby**
`EmmaRuby <https://github.com/myemma/EmmaRuby>`_: Commissioned by Emma and built by Nashville developer `Dennis Monsewicz <https://github.com/dennismonsewicz>`_.

**Objective-C**
`EmmaSDK <https://github.com/myemma/EmmaSDK>`_: Commissioned by Emma and built by Portland developer `Benjamin Van Der Veen <https://github.com/bvanderveen>`_.

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 <php_signup_example>`.
Additionally, there's a PHP example to :doc:`get members using their email
address <php_get_member_example>`.

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
Loading