Call it
curl https://api.peume.com/v1/call/add-a-forwarding-rule \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"accountId": "your accountId",
"destinationId": "your destinationId"
}
}'const res = await fetch("https://api.peume.com/v1/call/add-a-forwarding-rule", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"accountId": "your accountId",
"destinationId": "your destinationId"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/add-a-forwarding-rule",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"accountId": "your accountId",
"destinationId": "your destinationId"
}
},
)
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: add-a-forwarding-rule.
Parameters
accountIdRequiredstringConnected ads account ID that owns the destination.
destinationIdRequiredstringThe platform destination: a pixel, a conversion action, a conversion rule, a GA4 web stream measurement id (`G-…`), a HubSpot portal id, a Salesforce org id or a Mailchimp audience id.
eventNamesarraysourcesarrayForward only events from these sources, such as only `web` for a tracked website. Leave it out to forward events from every source.
eventNameMapobjecteventNameMap
valueOverrideobjectvalueOverride
valueConditionobjectvalueCondition
eventValuesobjecteventValues
apiSecretstringGoogle Analytics streams only: the stream's Measurement Protocol API secret (GA4 Admin › Data streams). Optional when the connection has edit access, since then creates it. Checked against Google's validation server, stored encrypted, never returned. Change it with `PATCH /v1/events/forwarding-rules/{ruleId}`.
