Skip to Content
Developers
Routing

Change a call campaign’s routing

Needs the routing:write scope. About scopes

Try it with a test key

Sends to https://api.traki.io

Test keys only. The key stays in this page while it is open and is never saved.

/v1/account/call-campaigns/{id}/routing

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.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
routingMode?string
Value in"weighted""priority""round_robin""bid"
bidType?string
Value in"fixed""dynamic""rtb"
bidFloor?|null
bidCeiling?|null
bidTimeoutMs?integer
Range200 <= value <= 5000
duplicateWindowSec?integer
Range0 <= value <= 2592000
retryEnabled?boolean
ringTimeoutSec?integer
Range5 <= value <= 120
routingBudgetSec?integer
Range10 <= value <= 600
maxCallSec?|null
callFlowId?|

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.

Itemsitems <= 200
ifVersion?string

The version the change is based on. When the record has changed since, the change is refused with 409 version_conflict.

Match^\d{1,16}$

Response Body

Success

application/json
  1. response
campaignId*string
Formatuuid
routingMode*string
bidType*string
bidFloor*string|null
bidCeiling*string|null
bidTimeoutMs*integer
Range-9007199254740991 <= value <= 9007199254740991
duplicateWindowSec*integer
Range-9007199254740991 <= value <= 9007199254740991
retryEnabled*boolean
ringTimeoutSec*integer
Range-9007199254740991 <= value <= 9007199254740991
routingBudgetSec*integer
Range-9007199254740991 <= value <= 9007199254740991
maxCallSec*|null
callFlowId*|null
buyers*array<>
version*string
updatedAt*string
Example Request
curl -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"}