curl --request PUT \
--url https://api.docsautomator.co/updateAutomation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Invoice Generator",
"isActive": true,
"locale": "en-us"
}
'import requests
url = "https://api.docsautomator.co/updateAutomation"
payload = {
"title": "Updated Invoice Generator",
"isActive": True,
"locale": "en-us"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Updated Invoice Generator', isActive: true, locale: 'en-us'})
};
fetch('https://api.docsautomator.co/updateAutomation', 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.docsautomator.co/updateAutomation",
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([
'title' => 'Updated Invoice Generator',
'isActive' => true,
'locale' => 'en-us'
]),
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.docsautomator.co/updateAutomation"
payload := strings.NewReader("{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.docsautomator.co/updateAutomation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docsautomator.co/updateAutomation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Success",
"updatedAutomation": {
"_id": "<string>",
"title": "<string>",
"dataSource": {
"name": "<string>"
},
"dataSourceName": "<string>",
"docTemplateLink": "<string>",
"newDocumentNameField": "<string>",
"isActive": true,
"isPreview": true,
"saveGoogleDoc": true,
"locale": "<string>",
"formatNumbersWithLocale": true,
"pdfExpiration": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"lastPreviewPdf": "<string>",
"esignature": {
"enabled": true,
"closeType": "signature",
"recipientCount": 123,
"signers": [
{
"signer": 123,
"role": "<string>",
"emailSource": "static",
"email": "<string>",
"name": "<string>"
}
]
}
}
}{
"error": "Missing required parameter"
}{
"error": "Not found"
}Update automation
Updates an existing automation’s settings. Only the fields included in the request body are updated.
curl --request PUT \
--url https://api.docsautomator.co/updateAutomation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Updated Invoice Generator",
"isActive": true,
"locale": "en-us"
}
'import requests
url = "https://api.docsautomator.co/updateAutomation"
payload = {
"title": "Updated Invoice Generator",
"isActive": True,
"locale": "en-us"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({title: 'Updated Invoice Generator', isActive: true, locale: 'en-us'})
};
fetch('https://api.docsautomator.co/updateAutomation', 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.docsautomator.co/updateAutomation",
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([
'title' => 'Updated Invoice Generator',
'isActive' => true,
'locale' => 'en-us'
]),
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.docsautomator.co/updateAutomation"
payload := strings.NewReader("{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.docsautomator.co/updateAutomation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.docsautomator.co/updateAutomation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"Updated Invoice Generator\",\n \"isActive\": true,\n \"locale\": \"en-us\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Success",
"updatedAutomation": {
"_id": "<string>",
"title": "<string>",
"dataSource": {
"name": "<string>"
},
"dataSourceName": "<string>",
"docTemplateLink": "<string>",
"newDocumentNameField": "<string>",
"isActive": true,
"isPreview": true,
"saveGoogleDoc": true,
"locale": "<string>",
"formatNumbersWithLocale": true,
"pdfExpiration": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"lastPreviewPdf": "<string>",
"esignature": {
"enabled": true,
"closeType": "signature",
"recipientCount": 123,
"signers": [
{
"signer": 123,
"role": "<string>",
"emailSource": "static",
"email": "<string>",
"name": "<string>"
}
]
}
}
}{
"error": "Missing required parameter"
}{
"error": "Not found"
}Authorizations
API key from your workspace settings. Pass as Authorization: Bearer <key> or X-API-Key: <key>. Find it at app.docsautomator.co/settings/workspace/api.
Query Parameters
The automation ID to update.
Body
Automation name.
Google Doc template URL.
Field name or formula for generated document names.
Whether the automation is active.
Test mode. true makes watermarked test documents, false makes live documents. New automations and copies start with true. Going live needs a confirmed account email.
Save a Google Doc copy alongside the PDF.
Google Drive folder URL for saved documents.
Locale for date and number formatting (e.g., en-us, de-de).
Format numbers using the automation's locale.
PDF expiration period. never (the default) keeps PDFs until you delete them, immediate deletes them about 5 minutes after generation, and other values set the expiration window.
never, immediate, oneday, threedays, oneweek, twoweeks, onemonth, threemonths, sixmonths, oneyear Show child attributes
Show child attributes