Skip to Content
Developers
Lead campaigns

Attach a buyer to a lead campaign

Needs the campaigns: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/lead-campaigns/{id}/buyers

Puts one of the account’s buyers on the campaign at a priority and price. The buyer must take form leads (422 buyer_no_leads); a buyer already on it answers 409 buyer_exists.

Authorization

key
headerAuthorizationBearer <traki_account_…>

Path Parameters

id*string
Formatuuid

Request Body

application/json
  1. body
buyerId*string
Formatuuid
priority?integer
Range1 <= value <= 20
weight?|null
price?number

What the buyer pays for a lead.

Range0 <= value <= 10000
capDay?|null

Response Body

Success

application/json
  1. response
id*string
Formatuuid
externalId*string|null
code*string
name*string
vertical*string
status*string
distribution*string
saleType*string
saleLimit*integer
Range-9007199254740991 <= value <= 9007199254740991
buyerPrice*string
publisherPayout*string
currency*string
buyers*array<>
publishers*array<>
version*string
createdAt*string
updatedAt*string
Example Request
curl -X POST 'https://api.traki.io/v1/account/lead-campaigns/497f6eca-6276-4993-bfeb-53cbbbba6f08/buyers' \  -H "Authorization: Bearer $TRAKI_KEY" \  -H 'Content-Type: application/json' \  -H 'Idempotency-Key: a-unique-id-for-this-change' \  -d '{  "buyerId": "7925fb6c-1391-458a-9144-275078d9f24b"}'
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"}