---
updatedAt: 2025-06-04T20:42:44.000Z
agentTools:
  projectIndex: https://docs.tomorrow.io/llms.txt
---

# On-Demand Events

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "tomorrowio-api",
    "version": "4.0.1"
  },
  "servers": [
    {
      "url": "https://api.tomorrow.io/v4"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "query",
        "name": "apikey"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/events-timeline": {
      "post": {
        "summary": "On-Demand Events",
        "description": "",
        "operationId": "events-timeline",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "location",
                  "insight"
                ],
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "This either get {\"locationId\": \"ID\"} or [Geometry](https://docs.tomorrow.io/reference/locations-overview) i.e        { \"geometry\": {             \"type\": \"Point\",             \"coordinates\": [                 -73.890,                 40.768             ]         }}",
                    "format": "json"
                  },
                  "insight": {
                    "type": "string",
                    "description": "This is the conditions to be met. You can either pass here [Rules](https://docs.tomorrow.io/reference/insights-overview#rules-language-recommended) i.e {\"rules\": \"(temperature > 30)\"}. [conditions](https://docs.tomorrow.io/reference/insights-overview#conditions-language-ast-trees) i.e {\"conditions\": \"...\") or InsightId, i.e. {\"insightId\": \"....\"}",
                    "format": "json"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Response Events Timeline": {
                    "value": "{\n    \"data\": {\n        \"eventsTimeline\": {\n            \"geometry\": {\n                \"type\": \"Point\",\n                \"coordinates\": [\n                    -73.892,\n                    40.77\n                ]\n            },\n            \"items\": [\n                {\n                    \"from\": \"2023-07-24T08:00:00Z\",\n                    \"active\": false,\n                    \"actualValues\": {\n                        \"cloudCover\": 98,\n                        \"temperature\": 25.5\n                    },\n                    \"actualTriggerValues\": {\n                        \"cloudCover\": 98,\n                        \"temperature\": 25.5\n                    }\n                }\n            ],\n            \"itemsStartTime\": \"2023-07-24T08:00:00Z\",\n            \"itemsEndTime\": \"2023-07-29T08:00:00Z\"\n        }\n    }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "eventsTimeline": {
                          "type": "object",
                          "properties": {
                            "geometry": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "example": "Point"
                                },
                                "coordinates": {
                                  "type": "array",
                                  "items": {
                                    "type": "number",
                                    "example": -73.892,
                                    "default": 0
                                  }
                                }
                              }
                            },
                            "items": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "from": {
                                    "type": "string",
                                    "example": "2023-07-24T08:00:00Z"
                                  },
                                  "active": {
                                    "type": "boolean",
                                    "example": false,
                                    "default": true
                                  },
                                  "actualValues": {
                                    "type": "object",
                                    "properties": {
                                      "cloudCover": {
                                        "type": "integer",
                                        "example": 98,
                                        "default": 0
                                      },
                                      "temperature": {
                                        "type": "number",
                                        "example": 25.5,
                                        "default": 0
                                      }
                                    }
                                  },
                                  "actualTriggerValues": {
                                    "type": "object",
                                    "properties": {
                                      "cloudCover": {
                                        "type": "integer",
                                        "example": 98,
                                        "default": 0
                                      },
                                      "temperature": {
                                        "type": "number",
                                        "example": 25.5,
                                        "default": 0
                                      }
                                    }
                                  }
                                }
                              }
                            },
                            "itemsStartTime": {
                              "type": "string",
                              "example": "2023-07-24T08:00:00Z"
                            },
                            "itemsEndTime": {
                              "type": "string",
                              "example": "2023-07-29T08:00:00Z"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```