Skip to content

Create External Activity Event

John McCarthy edited this page Jul 3, 2013 · 9 revisions

POST /api/movements/:movement_id/external_activity_events(.:format)

Creates an external activity event, creates or updates a user

Parameters
movement_id
Mandatory
Movement ID. This is specified in the API url.
source
Mandatory
The external source of data.
partner
Optional
Partner organization slug if the action was created by a partner organization.
role
Mandatory
The user's role with respect to the action (e.g. 'creator', 'signer').
action_slug
Mandatory
Slug uniquely identifying the action at the external source.
action_language_iso
Mandatory
Two-letter iso code for language of the action.
activity
Mandatory
The user's activity with respect to the action ('action_taken', or 'action_created').
tags
Optional
An array of tags associated with the action.
t
Optional
Tracking hash provided by the Platform on links to the external source. This allows the Platform to track which email generated traffic and actions for an external source.
user
Mandatory
A hash of user data. :email is the only required field. The optional fields are: :language_iso_code (2-letter), :country_iso_code (2-letter), :first_name, :last_name, :postcode, :mobile_number, :home_number, :street_address, :suburb, :state.

Response

Status Code

201 if Created
422 if invalid external activity event or user
500 if exception

Content

N/A

Example Request

POST /api/movements/test-movement/external_activity_events.json
Content-Type: application/x-www-form-urlencoded

action_language_iso=en&action_slug=take_action&activity=action_taken&role=signer&source=controlshift&user%5Bemail%5D=bob%40example.com

Example Response

201 (Created)

back