Delete Event
curl --request DELETE \
--url https://api.securegate.ai/events/{event_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.securegate.ai/events/{event_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.securegate.ai/events/{event_id}', 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/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{event_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.securegate.ai/events/{event_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.securegate.ai/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Event Management
Delete Event
Mark an event as deleted
DELETE
/
events
/
{event_id}
Delete Event
curl --request DELETE \
--url https://api.securegate.ai/events/{event_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.securegate.ai/events/{event_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.securegate.ai/events/{event_id}', 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/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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/{event_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.securegate.ai/events/{event_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.securegate.ai/events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"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"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint allows you to remove events that are no longer needed from your active listings.
What it does:
Note: This is a soft delete operation. The event data is preserved in the system but will no longer appear in the regular event listings. This allows you to maintain historical records while cleaning up your active events.
- Marks an event as deleted in the system (soft delete)
- Keeps the event data in the database but hides it from normal listings
- Changes the event’s
is_deletedstatus totrue
- When an event has been canceled
- When you created an event by mistake
- When you want to clean up your event listings
- When you want to archive old events but retain their data
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | The unique identifier of the event to delete |
Response
The API returns the updated event object withis_deleted set to true:
{
"id": "event-123",
"title": "Annual Tech Conference",
"description": "Join us for the annual tech conference featuring speakers from top tech companies",
"instructions": "Please arrive 30 minutes before the event starts for registration",
"imageUrl": "https://example.com/event-image.jpg",
"location": {
"address": "123 Conference Center Dr",
"city": "San Francisco",
"state": "CA",
"zipCode": "94105",
"country": "USA"
},
"start_timestamp": 1677609600,
"end_timestamp": 1677696000,
"type": "dated",
"is_deleted": true,
"created_at": "2023-02-28T12:00:00Z"
}
Authorizations
API key authentication. Add your API key as the value of the 'x-api-key' header.
Path Parameters
Response
Successful Response
Show child attributes
Show child attributes
Available options:
fixed, dated 