In-app
Record In-App Event
Report that an in-app item was displayed, clicked, dismissed or read
POST
/
api
/
v1
/
in-app
/
messages
/
{messageId}
/
events
Record In-App Event
curl --request POST \
--url https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/events"
payload = { "type": "<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({type: '<string>'})
};
fetch('https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/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/in-app/messages/{messageId}/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([
'type' => '<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/in-app/messages/{messageId}/events"
payload := strings.NewReader("{\n \"type\": \"<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/in-app/messages/{messageId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/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 \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"recorded": true,
"message": {
"id": "iam_123",
"kind": "message",
"format": "banner",
"displayedAt": "2026-10-11T09:05:00.000Z",
"dismissedAt": "2026-10-11T09:05:00.000Z",
"clickCount": 0
}
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "In-app message not found."
}
{
"type": "validation",
"on": "body",
"property": "/type",
"message": "Expected union value"
}
Reports what happened to an in-app item in your app. These reports power the step stats in Sequenzy and decide what stays in the feed. Requires the
subscribers:write scope.
displayed: the item was shown. Messages leave the open feed after this, so each one shows once.clicked: a button or the item itself was clicked. Every click counts inclickCount.dismissed: the contact closed it. Cards leave the feed after this.read: a card was opened or scrolled into view.
recorded: false, so retrying is safe. The exception is clickCount, which every clicked report increments, so send clicked once per click.
Request
string
required
Item ID from List In-App Messages.
string
required
displayed, clicked, dismissed or read.curl -X POST "https://api.sequenzy.com/api/v1/in-app/messages/iam_123/events" \
--header "Authorization: Bearer $SEQUENZY_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "type": "dismissed" }'
Response
boolean
True when this report set the timestamp; false when it was already recorded.
{
"success": true,
"recorded": true,
"message": {
"id": "iam_123",
"kind": "message",
"format": "banner",
"displayedAt": "2026-10-11T09:05:00.000Z",
"dismissedAt": "2026-10-11T09:05:00.000Z",
"clickCount": 0
}
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "In-app message not found."
}
{
"type": "validation",
"on": "body",
"property": "/type",
"message": "Expected union value"
}
⌘I
Record In-App Event
curl --request POST \
--url https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>"
}
'import requests
url = "https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/events"
payload = { "type": "<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({type: '<string>'})
};
fetch('https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/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/in-app/messages/{messageId}/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([
'type' => '<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/in-app/messages/{messageId}/events"
payload := strings.NewReader("{\n \"type\": \"<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/in-app/messages/{messageId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/in-app/messages/{messageId}/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 \"type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"recorded": true,
"message": {
"id": "iam_123",
"kind": "message",
"format": "banner",
"displayedAt": "2026-10-11T09:05:00.000Z",
"dismissedAt": "2026-10-11T09:05:00.000Z",
"clickCount": 0
}
}
{
"error": "Invalid API key"
}
{
"error": "API key is missing required scope: subscribers:write"
}
{
"error": "In-app message not found."
}
{
"type": "validation",
"on": "body",
"property": "/type",
"message": "Expected union value"
}