Apply a user snapshot
curl --request POST \
--url https://your-instance.example.com/api/user-snapshots/{id}/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pipelineMapping": {
"Move to Contacted on first reply": {
"Contacted": "Reached Out"
}
},
"agentMapping": {},
"applyAutomations": true,
"applyPrompts": true,
"applyTemplates": true,
"newUser": {
"email": "casey@acme.example",
"password": "TempPass!2026",
"fullName": "Casey New",
"accessRole": "SALES_REP"
}
}
'import requests
url = "https://your-instance.example.com/api/user-snapshots/{id}/apply"
payload = {
"pipelineMapping": { "Move to Contacted on first reply": { "Contacted": "Reached Out" } },
"agentMapping": {},
"applyAutomations": True,
"applyPrompts": True,
"applyTemplates": True,
"newUser": {
"email": "casey@acme.example",
"password": "TempPass!2026",
"fullName": "Casey New",
"accessRole": "SALES_REP"
}
}
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({
pipelineMapping: {'Move to Contacted on first reply': {Contacted: 'Reached Out'}},
agentMapping: {},
applyAutomations: true,
applyPrompts: true,
applyTemplates: true,
newUser: {
email: 'casey@acme.example',
password: 'TempPass!2026',
fullName: 'Casey New',
accessRole: 'SALES_REP'
}
})
};
fetch('https://your-instance.example.com/api/user-snapshots/{id}/apply', 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://your-instance.example.com/api/user-snapshots/{id}/apply",
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([
'pipelineMapping' => [
'Move to Contacted on first reply' => [
'Contacted' => 'Reached Out'
]
],
'agentMapping' => [
],
'applyAutomations' => true,
'applyPrompts' => true,
'applyTemplates' => true,
'newUser' => [
'email' => 'casey@acme.example',
'password' => 'TempPass!2026',
'fullName' => 'Casey New',
'accessRole' => 'SALES_REP'
]
]),
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://your-instance.example.com/api/user-snapshots/{id}/apply"
payload := strings.NewReader("{\n \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\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://your-instance.example.com/api/user-snapshots/{id}/apply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/user-snapshots/{id}/apply")
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 \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Snapshot applied",
"result": {
"userId": "64ee9a8b1e7f2a001122339c",
"userEmail": "casey@acme.example",
"cloned": {
"automations": 5,
"prompts": 8,
"templates": 12
},
"mapped": {
"prompts": 0
},
"skipped": {
"automations": 0,
"templates": 0
}
}
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}User Snapshots
Apply a user snapshot
Creates a new user in the caller organization and clones the snapshot automations, prompts, and templates (with pipeline-stage and agent mappings) inside a single transaction. Same-org applies skip automations and templates to avoid duplicates.
POST
/
api
/
user-snapshots
/
{id}
/
apply
Apply a user snapshot
curl --request POST \
--url https://your-instance.example.com/api/user-snapshots/{id}/apply \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pipelineMapping": {
"Move to Contacted on first reply": {
"Contacted": "Reached Out"
}
},
"agentMapping": {},
"applyAutomations": true,
"applyPrompts": true,
"applyTemplates": true,
"newUser": {
"email": "casey@acme.example",
"password": "TempPass!2026",
"fullName": "Casey New",
"accessRole": "SALES_REP"
}
}
'import requests
url = "https://your-instance.example.com/api/user-snapshots/{id}/apply"
payload = {
"pipelineMapping": { "Move to Contacted on first reply": { "Contacted": "Reached Out" } },
"agentMapping": {},
"applyAutomations": True,
"applyPrompts": True,
"applyTemplates": True,
"newUser": {
"email": "casey@acme.example",
"password": "TempPass!2026",
"fullName": "Casey New",
"accessRole": "SALES_REP"
}
}
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({
pipelineMapping: {'Move to Contacted on first reply': {Contacted: 'Reached Out'}},
agentMapping: {},
applyAutomations: true,
applyPrompts: true,
applyTemplates: true,
newUser: {
email: 'casey@acme.example',
password: 'TempPass!2026',
fullName: 'Casey New',
accessRole: 'SALES_REP'
}
})
};
fetch('https://your-instance.example.com/api/user-snapshots/{id}/apply', 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://your-instance.example.com/api/user-snapshots/{id}/apply",
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([
'pipelineMapping' => [
'Move to Contacted on first reply' => [
'Contacted' => 'Reached Out'
]
],
'agentMapping' => [
],
'applyAutomations' => true,
'applyPrompts' => true,
'applyTemplates' => true,
'newUser' => [
'email' => 'casey@acme.example',
'password' => 'TempPass!2026',
'fullName' => 'Casey New',
'accessRole' => 'SALES_REP'
]
]),
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://your-instance.example.com/api/user-snapshots/{id}/apply"
payload := strings.NewReader("{\n \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\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://your-instance.example.com/api/user-snapshots/{id}/apply")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/user-snapshots/{id}/apply")
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 \"pipelineMapping\": {\n \"Move to Contacted on first reply\": {\n \"Contacted\": \"Reached Out\"\n }\n },\n \"agentMapping\": {},\n \"applyAutomations\": true,\n \"applyPrompts\": true,\n \"applyTemplates\": true,\n \"newUser\": {\n \"email\": \"casey@acme.example\",\n \"password\": \"TempPass!2026\",\n \"fullName\": \"Casey New\",\n \"accessRole\": \"SALES_REP\"\n }\n}"
response = http.request(request)
puts response.read_body{
"message": "Snapshot applied",
"result": {
"userId": "64ee9a8b1e7f2a001122339c",
"userEmail": "casey@acme.example",
"cloned": {
"automations": 5,
"prompts": 8,
"templates": 12
},
"mapped": {
"prompts": 0
},
"skipped": {
"automations": 0,
"templates": 0
}
}
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}{
"error": "Snapshot not found",
"message": "No snapshot exists with the given id"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Show child attributes
Show child attributes
Example:
{
"email": "casey@acme.example",
"password": "TempPass!2026",
"fullName": "Casey New",
"phoneNumber": "+14155550177",
"designation": "Account Executive",
"accessRole": "SALES_REP"
}
Per-automation map of source pipeline stage value → target stage value.
Show child attributes
Show child attributes
Per-automation override for sourceStatuses array (mapped target stages).
Show child attributes
Show child attributes
Per-automation map of source agent name/id → target agent _id.
Show child attributes
Show child attributes
Same-org apply only: subset of snapshot prompt names to clone.
⌘I