Create or update a publisher by the account’s own id
Needs the publishers:write scope. About scopes
Creates the publisher when no publisher of the account has this externalId, else updates it, so running the same sync twice never makes a duplicate. created says which happened. invite applies only when the publisher is created.
keyAuthorizationBearer <traki_account_…>externalId*stringThe account’s own id for the record, unique in the account.
1 <= length <= 200application/json- body
name*string2 <= length <= 120companyName?|nullcontactName?|nullcontactEmail?|nullcontactPhone?|nullmodules?Which modules the party works in: call leads, form leads or both.
payout?How and when the publisher is paid: method, payment terms in days, minimum payout.
ifVersion?stringThe version the change is based on. When the record has changed since, the change is refused with 409 version_conflict.
^\d{1,16}$invite?Send a portal invitation to this email. Without it the record is created silently: no email and no invitation. Applies only when the call creates the record.
Success
application/json- response
id*stringuuidexternalId*string|nullcode*stringname*stringkind*stringstatus*stringcompanyName*string|nullcontactName*string|nullcontactEmail*string|nullcontactPhone*string|nullmodules*payout*version*stringcreatedAt*stringupdatedAt*stringcreated*booleancurl -X POST 'https://api.traki.io/v1/account/publishers/by-external-id/string' \ -H "Authorization: Bearer $TRAKI_KEY" \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: a-unique-id-for-this-change' \ -d '{ "name": "string"}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "externalId": "string", "code": "string", "name": "string", "kind": "string", "status": "string", "companyName": "string", "contactName": "string", "contactEmail": "string", "contactPhone": "string", "modules": { "calls": true, "leads": true }, "payout": { "method": "string", "termsDays": -9007199254740991, "minimum": "string" }, "version": "string", "createdAt": "string", "updatedAt": "string", "created": true}Change a publisher PATCH
Changes the fields sent and leaves the rest: name, contact, modules, payout terms and the account’s own `externalId`. With `ifVersion`, a change based on an older version is refused.
Pause a publisher POST
A paused publisher keeps its campaigns and numbers but its traffic is not routed until resumed. The account’s own traffic cannot be paused.