Events
Get Event
Retrieves a single event definition by its name.
GET
/
events
/
eventName
/
{eventName}
curl --request GET \
--url https://api.autosend.com/v1/events/eventName/order_completed \
--header 'Authorization: Bearer AS_your-project-api-key'
import requests
url = "https://api.autosend.com/v1/events/eventName/order_completed"
headers = {
"Authorization": "Bearer AS_your-project-api-key"
}
response = requests.get(url, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/events/eventName/order_completed', {
method: 'GET',
headers: {
'Authorization': 'Bearer AS_your-project-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/events/eventName/order_completed';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/events/eventName/order_completed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class GetEvent {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/events/eventName/order_completed");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
con.disconnect();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
uri = URI('https://api.autosend.com/v1/events/eventName/order_completed')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer AS_your-project-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}
Looks up a single event definition by its
eventName. Soft-deleted events are not returned.curl --request GET \
--url https://api.autosend.com/v1/events/eventName/order_completed \
--header 'Authorization: Bearer AS_your-project-api-key'
import requests
url = "https://api.autosend.com/v1/events/eventName/order_completed"
headers = {
"Authorization": "Bearer AS_your-project-api-key"
}
response = requests.get(url, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/events/eventName/order_completed', {
method: 'GET',
headers: {
'Authorization': 'Bearer AS_your-project-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/events/eventName/order_completed';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/events/eventName/order_completed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class GetEvent {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/events/eventName/order_completed");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
con.disconnect();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
uri = URI('https://api.autosend.com/v1/events/eventName/order_completed')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer AS_your-project-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}
Authorizations
string | header
required
Project API key header of the form Bearer
AS_<key>.Path Parameters
string
required
Name of the event to fetch. ASCII letters, digits, and underscores only.Maximum length:
64Example: "order_completed"Response
Event retrieved successfullyboolean
Indicates if the request was successfulExample:
trueobject
The event definition
Show child attributes
Show child attributes
string
Unique event definition identifier
string
Event name
string | null
Human-readable description
object[]
string
ISO 8601 timestamp of creation
string
ISO 8601 timestamp of last update
Error Responses
object
{
"success": false,
"error": {
"message": "Event not found",
"code": "EVENT_NOT_FOUND"
}
}
Was this page helpful?
⌘I
curl --request GET \
--url https://api.autosend.com/v1/events/eventName/order_completed \
--header 'Authorization: Bearer AS_your-project-api-key'
import requests
url = "https://api.autosend.com/v1/events/eventName/order_completed"
headers = {
"Authorization": "Bearer AS_your-project-api-key"
}
response = requests.get(url, headers=headers)
print(response.json())
fetch('https://api.autosend.com/v1/events/eventName/order_completed', {
method: 'GET',
headers: {
'Authorization': 'Bearer AS_your-project-api-key'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<?php
$url = 'https://api.autosend.com/v1/events/eventName/order_completed';
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer AS_your-project-api-key'
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.autosend.com/v1/events/eventName/order_completed"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("Authorization", "Bearer AS_your-project-api-key")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
fmt.Println("Error:", err)
return
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
public class GetEvent {
public static void main(String[] args) {
try {
URL url = new URL("https://api.autosend.com/v1/events/eventName/order_completed");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
con.setRequestProperty("Authorization", "Bearer AS_your-project-api-key");
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuilder content = new StringBuilder();
while ((inputLine = in.readLine()) != null) {
content.append(inputLine);
}
in.close();
con.disconnect();
System.out.println(content.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
require 'net/http'
require 'uri'
uri = URI('https://api.autosend.com/v1/events/eventName/order_completed')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer AS_your-project-api-key'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"id": "60d5ec49f1b2c72d9c8b1234",
"eventName": "order_completed",
"description": "Fired when a customer completes a checkout",
"properties": [
{
"propertyName": "order_total",
"type": "number",
"description": "Total order value in USD",
"suggestedValues": []
},
{
"propertyName": "currency",
"type": "string",
"suggestedValues": ["USD", "EUR", "GBP"]
}
],
"createdAt": "2026-05-08T10:00:00.000Z",
"updatedAt": "2026-05-08T10:00:00.000Z"
}
}