curl --request PATCH \
--url https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"body": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/"
payload = {
"body": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subject: '<string>'
})
};
fetch('https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{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' => '<string>',
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subject' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"label": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"wait_amount": 123,
"wait_unit": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Rewrite a follow-up on a pending email card
Change what one follow-up on a pending email card will send, before approving the card. A signed in person’s edit is recorded as theirs, like an edit of the card’s own email; one through an API key is nobody’s. The edit is kept; a learning is proposed from it by POST /agent-learnings/hand-edits/. The follow-ups after it stay as they are. Answers with the follow-up as it now stands. 409 once the card is decided: the words a person approved are the words that send.
curl --request PATCH \
--url https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/ \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"body": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>"
}
'import requests
url = "https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/"
payload = {
"body": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
body: JSON.stringify('<string>'),
message_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
subject: '<string>'
})
};
fetch('https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{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' => '<string>',
'message_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'subject' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoneprofile.ai/outreach-tasks/{task_id}/thread/emails/{step_id}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"body\": \"<string>\",\n \"message_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"subject\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"label": "<string>",
"message_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"step_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"wait_amount": 123,
"wait_unit": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>",
"issues": [
{
"input": "<string>",
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Body
Rewrite one follow-up on a pending email card.
subject left out keeps the follow-up's own subject; a follow-up that
replies in the thread above it has none, and any given to it is ignored.
Response
Successful Response
One follow-up the agent drafted with the card's email: approving the card approves it.
The follow-ups after the card's own email, in the order they go. One approval covers them all: approving the card approves each to send as written when its turn comes, with no card of its own, and rejecting the card stops the contact.
Was this page helpful?