Documentation Index
Fetch the complete documentation index at: https://loops.so/docs/llms.txt
Use this file to discover all available pages before exploring further.
Send an event
API reference
await fetch("https://app.loops.so/api/v1/events/send", {
method: "POST",
headers: {
"Authorization": "Bearer <your-api-key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
email: "test@example.com",
eventName: "testEvent",
}),
});
Send an event with event properties
Include data that can be used in your loop emails triggered by the event.
API reference
await fetch("https://app.loops.so/api/v1/events/send", {
method: "POST",
headers: {
"Authorization": "Bearer <your-api-key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
email: "test@example.com",
eventName: "testEvent",
eventProperties: {
"testProperty": "testValue",
},
}),
});
Include contact properties to update the contact as the event is sent.
API reference
await fetch("https://app.loops.so/api/v1/events/send", {
method: "POST",
headers: {
"Authorization": "Bearer <your-api-key>",
"Content-Type": "application/json"
},
body: JSON.stringify({
email: "test@example.com",
eventName: "testEvent",
planName: "Pro", // Contact property
}),
});
Send an event with an idempotency key
Add an Idempotency-Key header to the request to prevent duplicate requests.
API reference
await fetch("https://app.loops.so/api/v1/events/send", {
method: "POST",
headers: {
"Authorization": "Bearer <your-api-key>",
"Content-Type": "application/json"
"Idempotency-Key": "550e8400-e29b-41d4-a716-446655440000",
},
body: JSON.stringify({
email: "test@example.com",
eventName: "testEvent",
}),
});