Lead campaigns
Create a lead campaign
Needs the campaigns:write scope. About scopes
Creates a lead campaign as a draft, with the account’s own traffic on it. Attach buyers and publishers, then POST /lead-campaigns/{id}/resume to activate it. externalId must be unique in the account (409 external_id_taken).
keyheader
AuthorizationBearer <traki_account_…>application/json- body
externalId?stringThe account’s own id for the record, unique in the account.
Length
1 <= length <= 200name*stringLength
3 <= length <= 120vertical*stringLength
2 <= length <= 80leadTypeId?|A lead type of the account’s catalog; the vertical then follows its label.
distribution?stringHow a lead picks among the campaign’s buyers.
Value in
"waterfall""round_robin""weighted""bid""all"saleType?stringValue in
"exclusive""shared"saleLimit?integerHow many buyers a shared lead is sold to.
Range
1 <= value <= 10buyerPrice?numberRange
0 <= value <= 10000publisherPayout?numberRange
0 <= value <= 10000states?array<>US states taken; empty takes all.
Items
items <= 60returnsAllowed?booleanreturnWindowDays?integerRange
0 <= value <= 60isTest?booleanA test campaign: left out of every figure; every lead it takes is a test lead.
Success
application/json- response
id*stringFormat
uuidexternalId*string|nullcode*stringname*stringvertical*stringstatus*stringdistribution*stringsaleType*stringsaleLimit*integerRange
-9007199254740991 <= value <= 9007199254740991buyerPrice*stringpublisherPayout*stringcurrency*stringbuyers*array<>publishers*array<>version*stringcreatedAt*stringupdatedAt*stringcurl -X POST 'https://api.traki.io/v1/account/lead-campaigns' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: a-unique-id-for-this-change' \ -d '{ "name": "string", "vertical": "string"}'Example Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "code": "string", "name": "string", "vertical": "string", "status": "string", "distribution": "string", "saleType": "string", "saleLimit": -9007199254740991, "buyerPrice": "string", "publisherPayout": "string", "currency": "string", "buyers": [ { "buyer": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "name": "string" }, "priority": -9007199254740991, "weight": -9007199254740991, "price": "string", "status": "string" } ], "publishers": [ { "publisher": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "name": "string" }, "status": "string", "testMode": true } ], "version": "string", "createdAt": "string", "updatedAt": "string"}