Get All Events
curl --request GET \
--url https://api.securegate.ai/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.securegate.ai/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.securegate.ai/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.securegate.ai/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.securegate.ai/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.securegate.ai/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.securegate.ai/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ongoing": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"ended": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"up_coming": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"archived": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
]
}Event Management
Get All Events
Get all events, categorized by status
GET
/
events
Get All Events
curl --request GET \
--url https://api.securegate.ai/events \
--header 'x-api-key: <api-key>'import requests
url = "https://api.securegate.ai/events"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.securegate.ai/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.securegate.ai/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.securegate.ai/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.securegate.ai/events")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.securegate.ai/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"ongoing": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"ended": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"up_coming": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
],
"archived": [
{
"title": "<string>",
"imageUrl": "<string>",
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"zipCode": "<string>",
"country": "<string>"
},
"id": "<string>",
"description": "",
"instructions": "",
"start_timestamp": 123,
"end_timestamp": 123,
"type": "dated",
"is_deleted": false,
"created_at": "2023-11-07T05:31:56Z"
}
]
}This endpoint gives you a complete list of all events in your account, organized by their current status. It’s usually the first API you’ll call when building an event dashboard or management interface.
What it does:
To obtain an API key, please contact our support team.
Each event category contains an array of event objects. If there are no events in a particular category, an empty array is returned for that category.
- Returns all your events, sorted into categories (ongoing, upcoming, ended, archived)
- Provides complete details for each event including location, times, and settings
- Helps you track which events are active and which have concluded
- When building an event management dashboard
- When you need to display a list of events to users
- To monitor the status of all your events at once
Authentication
This endpoint requires authentication using an API key. Add the following header to your request:x-api-key: YOUR_API_KEY
Response
The response contains a list of all events organized by their status (ongoing, ended, up_coming, archived). Each event includes its complete details including title, description, location, and timestamps.{
"ongoing": [
{
"title": "Annual Conference 2023",
"description": "Technology industry conference",
"instructions": "Check-in opens at 8:00 AM",
"imageUrl": "https://example.com/images/events/annual-conference.png",
"location": {
"address": "123 Convention Center Way",
"city": "San Francisco",
"state": "CA",
"zipCode": "94103",
"country": "USA"
},
"start_timestamp": 1683730000000,
"end_timestamp": 1683816400000,
"type": "dated",
"is_deleted": false,
"id": "evt_abc123def456",
"created_at": "2023-01-15T10:30:00.000000",
"updated_at": "2023-01-15T10:30:00.000000"
},
{
"title": "Tech Expo",
"description": "Product showcase and demonstrations",
"instructions": "Bring ID for security clearance",
"imageUrl": "https://example.com/images/events/tech-expo.png",
"location": {
"address": "456 Innovation Blvd",
"city": "New York",
"state": "NY",
"zipCode": "10001",
"country": "USA"
},
"start_timestamp": 1684334800000,
"end_timestamp": 1684421200000,
"type": "dated",
"is_deleted": false,
"id": "evt_ghi789jkl012",
"created_at": "2023-02-10T14:15:00.000000",
"updated_at": "2023-02-10T14:15:00.000000"
}
],
"ended": [],
"up_coming": [],
"archived": []
}
Example Request with cURL
curl -X GET https://api.securegate.ai/events \
-H "x-api-key: YOUR_API_KEY"
Authorizations
API key authentication. Add your API key as the value of the 'x-api-key' header.
Response
200 - application/json
Successful Response
