docs.zenspace.io
  1. Iftt
docs.zenspace.io
  • 🧭 Introduction
  • 🧱 System Components
  • 🧰 Tech Stack
  • 🏗️ System Architecture
  • 🌐 Deployment Architecture
  • 🗄️ Database Design Documentation
  • API Endpoints
    • RaspberryPi
      • Heartbeat API
      • Retrieve all active sensors and device permissions
      • Control a device (e.g., turn on/off, adjust intensity)
      • Enable or disable a device
      • Register a meeting space ID and retrieve network details
    • Meeting Space
      • Schedule meeting space state
      • Get meeting spaces by customer
      • Get meeting space state by ID
      • Get meeting space state by device ID
      • Disable meeting space state
      • Send meeting space state by meeting space ID
      • Store meeting space availability
      • Create Google Calendar
    • Device Management
      • Create device
      • Create device sensors
      • Create or update admin unlock codes
      • Upload meeting space screenshot
    • Authentication
      • Create authorization token
    • Messaging
      • Send message to Android device
    • Booking
      • Send meeting space state by booking ID
      • Create or update booking
    • Iftt
      • Create a new event with conditions and actions
        POST
  1. Iftt

Create a new event with conditions and actions

POST
/meetingspace/iftt_event
Last modified:2025-09-05 13:37:13
This endpoint creates an event in the system along with its conditions and actions.
Multiple conditions can be created for a single event.
Conditions are referenced in the logical equation by their name.
Multiple actions can be triggered if the logical equation evaluates to true.

Request

Authorization
API Key
Add parameter in header
X-API-Key
Example:
X-API-Key: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢201Created
application/json
Event created successfully
Body

🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/meetingspace/iftt_event' \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "meeting_space_id": "0a8c781d-bd46-4615-8f6f-bd329a55eb4d",
    "name": "string",
    "notification_frequency": "one_time",
    "is_active": true,
    "conditions": [
        {
            "name": "string",
            "type": "sensor",
            "trigger_value": "reserved",
            "operator": "=="
        }
    ],
    "logical_equation": "string",
    "actions": [
        {
            "action_type": "send_email",
            "action_config": {
                "url": "http://example.com",
                "method": "POST",
                "auth_type": "bearer",
                "auth_token": "string",
                "username": "string",
                "password": "string",
                "headers": {
                    "property1": "string",
                    "property2": "string"
                },
                "body": {}
            }
        }
    ]
}'
Response Response Example
{
    "success": true,
    "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
    "conditions": [
        {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "name": "string"
        }
    ],
    "actions": [
        {
            "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
            "action_type": "string"
        }
    ]
}
Modified at 2025-09-05 13:37:13
Previous
Create or update booking
Built with