Skip to main content
PATCH
/
api
/
v1
/
agents
/
{agentId}
/
versions
/
{versionId}
/
email-config
Update agent version email configuration
curl --request PATCH \
  --url https://prod.featherhq.com/api/v1/agents/{agentId}/versions/{versionId}/email-config \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "emailDomainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "emailFromLocalPart": "<string>",
  "emailFromName": "<string>",
  "emailMaxTokens": 4050,
  "emailTemperature": 1,
  "emailInactivityTimeoutHours": 2,
  "emailFilteringEnabled": true,
  "emailConfidenceThreshold": 0.5,
  "emailReplyToAddress": "jsmith@example.com"
}
'
import requests

url = "https://prod.featherhq.com/api/v1/agents/{agentId}/versions/{versionId}/email-config"

payload = {
"emailDomainId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"emailFromLocalPart": "<string>",
"emailFromName": "<string>",
"emailMaxTokens": 4050,
"emailTemperature": 1,
"emailInactivityTimeoutHours": 2,
"emailFilteringEnabled": True,
"emailConfidenceThreshold": 0.5,
"emailReplyToAddress": "jsmith@example.com"
}
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({
emailDomainId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
emailFromLocalPart: '<string>',
emailFromName: '<string>',
emailMaxTokens: 4050,
emailTemperature: 1,
emailInactivityTimeoutHours: 2,
emailFilteringEnabled: true,
emailConfidenceThreshold: 0.5,
emailReplyToAddress: 'jsmith@example.com'
})
};

fetch('https://prod.featherhq.com/api/v1/agents/{agentId}/versions/{versionId}/email-config', 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/agents/{agentId}/versions/{versionId}/email-config",
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([
'emailDomainId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'emailFromLocalPart' => '<string>',
'emailFromName' => '<string>',
'emailMaxTokens' => 4050,
'emailTemperature' => 1,
'emailInactivityTimeoutHours' => 2,
'emailFilteringEnabled' => true,
'emailConfidenceThreshold' => 0.5,
'emailReplyToAddress' => 'jsmith@example.com'
]),
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/agents/{agentId}/versions/{versionId}/email-config"

payload := strings.NewReader("{\n \"emailDomainId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailFromLocalPart\": \"<string>\",\n \"emailFromName\": \"<string>\",\n \"emailMaxTokens\": 4050,\n \"emailTemperature\": 1,\n \"emailInactivityTimeoutHours\": 2,\n \"emailFilteringEnabled\": true,\n \"emailConfidenceThreshold\": 0.5,\n \"emailReplyToAddress\": \"jsmith@example.com\"\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://prod.featherhq.com/api/v1/agents/{agentId}/versions/{versionId}/email-config")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"emailDomainId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailFromLocalPart\": \"<string>\",\n \"emailFromName\": \"<string>\",\n \"emailMaxTokens\": 4050,\n \"emailTemperature\": 1,\n \"emailInactivityTimeoutHours\": 2,\n \"emailFilteringEnabled\": true,\n \"emailConfidenceThreshold\": 0.5,\n \"emailReplyToAddress\": \"jsmith@example.com\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://prod.featherhq.com/api/v1/agents/{agentId}/versions/{versionId}/email-config")

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 \"emailDomainId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"emailFromLocalPart\": \"<string>\",\n \"emailFromName\": \"<string>\",\n \"emailMaxTokens\": 4050,\n \"emailTemperature\": 1,\n \"emailInactivityTimeoutHours\": 2,\n \"emailFilteringEnabled\": true,\n \"emailConfidenceThreshold\": 0.5,\n \"emailReplyToAddress\": \"jsmith@example.com\"\n}"

response = http.request(request)
puts response.read_body
{
  "version": {
    "id": "<string>",
    "agentId": "<string>",
    "version": 123,
    "emailDomainId": "<string>",
    "emailFromLocalPart": "<string>",
    "emailFromName": "<string>",
    "emailMaxTokens": 123,
    "emailTemperature": 123,
    "emailInactivityTimeoutHours": 123,
    "emailFilteringEnabled": true,
    "emailConfidenceThreshold": 123,
    "emailTags": [
      {
        "name": "<string>",
        "prompt": "<string>",
        "autoClose": true,
        "gmailLabelId": "<string>",
        "gmailLabelName": "<string>"
      }
    ],
    "emailReplyToAddress": "<string>",
    "updatedAt": "<string>"
  }
}
{
"status": 400,
"message": "Bad request",
"code": "BAD_REQUEST",
"success": false
}
{
"status": 404,
"message": "Not found",
"code": "NOT_FOUND",
"success": false
}
{
"status": 500,
"message": "Internal server error",
"code": "INTERNAL_SERVER_ERROR",
"success": false
}

Authorizations

X-API-Key
string
header
required

Path Parameters

agentId
string<uuid>
required
versionId
string<uuid>
required

Body

application/json
emailDomainId
string<uuid> | null
emailFromLocalPart
string | null
Required string length: 1 - 64
Pattern: ^[a-zA-Z0-9._%+\-]+$
emailFromName
string | null
Required string length: 1 - 100
emailMaxTokens
integer
Required range: 100 <= x <= 8000
emailTemperature
number
Required range: 0 <= x <= 2
emailInactivityTimeoutHours
integer | null
Required range: x >= 1
emailFilteringEnabled
boolean
emailResponseMode
enum<string>
Available options:
AUTO_SEND,
SUGGEST_ONLY,
CONFIDENCE_BASED
emailConfidenceThreshold
number
Required range: 0 <= x <= 1
emailReplyToAddress
string<email> | null

Response

Email configuration updated

version
object
required