Accounts
Trigger Account Event
Record an event on an account and deliver it to its members
POST
/
api
/
v1
/
accounts
/
{externalId}
/
events
Trigger Account Event
curl --request POST \
--url https://api.sequenzy.com/api/v1/accounts/{externalId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "<string>",
"properties": {},
"recipients": "<string>",
"eventId": "<string>",
"occurredAt": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/accounts/{externalId}/events"
payload = {
"event": "<string>",
"properties": {},
"recipients": "<string>",
"eventId": "<string>",
"occurredAt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: '<string>',
properties: {},
recipients: '<string>',
eventId: '<string>',
occurredAt: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/accounts/{externalId}/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.sequenzy.com/api/v1/accounts/{externalId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => '<string>',
'properties' => [
],
'recipients' => '<string>',
'eventId' => '<string>',
'occurredAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/accounts/{externalId}/events"
payload := strings.NewReader("{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/accounts/{externalId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/accounts/{externalId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"account": { "id": "acc_abc123", "externalId": "org_123", "name": "Acme", "memberCount": 3 },
"event": { "id": "trial-org_123-2026-09-04", "name": "trial_ending", "time": "2026-09-04T09:00:00.000Z" },
"recipients": "owners",
"recipientCount": 1,
"truncated": false,
"duplicate": false,
"deliveries": [
{ "subscriberId": "sub_1", "email": "jane@acme.com", "role": "owner", "success": true, "automationsTriggered": ["auto_trial"] }
]
}
{
"success": false,
"error": "Account event `recipients` must be one of owners, admins, all, none."
}
{
"success": false,
"error": "Delivered to 2 of 3 recipients; 1 failed. Retry with the same eventId to re-attempt only the failed recipients.",
"recipientCount": 3,
"deliveries": [
{
"subscriberId": "sub_2",
"email": "bob@acme.com",
"role": "owner",
"success": false,
"automationsTriggered": [],
"error": "..."
}
]
}
{ "success": false, "error": "Account not found" }
Trigger Account Event
Records the event on the account timeline and delivers it to the chosen recipients as a normal contact event, so sync rules, sequence triggers and matching-field enrollment run per person. Each delivery carriesevent.account.externalId, event.account.name, event.account.role and the account attributes.
Request
string
required
Your organization ID.
string
required
Event name, for example
trial_ending, plan_changed, seat_limit_reached.object
Event properties, available as
event.<name> in sequences.string
default:"owners"
owners (falls back to admins when the account has no owner), admins
(owners and admins), all (every member) or none (timeline only).string
Idempotency key scoped to this account. Accounts can reuse an ID even when
they share members. Retries reuse the original recipients, properties and
event time, even if account membership changes. Completed deliveries are
skipped; failed deliveries resume without duplicating contact events or
sequence enrollments. Recipients deleted since the event was recorded are
reported with
skipped: "contact_deleted" and are not retried. The response
carries duplicate: true.string
ISO 8601 timestamp of when the event happened. Defaults to now.
curl -X POST "https://api.sequenzy.com/api/v1/accounts/org_123/events" \
-H "Authorization: Bearer API_KEY" \
-H "Content-Type: application/json" \
-d '{ "event": "trial_ending", "properties": { "daysLeft": 3 }, "recipients": "owners", "eventId": "trial-org_123-2026-09-04" }'
Responses
{
"success": true,
"account": { "id": "acc_abc123", "externalId": "org_123", "name": "Acme", "memberCount": 3 },
"event": { "id": "trial-org_123-2026-09-04", "name": "trial_ending", "time": "2026-09-04T09:00:00.000Z" },
"recipients": "owners",
"recipientCount": 1,
"truncated": false,
"duplicate": false,
"deliveries": [
{ "subscriberId": "sub_1", "email": "jane@acme.com", "role": "owner", "success": true, "automationsTriggered": ["auto_trial"] }
]
}
{
"success": false,
"error": "Account event `recipients` must be one of owners, admins, all, none."
}
{
"success": false,
"error": "Delivered to 2 of 3 recipients; 1 failed. Retry with the same eventId to re-attempt only the failed recipients.",
"recipientCount": 3,
"deliveries": [
{
"subscriberId": "sub_2",
"email": "bob@acme.com",
"role": "owner",
"success": false,
"automationsTriggered": [],
"error": "..."
}
]
}
{ "success": false, "error": "Account not found" }
⌘I
Trigger Account Event
curl --request POST \
--url https://api.sequenzy.com/api/v1/accounts/{externalId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event": "<string>",
"properties": {},
"recipients": "<string>",
"eventId": "<string>",
"occurredAt": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/accounts/{externalId}/events"
payload = {
"event": "<string>",
"properties": {},
"recipients": "<string>",
"eventId": "<string>",
"occurredAt": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event: '<string>',
properties: {},
recipients: '<string>',
eventId: '<string>',
occurredAt: '<string>'
})
};
fetch('https://api.sequenzy.com/api/v1/accounts/{externalId}/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.sequenzy.com/api/v1/accounts/{externalId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event' => '<string>',
'properties' => [
],
'recipients' => '<string>',
'eventId' => '<string>',
'occurredAt' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/accounts/{externalId}/events"
payload := strings.NewReader("{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.sequenzy.com/api/v1/accounts/{externalId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/accounts/{externalId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event\": \"<string>\",\n \"properties\": {},\n \"recipients\": \"<string>\",\n \"eventId\": \"<string>\",\n \"occurredAt\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"account": { "id": "acc_abc123", "externalId": "org_123", "name": "Acme", "memberCount": 3 },
"event": { "id": "trial-org_123-2026-09-04", "name": "trial_ending", "time": "2026-09-04T09:00:00.000Z" },
"recipients": "owners",
"recipientCount": 1,
"truncated": false,
"duplicate": false,
"deliveries": [
{ "subscriberId": "sub_1", "email": "jane@acme.com", "role": "owner", "success": true, "automationsTriggered": ["auto_trial"] }
]
}
{
"success": false,
"error": "Account event `recipients` must be one of owners, admins, all, none."
}
{
"success": false,
"error": "Delivered to 2 of 3 recipients; 1 failed. Retry with the same eventId to re-attempt only the failed recipients.",
"recipientCount": 3,
"deliveries": [
{
"subscriberId": "sub_2",
"email": "bob@acme.com",
"role": "owner",
"success": false,
"automationsTriggered": [],
"error": "..."
}
]
}
{ "success": false, "error": "Account not found" }