Warning

The XML-RPC API is no longer under active development. While it is still supported, no further improvements or changes will be made to it.

We strongly recommend that you use the REST API instead.

Overview

What Can I Do?

You can process user initiated actions, e.g. signing a petition; you can find users, e.g. using email or akid; you can load pages, e.g. retrieve a petition and it's confirmation email; search action history, e.g. to see if a User has already taken an action; search for Congressional targets or assign Targets to a Page.

The API provides you with access to the core types in ActionKit:

Here is the full list of types you can access via the API:

  • Action
  • ActionField
  • AllowedPageField
  • AllowedUserField
  • BackgroundTask
  • BackgroundTaskDetails
  • CallAction
  • CallPage
  • Candidate
  • CongressTargetGroup
  • DonationAction
  • DonationCancellationAction
  • DonationCancellationPage
  • DonationHPCRule
  • DonationPage
  • DonationUpdateAction
  • DonationUpdatePage
  • EventCreateAction
  • EventCreatePage
  • EventSignupAction
  • EventSignupPage
  • FormField
  • ImportAction
  • ImportPage
  • Language
  • List
  • Location
  • Order
  • OrderDetail
  • OrderRecurring
  • OrderShippingAddress
  • OrderUserDetail
  • Page
  • PageField
  • PageFollowup
  • PetitionAction
  • PetitionPage
  • Phone
  • Product
  • RedirectAction
  • RedirectPage
  • SignupAction
  • SignupPage
  • SpecialTarget
  • SpecialTargetGroup
  • SurveyAction
  • SurveyPage
  • Tag
  • Target
  • TargetGroup
  • TargetList
  • Template
  • TemplateSet
  • UnsubscribeAction
  • UnsubscribePage
  • Upload
  • UploadError
  • UploadProgressUploadWarning
  • User
  • UserField
  • UserUpdateAction
  • UserUpdatePage

as well as the following methods:

ActionKit Users, Pages And Actions

Users are the the people who sign petitions, tell their friends, donate money to you and so on.

Pages are the types of actions that users can take. In most cases, a Page has a real world web page (or pages) associated with it. But in some cases, it's just abstract, e.g. ImportPage. Think of Pages as the types of things that a User can do in ActionKit.

Actions are the result of a User taking action with a Page. All actions share some information, but some actions will have their own extended fields as well.

Common Interface To All Objects

Almost all of the ActionKit Objects use the same shared interface. The methods get(), search(), create(), save() and save_or_create() let you manipulate instances of various objects in the same way.

See Common API Functions for more detail.

The act() Function

ActionKit provides a high-level method for processing user initiated actions. Given a page name and some user information, act() will validate, process an action, send email confirmations, and return information about the action and user.

See Processing User Actions for more detail.

The start_upload() Function

ActionKit provides a high-level method for importing user data. Uploads are useful for loading data about actions that have already happened. Uploads have less strict validation and will not send email confirmations. (start_upload() replaces start_import(). While the older start_import() call is still supported, new development should use start_upload().)

See Importing User Data for more detail.