Edit an enrollee's upcoming step
curl --request PATCH \
--url https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>"
}
'import requests
url = "https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}"
payload = { "body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body_html: '<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>'
})
};
fetch('https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}', 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.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body_html' => '<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>'
]),
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.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}"
payload := strings.NewReader("{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "e7b1d3f5-9a2c-4e6b-8d0f-3a5c7e9b1d42",
"person_id": "2f6b9d1e-4a8c-4e3f-b7d2-1c5a9e3b7f40",
"name": "Sam Patel",
"email": "sam@gmail.com",
"status": "active",
"status_group": "running",
"from_email": "riya@acmetalent.com",
"sender_team_member_id": "7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20",
"job_id": "b21d7e4a-5c9f-4e3b-a1d6-8f2c4e7b9a13",
"enrolled_at": "2026-10-13T11:31:05.000Z",
"current_step": 2,
"next_step_at": "2026-10-22T09:14:00.000Z",
"opens": 0,
"clicks": 1,
"reply_intent": null,
"batch_id": "eb8d2f41-3c7a-4e19-b5d2-7f0a1c9e6b34",
"source": "api",
"steps": [
{
"id": "f8a2c4e6-0b3d-4f5a-9c7e-1b3d5f7a9c08",
"step_id": "5b0f3c8e-2a71-4d0e-9a51-6f0c2d7e1a43",
"order": 1,
"type": "email",
"subject": "Senior Backend Engineer role at Monzo",
"body_html": "<div>Hi Sam,</div><div><br></div><div>Your work scaling payments at Wise stood out. I'm hiring a <strong>Senior Backend Engineer</strong> at Monzo. Loved your PyCon talk on async Python.</div><div><br></div><div>You can see the role <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://jobs.stardex.com/acme-talent/senior-backend-engineer-k3f9a2\">here</a>. Open to a chat?</div><div><br></div><div>Riya</div>",
"status": "sent",
"due_at": "2026-10-19T08:00:00.000Z",
"sent_at": "2026-10-19T08:03:41.000Z",
"editable": false
},
{
"id": "0c4e6a8b-2d5f-4a7c-8e9b-3d5f7b9a1c19",
"step_id": "9d2e7a14-61c3-4b8f-8f0e-3a5c9b2d4e17",
"order": 2,
"type": "email",
"subject": "Re: Senior Backend Engineer role at Monzo",
"body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>",
"status": "pending",
"due_at": "2026-10-22T09:14:00.000Z",
"sent_at": null,
"editable": true
},
{
"id": "6e8a0c2d-4f7b-4c9e-8a1d-5f7b9d1e3a20",
"step_id": "c4a8e2f1-7b3d-4e6a-9c1f-2d8b5a7e3f90",
"order": 3,
"type": "manual",
"subject": null,
"body_html": "<div>Call Sam if they opened but did not reply.</div>",
"status": "pending",
"due_at": null,
"sent_at": null,
"editable": true
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Campaigns
Edit an enrollee's upcoming step
Change the subject or body of one step that has not been sent and is not being sent right now, for this person only. Use the final text, with no {{variables}}. Needs campaigns:enroll.
PATCH
/
v1
/
campaigns
/
{id}
/
enrollments
/
{enrollment_id}
/
steps
/
{step_id}
Edit an enrollee's upcoming step
curl --request PATCH \
--url https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>"
}
'import requests
url = "https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}"
payload = { "body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body_html: '<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>'
})
};
fetch('https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}', 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.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'body_html' => '<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>'
]),
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.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}"
payload := strings.NewReader("{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.stardex.ai/v1/campaigns/{id}/enrollments/{enrollment_id}/steps/{step_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body_html\": \"<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "e7b1d3f5-9a2c-4e6b-8d0f-3a5c7e9b1d42",
"person_id": "2f6b9d1e-4a8c-4e3f-b7d2-1c5a9e3b7f40",
"name": "Sam Patel",
"email": "sam@gmail.com",
"status": "active",
"status_group": "running",
"from_email": "riya@acmetalent.com",
"sender_team_member_id": "7c1e4a9b-3d6f-4b2e-8a5c-9f1d3b7e5a20",
"job_id": "b21d7e4a-5c9f-4e3b-a1d6-8f2c4e7b9a13",
"enrolled_at": "2026-10-13T11:31:05.000Z",
"current_step": 2,
"next_step_at": "2026-10-22T09:14:00.000Z",
"opens": 0,
"clicks": 1,
"reply_intent": null,
"batch_id": "eb8d2f41-3c7a-4e19-b5d2-7f0a1c9e6b34",
"source": "api",
"steps": [
{
"id": "f8a2c4e6-0b3d-4f5a-9c7e-1b3d5f7a9c08",
"step_id": "5b0f3c8e-2a71-4d0e-9a51-6f0c2d7e1a43",
"order": 1,
"type": "email",
"subject": "Senior Backend Engineer role at Monzo",
"body_html": "<div>Hi Sam,</div><div><br></div><div>Your work scaling payments at Wise stood out. I'm hiring a <strong>Senior Backend Engineer</strong> at Monzo. Loved your PyCon talk on async Python.</div><div><br></div><div>You can see the role <a target=\"_blank\" rel=\"noopener noreferrer nofollow\" href=\"https://jobs.stardex.com/acme-talent/senior-backend-engineer-k3f9a2\">here</a>. Open to a chat?</div><div><br></div><div>Riya</div>",
"status": "sent",
"due_at": "2026-10-19T08:00:00.000Z",
"sent_at": "2026-10-19T08:03:41.000Z",
"editable": false
},
{
"id": "0c4e6a8b-2d5f-4a7c-8e9b-3d5f7b9a1c19",
"step_id": "9d2e7a14-61c3-4b8f-8f0e-3a5c9b2d4e17",
"order": 2,
"type": "email",
"subject": "Re: Senior Backend Engineer role at Monzo",
"body_html": "<div>Hi Sam, following up on my note about the Monzo role.</div><div><br></div><div>Riya</div>",
"status": "pending",
"due_at": "2026-10-22T09:14:00.000Z",
"sent_at": null,
"editable": true
},
{
"id": "6e8a0c2d-4f7b-4c9e-8a1d-5f7b9d1e3a20",
"step_id": "c4a8e2f1-7b3d-4e6a-9c1f-2d8b5a7e3f90",
"order": 3,
"type": "manual",
"subject": null,
"body_html": "<div>Call Sam if they opened but did not reply.</div>",
"status": "pending",
"due_at": null,
"sent_at": null,
"editable": true
}
]
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}{
"success": false,
"error": {
"code": "<string>",
"message": "<string>",
"details": {}
}
}Authorizations
Authenticate with a Bearer token: API key, OAuth token, or session token.
Path Parameters
Campaign ID.
Enrollment ID.
Step ID from the enrollment's steps (not the campaign step).
Body
application/json
Only the first email step has its own subject. Later email steps reply in its thread as "Re: ", so a different subject on them is rejected; changing the first subject renames this person's later emails that are not sent yet.
Maximum string length:
998Maximum string length:
100000Was this page helpful?