REST Hooks / Event Notifications

Actionstep implements a common notification method called REST Hooks (http://resthooks.org).

This is a simple way for your application to receive instant notifications from Actionstep as soon as an event has occurred. For example, you might listen for the "ActionCreated" event and use that notification to create a record in another system, or even to make changes to the action inside actionstep.

Registering for a REST Hook

To register for a REST hook, you simply need to make a regular API request to the /resthooks endpoint, for example:

POST https://api.actionstep.com/api/rest/resthooks
{ "resthooks": [ { "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/resthook-callbacks?callback_id=12345" } ] }

RESPONSE:

HTTP/1.1 200 OK

{ "resthooks": [ { "id", "42", "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/resthook-callbacks?callback_id=12345", "triggeredCount": 0, .... } ] }

REST Hook response

Once registered, anytime the "ActionCreated" method is triggered in Actionstep, we will send you a request from the relevant resource in the same format as if you had done a regular GET resource, like GET https://api.actionstep.com/api/rest/actions/123 

POST https://your-application-url.com/resthook-callbacks?callback_id=12345

{ "actions" : [ { "id" : "123", "name": "a newly created action!", ..... } ] } 

Deleting a REST Hook

If you no long require a REST Hook, you can either notify actionstep by replying with a 401 HTTP status when we POST to your server (in which event we'll delete the rest hook) or you can perform a regular REST DELETE request, for example:

DELETE https://api.actionstep.com/api/rest/resthooks/42

Updating a REST Hook

If you need to update the REST Hook (to change the Target URL for example) you can do a regular PUT request, for example:

PUT https://api.actionstep.com/api/rest/resthooks/42
{ "resthooks": [ { "id":"42", "eventName" : "ActionCreated", "targetUrl" : "https://your-application-url.com/some-other-resthook-callback-url?callback_id=12345" } ] }

Supported "Events"

Each "event" that is supported by the REST Hooks code needs to be manually coded by Actionstep, so not everything that you can do in actionstep will have an "event". If you need an event not listed, please contact us and we'll look into getting one created for you.

 

Event Name
Description
Resource
ActionCreatedTriggered when a new action is createdactions
ParticipantCreatedTriggered when a new participant/contact record is created participants 

Related pages