curl --request POST \
--url https://api.example.com/v1/playbooks/{slug}/install \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": {
"account": "clx0account123"
},
"inputs": {
"keyword": "GUIDE",
"link": "https://example.com/guide"
},
"force": false
}
'import requests
url = "https://api.example.com/v1/playbooks/{slug}/install"
payload = {
"accounts": { "account": "clx0account123" },
"inputs": {
"keyword": "GUIDE",
"link": "https://example.com/guide"
},
"force": False
}
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({
accounts: {account: 'clx0account123'},
inputs: {keyword: 'GUIDE', link: 'https://example.com/guide'},
force: false
})
};
fetch('https://api.example.com/v1/playbooks/{slug}/install', 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.example.com/v1/playbooks/{slug}/install",
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([
'accounts' => [
'account' => 'clx0account123'
],
'inputs' => [
'keyword' => 'GUIDE',
'link' => 'https://example.com/guide'
],
'force' => false
]),
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.example.com/v1/playbooks/{slug}/install"
payload := strings.NewReader("{\n \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\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://api.example.com/v1/playbooks/{slug}/install")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/playbooks/{slug}/install")
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 \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\n}"
response = http.request(request)
puts response.read_bodyInstall a playbook
Creates the automations and sequences the playbook describes, on the accounts you pass. Everything it creates is a normal PlugKit object: edit or delete it afterwards from Campaigns, or remove the whole install in one call.
curl --request POST \
--url https://api.example.com/v1/playbooks/{slug}/install \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accounts": {
"account": "clx0account123"
},
"inputs": {
"keyword": "GUIDE",
"link": "https://example.com/guide"
},
"force": false
}
'import requests
url = "https://api.example.com/v1/playbooks/{slug}/install"
payload = {
"accounts": { "account": "clx0account123" },
"inputs": {
"keyword": "GUIDE",
"link": "https://example.com/guide"
},
"force": False
}
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({
accounts: {account: 'clx0account123'},
inputs: {keyword: 'GUIDE', link: 'https://example.com/guide'},
force: false
})
};
fetch('https://api.example.com/v1/playbooks/{slug}/install', 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.example.com/v1/playbooks/{slug}/install",
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([
'accounts' => [
'account' => 'clx0account123'
],
'inputs' => [
'keyword' => 'GUIDE',
'link' => 'https://example.com/guide'
],
'force' => false
]),
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.example.com/v1/playbooks/{slug}/install"
payload := strings.NewReader("{\n \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\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://api.example.com/v1/playbooks/{slug}/install")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/playbooks/{slug}/install")
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 \"accounts\": {\n \"account\": \"clx0account123\"\n },\n \"inputs\": {\n \"keyword\": \"GUIDE\",\n \"link\": \"https://example.com/guide\"\n },\n \"force\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
The account to use for each slot of the playbook, keyed by slot ({"account": "acc_123"}). Every slot listed by GET /playbooks/{slug} must be filled.
Show child attributes
Show child attributes
{ "account": "clx0account123" }
Values for the playbook inputs, keyed by input key. Anything left out falls back to the catalog default, so {"keyword":"GUIDE","link":"https://…"} is usually enough.
Show child attributes
Show child attributes
{
"keyword": "GUIDE",
"link": "https://example.com/guide"
}
Install again on an account that already runs this playbook. Off by default: two copies send two DMs for a single comment.