Routing
Change a call campaign’s routing
Needs the routing:write scope. About scopes
Changes the routing and bidding settings sent and each named buyer’s tier, weight and bid, and leaves the rest. A buyer not on the campaign answers 404. With ifVersion, a change based on an older version of the campaign is refused (409 version_conflict). Archived campaigns cannot be changed.
keyheader
AuthorizationBearer <traki_account_…>id*stringFormat
uuidapplication/json- body
routingMode?stringValue in
"weighted""priority""round_robin""bid"bidType?stringValue in
"fixed""dynamic""rtb"bidFloor?|nullbidCeiling?|nullbidTimeoutMs?integerRange
200 <= value <= 5000duplicateWindowSec?integerRange
0 <= value <= 2592000retryEnabled?booleanringTimeoutSec?integerRange
5 <= value <= 120routingBudgetSec?integerRange
10 <= value <= 600maxCallSec?|nullcallFlowId?|One of the campaign’s own call flows to run, or null for none. Needs the call flow feature for steps beyond ringing buyers.
buyers?array<>Per-buyer routing on this campaign; buyers left out keep theirs.
Items
items <= 200ifVersion?stringThe version the change is based on. When the record has changed since, the change is refused with 409 version_conflict.
Match
^\d{1,16}$Success
application/json- response
campaignId*stringFormat
uuidroutingMode*stringbidType*stringbidFloor*string|nullbidCeiling*string|nullbidTimeoutMs*integerRange
-9007199254740991 <= value <= 9007199254740991duplicateWindowSec*integerRange
-9007199254740991 <= value <= 9007199254740991retryEnabled*booleanringTimeoutSec*integerRange
-9007199254740991 <= value <= 9007199254740991routingBudgetSec*integerRange
-9007199254740991 <= value <= 9007199254740991maxCallSec*|nullcallFlowId*|nullbuyers*array<>version*stringupdatedAt*stringcurl -X PATCH 'https://api.traki.io/v1/account/call-campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08/routing' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -d '{}'Example Response
{ "campaignId": "13f8bf6d-dc27-4a04-bffe-6e5b13c19ddf", "routingMode": "string", "bidType": "string", "bidFloor": "string", "bidCeiling": "string", "bidTimeoutMs": -9007199254740991, "duplicateWindowSec": -9007199254740991, "retryEnabled": true, "ringTimeoutSec": -9007199254740991, "routingBudgetSec": -9007199254740991, "maxCallSec": -9007199254740991, "callFlowId": "80fb559f-d693-4e3e-8016-041c1fd3c5c5", "buyers": [ { "buyer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "name": "string" }, "tier": -9007199254740991, "weight": -9007199254740991, "bid": "string", "status": "string" } ], "version": "string", "updatedAt": "string"}