# Developers - [TRAKI Developer API](/developers): Connect your own systems to TRAKI. One API in three parts, one for each kind of key holder. - [Errors](/developers/errors): Every error code the Developer API answers, what it means and what to do. - [Security and responsibilities](/developers/security): What TRAKI guarantees, what you are responsible for, and how to report a problem. - [Changelog](/developers/changelog): Every change to the Developer API, newest first. - Account API: For the account owner - [Account API](/developers/account): For the TRAKI customer who owns the account. Read and run your whole account from your own systems. - [Quickstart](/developers/account/quickstart): Make an Account API key and get a real answer from the API in five minutes. - **Concepts** - [Authentication and keys](/developers/account/concepts/authentication): How to send your key, what the key format means, and how to roll a key. - [Scopes](/developers/account/concepts/scopes): What each scope lets a key read or change. - [Errors](/developers/account/concepts/errors): The shape of every error answer, and how to handle it. - [Paging](/developers/account/concepts/paging): Reading lists a page at a time, and keeping a copy in step with updatedSince. - [Rate limits](/developers/account/concepts/rate-limits): How many requests a key may send, and the headers that say where you stand. - [Safe retries](/developers/account/concepts/retries): Sending a change again without making it twice, with Idempotency-Key. - [Versions](/developers/account/concepts/versions): The /v1 address, the Traki-Version header and the compatibility promise. - [Test mode](/developers/account/concepts/test-mode): Test keys, the test copy of the account and the request tester. - [Webhooks](/developers/account/concepts/webhooks): Receiving events, and verifying each delivery in Node, Python and PHP. - [Security and responsibilities](/developers/account/concepts/responsibilities): What TRAKI guarantees, and what you are responsible for. - **Guides** - [Build a reporting dashboard](/developers/account/guides/reporting-dashboard): Show call and lead totals by day, campaign, buyer or publisher on your own site. - [Add a buyer and attach it to a campaign](/developers/account/guides/add-a-buyer): Create a buyer from your own system and attach it to a call campaign. - [Onboard a publisher](/developers/account/guides/onboard-a-publisher): Add a publisher, give it numbers and payout terms, and let it see its own results. - [Show each buyer only their own data](/developers/account/guides/each-buyer-their-own-data): Build a buyer area on your own site without leaking other buyers' records or your margins. - [Receive call events](/developers/account/guides/receive-call-events): Hear about every call within seconds, and check that each event really came from TRAKI. - [Export a month of calls](/developers/account/guides/export-a-month-of-calls): Read every call in a month, page by page, into a file or your own database. - **Reference** - [All routes](/developers/account/reference): Every route of the Account API, with the scope it needs. Each links to its own page. - Keys - [The key making this request](/developers/account/reference/keys/get-key): Answers the Account API key's own details and the account it is locked to. Needs no scope. - Money - [Approve a payout](/developers/account/reference/money/post-payouts-id-approve): Approves a payout waiting for review, so it can be paid. Only a payout in `pending_review` can be approved (422 bad_transition). Needs an Idempotency-Key: sending the same request again with the same key answers as the first did and approves once. - [Hold a payout](/developers/account/reference/money/post-payouts-id-hold): Holds a payout waiting for review or approved, so it is not paid until released. Needs an Idempotency-Key. - [Release a held payout](/developers/account/reference/money/post-payouts-id-release): Puts a held payout back to `pending_review`, to be approved again. Needs an Idempotency-Key. - [Settle a buyer’s dispute](/developers/account/reference/money/post-disputes-id-settle): Decides an open dispute, as the portal’s Accept and Reject do. `accept` credits the buyer (the disputed amount, or `creditAmount`; 0 accepts with no credit) on the buyer statement covering the charge; `reject` closes it with no credit. A dispute already decided answers 422 dispute_closed. Needs an Idempotency-Key, so a retry credits once. - [Buyer statements and publisher payout statements](/developers/account/reference/money/get-statements) - [One statement](/developers/account/reference/money/get-statements-id) - [Payouts to publishers](/developers/account/reference/money/get-payouts) - [One payout](/developers/account/reference/money/get-payouts-id) - Buying numbers - [Search numbers for sale](/developers/account/reference/buying-numbers/get-numbers-available): Searches the carrier’s numbers by country, type and area code or prefix, as the portal’s Buy numbers search does. Nothing is reserved: order the ones you want with POST /numbers/orders. - [Order numbers (costs money)](/developers/account/reference/buying-numbers/post-numbers-orders): Buys the numbers chosen from a search (`phoneNumbers`), or a `quantity` (returned numbers the account holds are reused first and the carrier supplies the rest), through the portal’s own purchase flow: the plan’s number limits (402 limit_reached), a card on file (402 card_required) and the balance for setup fees apply as they do in the portal. Each chosen number comes back purchased or failed with its reason. An order for a publisher without purchase bypass waits in `pending_approval`. Needs an Idempotency-Key: the same request sent again with the same key answers as the first did and buys once. - [Give a number back to the carrier](/developers/account/reference/buying-numbers/post-numbers-id-carrier-release): Releases a number the account owns at the carrier, for good: it stops ringing and leaves the account’s bill. The portal asks for the release and confirms it in two steps; this route does both. The number must be on no campaign and in no pool (422 number_assigned, pooled_number), and no visitor session may hold it (422 number_leased). `state` is `confirmed`, or `failed` with the carrier’s reason in `checksNote` (the number then stays in the account as returned). To take a number off its campaign without giving it up, use POST /numbers/{id}/release. Needs an Idempotency-Key. - Routing - [A call campaign’s routing and bidding settings](/developers/account/reference/routing/get-call-campaigns-id-routing): How a call picks among the campaign’s buyers (routing mode, bid type, floor, ceiling and auction timeout), retries and ring times, the call flow it runs, and each buyer’s tier, weight and bid. - [Change a call campaign’s routing](/developers/account/reference/routing/patch-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. - [List call flows](/developers/account/reference/routing/get-call-flows) - [One call flow, with its draft](/developers/account/reference/routing/get-call-flows-id) - [Change a call flow’s name, description or draft](/developers/account/reference/routing/patch-call-flows-id): Saves what is sent. `draft` replaces the draft document whole (it is not published until POST /call-flows/{id}/publish); its issues come back with the flow and do not block the save. With `ifVersion`, a change based on an older version is refused (409 version_conflict). Archived flows cannot be changed (422 flow_archived). - [Publish a call flow’s draft](/developers/account/reference/routing/post-call-flows-id-publish): Publishes the draft as the flow’s next version; the campaign’s calls run it from then on. The draft is checked again first (422 flow_not_ready, with the issues), a draft equal to the published version is refused (422 flow_unchanged), and a flow on no campaign cannot be published (422 flow_unassigned). With `ifVersion`, a flow changed since is refused (409 version_conflict). - Lead campaigns - [List lead campaigns, with their buyers and publishers](/developers/account/reference/lead-campaigns/get-lead-campaigns) - [Create a lead campaign](/developers/account/reference/lead-campaigns/post-lead-campaigns): 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). - [One lead campaign](/developers/account/reference/lead-campaigns/get-lead-campaigns-id) - [Change a lead campaign](/developers/account/reference/lead-campaigns/patch-lead-campaigns-id): Changes the fields sent and leaves the rest. An exclusive campaign sells each lead once (422 sale_limit for a sale limit above 1). With `ifVersion`, a change based on an older version is refused. Archived campaigns cannot be changed. - [Pause a lead campaign](/developers/account/reference/lead-campaigns/post-lead-campaigns-id-pause): Stops taking new leads; only an active campaign can be paused. - [Resume or activate a lead campaign](/developers/account/reference/lead-campaigns/post-lead-campaigns-id-resume): Takes leads again. A draft is activated when it is ready (422 campaign_not_ready lists what is missing). - [Attach a buyer to a lead campaign](/developers/account/reference/lead-campaigns/post-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. - [Detach a buyer from a lead campaign](/developers/account/reference/lead-campaigns/delete-lead-campaigns-id-buyers-buyerId): Takes the buyer off the campaign; it is sent no more of its leads. - [Attach a publisher to a lead campaign](/developers/account/reference/lead-campaigns/post-lead-campaigns-id-publishers): Puts one of the account’s publishers on the campaign, approved, with its payout. A publisher detached earlier is approved again with its terms as they were. It starts in test mode unless `testMode` is false. A publisher already on it answers 409 source_exists. - [Detach a publisher from a lead campaign](/developers/account/reference/lead-campaigns/delete-lead-campaigns-id-publishers-publisherId): Revokes the publisher on the campaign (or declines it, if it was waiting): its leads to this campaign are refused from then on. Its history stays. - Account - [The account: profile, current limits and API usage](/developers/account/reference/account/get-account) - Buyers - [List buyers](/developers/account/reference/buyers/get-buyers) - [Create a buyer](/developers/account/reference/buyers/post-buyers): Creates a buyer that can take traffic at once. Creation is silent: TRAKI sends no email and no portal invitation unless `invite` is given. `externalId`, the account’s own id, must be unique in the account (409 external_id_taken). - [One buyer](/developers/account/reference/buyers/get-buyers-id) - [Change a buyer](/developers/account/reference/buyers/patch-buyers-id): Changes the fields sent and leaves the rest: name, contact, time zone, modules, concurrency cap, API access and the account’s own `externalId`. With `ifVersion`, a change based on an older version is refused. - [Create or update a buyer by the account’s own id](/developers/account/reference/buyers/post-buyers-by-external-id-externalId): Creates the buyer when no buyer 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 buyer is created. - [Pause a buyer](/developers/account/reference/buyers/post-buyers-id-pause): A paused buyer stays on its campaigns but takes no calls or leads until resumed. - [Resume a paused buyer](/developers/account/reference/buyers/post-buyers-id-resume): The buyer takes traffic again. - Publishers - [List publishers](/developers/account/reference/publishers/get-publishers) - [Create a publisher](/developers/account/reference/publishers/post-publishers): Creates a publisher (a sub-publisher sending traffic under the account). Creation is silent: TRAKI sends no email and no portal invitation unless `invite` is given. `externalId` must be unique in the account (409 external_id_taken). - [One publisher](/developers/account/reference/publishers/get-publishers-id) - [Change a publisher](/developers/account/reference/publishers/patch-publishers-id): 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. - [Create or update a publisher by the account’s own id](/developers/account/reference/publishers/post-publishers-by-external-id-externalId): 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. - [Pause a publisher](/developers/account/reference/publishers/post-publishers-id-pause): A paused publisher keeps its campaigns and numbers but its traffic is not routed until resumed. The account’s own traffic cannot be paused. - [Resume a paused publisher](/developers/account/reference/publishers/post-publishers-id-resume): The publisher’s traffic is routed again. - [Approve a publisher’s application to a campaign](/developers/account/reference/publishers/post-publishers-id-approve): Approves the publisher’s pending application to the campaign named in the body, as the portal’s Applications page does. Approval is participation only: no number pool or purchase approval comes with it. 404 when there is no pending application. - Call campaigns - [List call campaigns, with their buyers and publishers](/developers/account/reference/call-campaigns/get-call-campaigns) - [Create a call campaign](/developers/account/reference/call-campaigns/post-call-campaigns): Creates a call campaign as a draft with the account’s own traffic on it. Attach buyers and publishers, then resume it to start routing (resuming a draft activates it once it has what it needs). Counts against the plan’s campaigns (402 limit_reached). - [One call campaign](/developers/account/reference/call-campaigns/get-call-campaigns-id) - [Change a call campaign](/developers/account/reference/call-campaigns/patch-call-campaigns-id): Changes the fields sent and leaves the rest. With `ifVersion`, a change based on an older version is refused. Archived campaigns cannot be changed. - [Pause a call campaign](/developers/account/reference/call-campaigns/post-call-campaigns-id-pause): Stops routing new calls; only an active campaign can be paused. - [Resume or activate a call campaign](/developers/account/reference/call-campaigns/post-call-campaigns-id-resume): Starts routing again. A draft is activated when it is ready (422 campaign_not_ready lists what is missing). - [Attach a buyer to a call campaign](/developers/account/reference/call-campaigns/post-call-campaigns-id-buyers): Puts one of the account’s buyers on the campaign with its bid, tier and caps. The bid defaults to the campaign’s buyer price. 409 buyer_exists when it is already on. - [Detach a buyer from a call campaign](/developers/account/reference/call-campaigns/delete-call-campaigns-id-buyers-buyerId): Takes the buyer off the campaign; its history on the campaign is kept. - [Attach a publisher to a call campaign](/developers/account/reference/call-campaigns/post-call-campaigns-id-publishers): Puts one of the account’s publishers on the campaign with its payout. `approved` (the default) lets it route at once; `invited` asks it to apply. 409 source_exists when it is already on. - [Detach a publisher from a call campaign](/developers/account/reference/call-campaigns/delete-call-campaigns-id-publishers-publisherId): Takes the publisher off the campaign. Its numbers on the campaign stop routing through it but stay owned, to be assigned again. The account’s own traffic cannot be detached. - Numbers - [List the account’s numbers and their assignments](/developers/account/reference/numbers/get-numbers) - [One number](/developers/account/reference/numbers/get-numbers-id) - [Assign a number to a campaign and publisher](/developers/account/reference/numbers/post-numbers-id-assign): Puts the number on one of the account’s call campaigns, for one of its publishers. Give `campaignId`, `publisherId` or both: without `campaignId` the number stays on its current campaign and changes publisher; without `publisherId` it keeps its publisher. The publisher must be approved on the campaign (422 source_not_approved). Pool numbers follow their pool and cannot be assigned one by one. - [Take a number off its campaign (and publisher)](/developers/account/reference/numbers/post-numbers-id-release): Unassigns the number: it leaves its campaign and stops routing calls, and with `publisher: true` it also leaves its publisher and returns to the account’s own use. The account keeps the number. This is not a release to the carrier: giving a number back to the carrier is a purchase-side action that comes with the numbers-purchase routes. Pool numbers follow their pool and cannot be released one by one. - Calls - [The call log, newest first](/developers/account/reference/calls/get-calls) - [One call](/developers/account/reference/calls/get-calls-id) - Leads - [The lead log, newest first](/developers/account/reference/leads/get-leads) - [One lead](/developers/account/reference/leads/get-leads-id) - Reports - [Call totals over a period, grouped by day, campaign, buyer or publisher](/developers/account/reference/reports/get-reports-calls) - [Lead totals over a period, grouped by day, campaign, buyer or publisher](/developers/account/reference/reports/get-reports-leads) - Events - [Every event of the last 30 days, oldest first, for catching up after downtime](/developers/account/reference/events/get-events): The same events webhooks carry (calls, leads, orders, money and record changes), with the same ids, so a receiver can skip one it already handled. - Audit log - [Who changed what in the account, newest first](/developers/account/reference/audit-log/get-audit) - Webhooks - [Webhook endpoints](/developers/account/reference/webhooks/get-webhooks) - [Add a webhook endpoint; its signing secret is answered once](/developers/account/reference/webhooks/post-webhooks): Only public HTTPS addresses are accepted. Events are signed the Standard Webhooks way. - [Change an endpoint’s address or events](/developers/account/reference/webhooks/patch-webhooks-id) - [Remove an endpoint](/developers/account/reference/webhooks/delete-webhooks-id) - [Roll the signing secret; the old one keeps signing for 24 hours](/developers/account/reference/webhooks/post-webhooks-id-roll-secret) - [Pause an endpoint (events are kept)](/developers/account/reference/webhooks/post-webhooks-id-pause) - [Resume a paused endpoint](/developers/account/reference/webhooks/post-webhooks-id-resume) - [An endpoint’s delivery log](/developers/account/reference/webhooks/get-webhooks-id-deliveries) - [Send a delivered or failed event again](/developers/account/reference/webhooks/post-webhook-deliveries-id-replay) - Suppression - [Blocked caller numbers](/developers/account/reference/suppression/get-suppression) - [Block caller numbers, for the account or one campaign](/developers/account/reference/suppression/post-suppression) - [Is a number blocked?](/developers/account/reference/suppression/get-suppression-check) - [Unblock a number](/developers/account/reference/suppression/delete-suppression-id) - Lead orders - [List lead orders](/developers/account/reference/lead-orders/get-lead-orders): Every buyer’s prepaid lead orders, newest first: buyer, campaign, tier, quantity, how many are filled, price and status. Test orders are left out unless `includeTest=true`. - [Place a lead order for one of your buyers](/developers/account/reference/lead-orders/post-lead-orders): The same as placing an order on the Lead orders screen: a quantity of leads on a campaign’s tier at the tier’s price, for a buyer that takes form leads. `payment: manual_paid` records the payment as taken by hand and opens the order at once; `pending` leaves it pending payment. Send an Idempotency-Key: a retry places one order. - [Get a lead order](/developers/account/reference/lead-orders/get-lead-orders-id) - [Change a lead order’s terms](/developers/account/reference/lead-orders/patch-lead-orders-id): States, quantity (never below what is filled), daily cap, pace, run length and notes of an open order, with the reason its history keeps. The price per lead is the tier’s at the time of the order and does not change here. - [Pause, resume, hold, release, cancel or mark a lead order paid](/developers/account/reference/lead-orders/post-lead-orders-id-actions): The order actions of the Lead orders screen. A reason is required to pause, hold or cancel. Cancelling a paid order with leads still owed refunds them the way they were paid, and `mark_paid` records the full price as paid by hand; both move money, so send an Idempotency-Key. - Lead wallets - [List buyers’ lead wallets](/developers/account/reference/lead-wallets/get-lead-wallets): Each buyer that takes form leads, with the cash and credit its lead-order wallet holds. Paged by buyer. - [Get a buyer’s lead wallet](/developers/account/reference/lead-wallets/get-buyers-buyerId-lead-wallet) - [A buyer’s wallet ledger, newest first](/developers/account/reference/lead-wallets/get-buyers-buyerId-lead-wallet-entries) - [Add cash or credit to a buyer’s wallet, or take it back](/developers/account/reference/lead-wallets/post-buyers-buyerId-lead-wallet-entries): The same as adding to a wallet on the Lead payments screen: cash received outside the platform, or credit, positive or negative (never below zero), with the reason the ledger keeps. Send an Idempotency-Key: a retry adds one entry. - Lead payments - [List lead payments](/developers/account/reference/lead-payments/get-lead-payments): Card payments for lead orders and wallet top-ups, newest first. A payment recorded by hand shows on the order itself (`paymentMethod: manual`). - Partner keys - [The Buyer API and Publisher API keys of the account’s parties (never their secrets)](/developers/account/reference/partner-keys/get-partner-keys) - [Issue a key for one of the account’s buyers or publishers; the key is answered once](/developers/account/reference/partner-keys/post-partner-keys) - [Roll a partner key: a new secret, the old one working for the chosen overlap](/developers/account/reference/partner-keys/post-partner-keys-id-roll) - [Revoke a partner key; it stops working at once](/developers/account/reference/partner-keys/post-partner-keys-id-revoke) - Portal sessions - [A short-lived token for one buyer or publisher, for your own web page to use](/developers/account/reference/portal-sessions/post-portal-sessions): Needs buyers:read (or publishers:read) on the key, and :write for read_write. The token works only on that party’s Buyer or Publisher API, only from the origins named, for at most 15 minutes. - [End a portal session at once](/developers/account/reference/portal-sessions/delete-portal-sessions-id) - Publisher API: For publishers under an account - [Publisher API](/developers/publisher): For a publisher sending traffic under a TRAKI account. See your own calls, leads, numbers and earnings. - [Quickstart](/developers/publisher/quickstart): Get a Publisher API key and a real answer from the API in five minutes. - **Concepts** - [Authentication and keys](/developers/publisher/concepts/authentication): How to send your key, what the key format means, and how to roll a key. - [Scopes](/developers/publisher/concepts/scopes): What each scope lets a key read or change. - [Errors](/developers/publisher/concepts/errors): The shape of every error answer, and how to handle it. - [Paging](/developers/publisher/concepts/paging): Reading lists a page at a time, and keeping a copy in step with updatedSince. - [Rate limits](/developers/publisher/concepts/rate-limits): How many requests a key may send, and the headers that say where you stand. - [Safe retries](/developers/publisher/concepts/retries): Sending a change again without making it twice, with Idempotency-Key. - [Versions](/developers/publisher/concepts/versions): The /v1 address, the Traki-Version header and the compatibility promise. - [Test mode](/developers/publisher/concepts/test-mode): Test keys, the test copy of the account and the request tester. - [Webhooks](/developers/publisher/concepts/webhooks): Receiving events, and verifying each delivery in Node, Python and PHP. - [Security and responsibilities](/developers/publisher/concepts/responsibilities): What TRAKI guarantees, and what you are responsible for. - **Guides** - [Send a ping](/developers/publisher/guides/send-a-ping): Ask for a price before you send a call, and reserve the number to send it to. - [Post a lead](/developers/publisher/guides/post-a-lead): Send a form lead to a campaign, and know at once whether it was accepted. - [Reconcile your earnings](/developers/publisher/guides/reconcile-earnings): Match the calls and leads you sent with what you are paid. - **Reference** - [All routes](/developers/publisher/reference): Every route of the Publisher API, with the scope it needs. Each links to its own page. - Keys - [The key making this request](/developers/publisher/reference/keys/get-key): Answers the Publisher API key's own details and the account it is locked to. Needs no scope. - Profile - [Your profile and status](/developers/publisher/reference/profile/get-profile) - Campaigns - [The campaigns you may send to, with your payout terms](/developers/publisher/reference/campaigns/get-campaigns) - Calls - [Your calls, masked as in your portal](/developers/publisher/reference/calls/get-calls) - [One of your calls](/developers/publisher/reference/calls/get-calls-id) - Leads - [The leads you sent: accepted or rejected, and why](/developers/publisher/reference/leads/get-leads) - Numbers - [The tracking numbers assigned to you, with their recent calls](/developers/publisher/reference/numbers/get-numbers) - Earnings - [Your earnings by day and campaign, and your balance](/developers/publisher/reference/earnings/get-earnings) - [Your payouts and the statements they pay](/developers/publisher/reference/earnings/get-earnings-payouts) - Reports - [Call totals over your own traffic, grouped by day or campaign](/developers/publisher/reference/reports/get-reports-calls): A start and an end, at most a year apart. - [Lead totals over your own traffic, grouped by day or campaign](/developers/publisher/reference/reports/get-reports-leads): A start and an end, at most a year apart. - Postbacks - [Your webhook endpoints](/developers/publisher/reference/postbacks/get-webhooks) - [Subscribe one of your URLs to events about your own traffic](/developers/publisher/reference/postbacks/post-webhooks): The signing secret is answered once, here. The URL must be a public https:// address. - [Change a webhook’s URL or events, or pause and resume it](/developers/publisher/reference/postbacks/patch-webhooks-id) - [Remove a webhook](/developers/publisher/reference/postbacks/delete-webhooks-id) - [What one of your webhooks was sent, and how each delivery went](/developers/publisher/reference/postbacks/get-webhooks-id-deliveries) - Buyer API: For buyers under an account - [Buyer API](/developers/buyer): For a buyer under a TRAKI account. See what you bought and manage your own buying. - [Quickstart](/developers/buyer/quickstart): Get a Buyer API key and a real answer from the API in five minutes. - **Concepts** - [Authentication and keys](/developers/buyer/concepts/authentication): How to send your key, what the key format means, and how to roll a key. - [Scopes](/developers/buyer/concepts/scopes): What each scope lets a key read or change. - [Errors](/developers/buyer/concepts/errors): The shape of every error answer, and how to handle it. - [Paging](/developers/buyer/concepts/paging): Reading lists a page at a time, and keeping a copy in step with updatedSince. - [Rate limits](/developers/buyer/concepts/rate-limits): How many requests a key may send, and the headers that say where you stand. - [Safe retries](/developers/buyer/concepts/retries): Sending a change again without making it twice, with Idempotency-Key. - [Versions](/developers/buyer/concepts/versions): The /v1 address, the Traki-Version header and the compatibility promise. - [Test mode](/developers/buyer/concepts/test-mode): Test keys, the test copy of the account and the request tester. - [Webhooks](/developers/buyer/concepts/webhooks): Receiving events, and verifying each delivery in Node, Python and PHP. - [Security and responsibilities](/developers/buyer/concepts/responsibilities): What TRAKI guarantees, and what you are responsible for. - **Guides** - [Pull the leads you bought](/developers/buyer/guides/pull-leads): Read every lead you bought into your own system, oldest first, without missing one. - [Push a bid or budget](/developers/buyer/guides/push-a-bid): Change your bid, lead rate, budget, caps or hours from your own system, and know whether it applied. - [Ask for a return](/developers/buyer/guides/ask-for-a-return): Ask the account to return a lead or a call, and follow the request until it is decided. - **Reference** - [All routes](/developers/buyer/reference): Every route of the Buyer API, with the scope it needs. Each links to its own page. - Keys - [The key making this request](/developers/buyer/reference/keys/get-key): Answers the Buyer API key's own details and the account it is locked to. Needs no scope. - Profile - [Your profile, status and what the account lets you change](/developers/buyer/reference/profile/get-profile) - Campaigns - [The campaigns you buy on, with your price, caps and hours](/developers/buyer/reference/campaigns/get-campaigns) - Bids and budgets - [Your current bids, lead rates, budget, caps and hours](/developers/buyer/reference/bids-and-budgets/get-bids) - [Change a bid, lead rate, budget or hours, or pause and resume](/developers/buyer/reference/bids-and-budgets/post-bids): A change inside what the account lets you change applies at once (`applied`); anything else waits for the account (`pendingApproval`). A bid above the campaign ceiling always waits. Send `ifVersion` to refuse a change based on an older value (409). - Leads - [The leads you bought, oldest first, as a feed](/developers/buyer/reference/leads/get-leads): Page with `cursor` (the `nextCursor` of the previous page) while `hasMore` is true; then poll with the last `nextCursor` to receive new leads. Contact details, answers, prices and consent proof follow what the account shares, as in your portal. - [Report your outcome on a lead you bought](/developers/buyer/reference/leads/post-leads-id-outcome): Set the outcome stage (its key) and, on a won stage, the value; `null` clears it. The same as the outcome on the lead in your portal. - Orders - [Your lead orders, newest first](/developers/buyer/reference/orders/get-orders): Each order with its campaign, tier, quantity, how many are filled, price and status. Empty when the account has not opened form leads or lead orders to you. - [Order leads](/developers/buyer/reference/orders/post-orders): The same as ordering from Offers in your portal: the account must allow you to order, the tier must be listed, and when the account has order terms you accept them by sending their version id as `acceptTermsVersionId`. The order is paid from your wallet (credit, then cash, in the account’s order), by card, or both; when a card is due the answer carries the payment to complete. Send an Idempotency-Key: a retry places one order. - [One of your lead orders](/developers/buyer/reference/orders/get-orders-id) - [The leads delivered on one of your orders, newest first](/developers/buyer/reference/orders/get-orders-id-fills): The full lead records come from `GET /leads`; these name which order each filled. - [Pause or resume one of your orders](/developers/buyer/reference/orders/post-orders-id-actions): Only where the account lets you pause your own orders. - [Change an open order’s states, daily cap or run length](/developers/buyer/reference/orders/post-orders-id-change): Applied at once, or sent to the account for approval, as your access to orders allows. The quantity does not change here: more leads is a new order. - [Cancel an open order](/developers/buyer/reference/orders/post-orders-id-cancel): The leads still owed are refunded the way they were paid. Applied at once, or sent to the account for approval, as your access to orders allows. Send an Idempotency-Key: it moves money. - [Your wallet for lead orders: cash and credit](/developers/buyer/reference/orders/get-wallet) - [Your wallet’s ledger, newest first](/developers/buyer/reference/orders/get-wallet-entries) - Calls - [The calls you bought](/developers/buyer/reference/calls/get-calls) - [One of your calls](/developers/buyer/reference/calls/get-calls-id) - Returns and disputes - [Your lead returns or call disputes, and where each stands](/developers/buyer/reference/returns-and-disputes/get-returns) - [Ask for a lead return, or raise a dispute on a call](/developers/buyer/reference/returns-and-disputes/post-returns): A lead return must fall inside the campaign’s return window; one request per lead and per call is open at a time. The account decides in its inbox. - Billing - [Your balance and what is open on your statements](/developers/buyer/reference/billing/get-billing) - [Every movement of your balance, newest first](/developers/buyer/reference/billing/get-billing-ledger) - [Your statements (invoices), newest first](/developers/buyer/reference/billing/get-billing-statements) - Destinations - [Where your calls ring, in ring order](/developers/buyer/reference/destinations/get-destinations) - [Change a destination’s number, or switch it between active and standby](/developers/buyer/reference/destinations/patch-destinations-id): Applies at once when the account lets you edit destinations (`applied`), or becomes a request it approves (`pendingApproval`). A destination the account locked cannot be changed. - Webhooks - [Your webhook endpoints](/developers/buyer/reference/webhooks/get-webhooks) - [Subscribe one of your URLs to events about your own traffic](/developers/buyer/reference/webhooks/post-webhooks): The signing secret is answered once, here. The URL must be a public https:// address. - [Change a webhook’s URL or events, or pause and resume it](/developers/buyer/reference/webhooks/patch-webhooks-id) - [Remove a webhook](/developers/buyer/reference/webhooks/delete-webhooks-id) - [What one of your webhooks was sent, and how each delivery went](/developers/buyer/reference/webhooks/get-webhooks-id-deliveries)