Call it
curl https://api.peume.com/v1/call/install-a-automation-template \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"templateId": "your templateId",
"inputs": {
"adAccount": {
"accountId": "6731a0c2e4b0f1a2b3c4d5e6",
"adAccountId": "act_1234567890"
}
},
"status": "paused"
}
}'const res = await fetch("https://api.peume.com/v1/call/install-a-automation-template", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"templateId": "your templateId",
"inputs": {
"adAccount": {
"accountId": "6731a0c2e4b0f1a2b3c4d5e6",
"adAccountId": "act_1234567890"
}
},
"status": "paused"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/install-a-automation-template",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"templateId": "your templateId",
"inputs": {
"adAccount": {
"accountId": "6731a0c2e4b0f1a2b3c4d5e6",
"adAccountId": "act_1234567890"
}
},
"status": "paused"
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: install-a-automation-template.
Parameters
templateIdRequiredstringThe id of one of 's templates, for example `stop_losers`.
inputsobjectA value for each input, by its `key`. Required inputs without a default must be sent.
Example: {"adAccount":{"accountId":"6731a0c2e4b0f1a2b3c4d5e6","adAccountId":"act_1234567890"}}
targetsarrayInstall several times in one call, for example on many ad accounts. Each target is its own install, all or nothing, and its `inputs` win over the shared `inputs`. A failed target leaves the others in place.
statusstringThe status of every automation created.
active · paused
Example: paused
