Update workflow execution
curl --request PUT \
--url https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"metadata": {},
"primaryPhone": "<string>"
}
'import requests
url = "https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}"
payload = {
"metadata": {},
"primaryPhone": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}, primaryPhone: '<string>'})
};
fetch('https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}', 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://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
],
'primaryPhone' => '<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://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}"
payload := strings.NewReader("{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "CREATED",
"startedAt": "<string>",
"completedAt": "<string>",
"customerLeadId": "<string>",
"primaryPhone": "<string>",
"metadata": {
"firstName": "<string>",
"lastName": "<string>"
},
"disposition": "COULD_NOT_CONNECT",
"definition": {
"steps": [
{
"type": "CALL",
"order": 2,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delayInSecs": 0,
"finishOn": [],
"leaveVoicemail": false,
"initialMessage": "<string>",
"count": 1
}
],
"isInfinite": false
},
"stepExecutions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"type": "CALL",
"order": 123,
"delayInSecs": 123,
"finishOn": [
"COULD_NOT_CONNECT"
],
"startedAt": "<string>",
"completedAt": "<string>",
"leaveVoicemail": true,
"disposition": "COULD_NOT_CONNECT",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentCall": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"callStartedAt": "<string>",
"callEndedAt": "<string>",
"callDuration": 123,
"callEndedReason": "COULD_NOT_CONNECT",
"recordingUrl": "<string>",
"supervisorRecordingUrl": "<string>",
"summary": "<string>"
}
}
],
"createdAt": "<string>",
"variables": {},
"stepIndex": 123,
"nextRunAt": "<string>",
"priorityDate": "<string>"
}{
"status": 400,
"message": "Bad request",
"code": "BAD_REQUEST",
"success": false
}{
"status": 500,
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"success": false
}Workflows
Update workflow execution
Update an agent workflow execution
PUT
/
api
/
v1
/
workflow
/
{workflowId}
/
execution
/
{executionId}
Update workflow execution
curl --request PUT \
--url https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"metadata": {},
"primaryPhone": "<string>"
}
'import requests
url = "https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}"
payload = {
"metadata": {},
"primaryPhone": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({metadata: {}, primaryPhone: '<string>'})
};
fetch('https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}', 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://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'metadata' => [
],
'primaryPhone' => '<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://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}"
payload := strings.NewReader("{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://prod.featherhq.com/api/v1/workflow/{workflowId}/execution/{executionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metadata\": {},\n \"primaryPhone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "CREATED",
"startedAt": "<string>",
"completedAt": "<string>",
"customerLeadId": "<string>",
"primaryPhone": "<string>",
"metadata": {
"firstName": "<string>",
"lastName": "<string>"
},
"disposition": "COULD_NOT_CONNECT",
"definition": {
"steps": [
{
"type": "CALL",
"order": 2,
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"delayInSecs": 0,
"finishOn": [],
"leaveVoicemail": false,
"initialMessage": "<string>",
"count": 1
}
],
"isInfinite": false
},
"stepExecutions": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workflowExecutionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"type": "CALL",
"order": 123,
"delayInSecs": 123,
"finishOn": [
"COULD_NOT_CONNECT"
],
"startedAt": "<string>",
"completedAt": "<string>",
"leaveVoicemail": true,
"disposition": "COULD_NOT_CONNECT",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentCall": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"callStartedAt": "<string>",
"callEndedAt": "<string>",
"callDuration": 123,
"callEndedReason": "COULD_NOT_CONNECT",
"recordingUrl": "<string>",
"supervisorRecordingUrl": "<string>",
"summary": "<string>"
}
}
],
"createdAt": "<string>",
"variables": {},
"stepIndex": 123,
"nextRunAt": "<string>",
"priorityDate": "<string>"
}{
"status": 400,
"message": "Bad request",
"code": "BAD_REQUEST",
"success": false
}{
"status": 500,
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"success": false
}Authorizations
Body
application/json
Response
Agent workflow execution updated successfully
Execution ID
Workflow ID
Execution status
Available options:
CREATED, RUNNING, COMPLETED, FAILED, CANCELLED, PAUSED Execution start timestamp
Execution completion timestamp
Customer lead identifier
Primary phone number
Execution metadata
Show child attributes
Show child attributes
Final execution disposition
Available options:
COULD_NOT_CONNECT, NO_ANSWER, LEFT_VOICEMAIL, VOICEMAIL_DETECTED, SILENCE_TIMEOUT, BAD_NUMBER, NOT_INTERESTED, WARM_TRANSFER, WARM_TRANSFER_FAILED, CALENDLY, DNC, ENDED, FRAUD, LINE_BUSY, TEXT_CONSENT, CALL_AGAIN Workflow definition snapshot
Show child attributes
Show child attributes
Step executions
Show child attributes
Show child attributes
Creation timestamp
Variables for the execution
Show child attributes
Show child attributes
Current step index being processed
Next scheduled run timestamp
Lead priority date