Delib | Developer Docs
Knowledge Base
  • Delib
    • 👋Welcome
    • Our Products
  • Security Centre
    • Information Security
      • Service Level Agreement (SLA)
      • Disaster Recovery
      • Certifications
      • Information Security Downloadable Documents
    • Privacy and GDPR
      • How do Delib's products comply with the GDPR?
      • Delib Sub Processors
  • Citizen Space
    • Getting Started With Citizen Space
    • Deployment Requirements
      • How to set up a CNAME record for a custom domain name
      • Department structures
      • Users and permissions
      • Theming requirements
    • Security Configurations
      • Single Sign On (SSO)
        • Citizen Space Single Sign-on (SSO) - Linking Accounts
      • Two factor authentication (2FA)
      • Configurable password policy
      • Log in back-off
      • Security Notifications
      • Password reset date on export
      • Session Length
    • Integrations
      • How to integrate Citizen Space into existing website
    • Data API
      • API specification
      • Generating API keys
      • Basic Auth headers with Citizen Space
    • Public API
      • Public API v2.x guide
      • Version 2.4 reference
    • Webhooks
      • Creating and managing webhooks
  • Geospatial
    • Set-up process for existing customers
      • How to find your Ordnance Survey API key
      • Linking your Ordnance Survey account to Citizen Space
  • Integrations and Playbooks
    • Google Looker Studio
      • Google Looker Studio
      • Google Looker Studio Simple Activity Counts
    • Microsoft
      • PowerBI Dashboards
Powered by GitBook
On this page
  • What are webhooks?
  • Webhooks available in Citizen Space
  • Sample response
  1. Citizen Space

Webhooks

PreviousVersion 2.4 referenceNextCreating and managing webhooks

Last updated 1 year ago

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"
}
{
  "error": "Invalid request"
}
Creating and managing webhooks