Automations
Update Automation
Rename, change steps, or activate/pause.
PATCH
/automations/{automation_id}Path Parameters
automation_idstringrequiredAutomation ID.
Body Parameters
status'active' | 'paused'Status.
const res = await fetch('https://post-waves.com/automations/{automation_id}', {
method: 'PATCH',
headers: {
Authorization: 'Bearer pw_xxxxxxxxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"status": "paused"
}),
});
const data = await res.json();import requests
res = requests.patch(
"https://post-waves.com/automations/{automation_id}",
headers={"Authorization": "Bearer pw_xxxxxxxxx"},
json={
"status": "paused"
},
)
print(res.json())<?php
$ch = curl_init('https://post-waves.com/automations/{automation_id}');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer pw_xxxxxxxxx',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'status' => 'paused',
]),
]);
$response = json_decode(curl_exec($ch), true);require "net/http"
require "json"
uri = URI("https://post-waves.com/automations/{automation_id}")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer pw_xxxxxxxxx"
req["Content-Type"] = "application/json"
req.body = {
status: "paused"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") { |http| http.request(req) }
puts JSON.parse(res.body)package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"status":"paused"}`)
req, _ := http.NewRequest("PATCH", "https://post-waves.com/automations/{automation_id}", body)
req.Header.Set("Authorization", "Bearer pw_xxxxxxxxx")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(string(out))
}curl -X PATCH 'https://post-waves.com/automations/{automation_id}' \
-H 'Authorization: Bearer pw_xxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{"status":"paused"}'Try itPATCH
/automations/%7Bautomation_id%7DNo key yet? Create one in the dashboard.