Webhooks

What are webhooks?

Webhooks are a powerful feature that allow Citizen Space to notify other systems or services about specific events or updates in real-time. Whether you need to update data in external applications, or send notifications to users or administrators, webhooks provide a flexible and efficient solution for automating workflows and enhancing the functionality of your software.

Webhooks are commonly used in various scenarios such as:

  • Real-time Updates: They enable real-time communication between Citizen Space and different applications or services, allowing for immediate action upon certain events.

  • Integration: They facilitate integration between different systems, allowing Citizen Space to communicate and share data securely and seamlessly.

  • Automation: They help automate workflows by triggering actions based on specific events, reducing manual effort and improving efficiency.

  • Notifications: They can be used to send notifications to external systems or services, alerting them of important events as they occur on your platform.

Webhooks available in Citizen Space

There are a number of webhooks available in Citizen Space that trigger on respondent and user actions, activity events such as opening or closing, through to system events such as an admin user being suspended. These are:

Responses

  • Response created

  • Response submitted

  • Response analysis modified

  • Response analysis completed

  • Mailing list subscriber added

Activities

  • Activity created

  • Activity published

  • Activity retracted

  • Activity state changed

Users

  • User created

  • User suspened / reinstated

  • User profile edited

  • User deleted

Sample response

In this example we have set up a webhook trigger to fire when a response is submitted to any activity across the site. Below is a sample webhook payload which is sent that could then trigger further automations or notifications that include important information such as the activity and response_id.

POST /response_submitted

Response

{
  "department_id": "demo",
  "activity_id": "bushfire-risk-management",
  "activity_uid": "46295cac2d65426b8a3d3c1432394047",
  "response_id": "ANON-4515-WDZV-T",
  "api_url": "https://demo.citizenspace.com/api/1/activities/46295cac2d65426b8a3d3c1432394047/responses/ANON-4515-WDZV-T",
  "event": "response_submitted"
}
Creating and managing webhooks

Last updated