In-app
Write In-App Copy
Write an in-app message’s eyebrow, title, message and button text with AI
POST
/
api
/
v1
/
in-app
/
copy
Write In-App Copy
curl --request POST \
--url https://api.sequenzy.com/api/v1/in-app/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brief": "<string>",
"kind": "<string>",
"format": "<string>",
"hasImage": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/in-app/copy"
payload = {
"brief": "<string>",
"kind": "<string>",
"format": "<string>",
"hasImage": True
}
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({brief: '<string>', kind: '<string>', format: '<string>', hasImage: true})
};
fetch('https://api.sequenzy.com/api/v1/in-app/copy', 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/copy",
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([
'brief' => '<string>',
'kind' => '<string>',
'format' => '<string>',
'hasImage' => true
]),
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/copy"
payload := strings.NewReader("{\n \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\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/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/in-app/copy")
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 \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"copy": {
"eyebrow": "3 days left",
"title": "Keep your training plan",
"body": "Upgrade before your trial ends and your plan, history and streak stay put.",
"buttons": [
{ "label": "Upgrade", "action": "open_url" },
{ "label": "Not now", "action": "dismiss" }
]
}
}
{
"error": "Expected string length greater or equal to 3"
}
{
"error": "Too many requests. Try again in a minute."
}
{
"error": "The AI answer could not be used. Try again or reword the brief."
}
Writes copy for one in-app message or card from a short brief, sized for the layout. Nothing is saved: put the result in an in-app step’s
eyebrow, title, body and buttons, adding the url each link button opens. The writer never invents prices, dates or numbers the brief does not give, and may greet by name with {{FIRST_NAME|there}}. Requires the sequences:write scope. Limited to 20 requests a minute per workspace.
Body
string
required
What the message should say, 3 to 1,000 characters. Write it in the language the copy should use.
string
default:"message"
message or card. Cards get at most one link button.string
default:"modal"
modal, banner or fullscreen. Sets the length targets: banners get the shortest copy.boolean
default:"false"
Whether the step shows an image.
curl "https://api.sequenzy.com/api/v1/in-app/copy" \
--request POST \
--header "Authorization: Bearer $SEQUENZY_API_KEY" \
--header "Content-Type: application/json" \
--data '{ "brief": "Trial ends in 3 days; nudge them to upgrade so they keep their history" }'
Response
object
eyebrow (may be empty), title, body and buttons, each { label, action } with action open_url or dismiss.{
"success": true,
"copy": {
"eyebrow": "3 days left",
"title": "Keep your training plan",
"body": "Upgrade before your trial ends and your plan, history and streak stay put.",
"buttons": [
{ "label": "Upgrade", "action": "open_url" },
{ "label": "Not now", "action": "dismiss" }
]
}
}
{
"error": "Expected string length greater or equal to 3"
}
{
"error": "Too many requests. Try again in a minute."
}
{
"error": "The AI answer could not be used. Try again or reword the brief."
}
⌘I
Write In-App Copy
curl --request POST \
--url https://api.sequenzy.com/api/v1/in-app/copy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"brief": "<string>",
"kind": "<string>",
"format": "<string>",
"hasImage": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/in-app/copy"
payload = {
"brief": "<string>",
"kind": "<string>",
"format": "<string>",
"hasImage": True
}
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({brief: '<string>', kind: '<string>', format: '<string>', hasImage: true})
};
fetch('https://api.sequenzy.com/api/v1/in-app/copy', 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/copy",
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([
'brief' => '<string>',
'kind' => '<string>',
'format' => '<string>',
'hasImage' => true
]),
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/copy"
payload := strings.NewReader("{\n \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\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/copy")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/in-app/copy")
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 \"brief\": \"<string>\",\n \"kind\": \"<string>\",\n \"format\": \"<string>\",\n \"hasImage\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"copy": {
"eyebrow": "3 days left",
"title": "Keep your training plan",
"body": "Upgrade before your trial ends and your plan, history and streak stay put.",
"buttons": [
{ "label": "Upgrade", "action": "open_url" },
{ "label": "Not now", "action": "dismiss" }
]
}
}
{
"error": "Expected string length greater or equal to 3"
}
{
"error": "Too many requests. Try again in a minute."
}
{
"error": "The AI answer could not be used. Try again or reword the brief."
}