Documentation sections

Admin API: conversions and postback

Admin API methods for conversion types, importing conversions from CSV and working with the event delivery queue: list, search and resend.

The API offers the same actions as the panel: conversion types, importing conversions from CSV and the event delivery log. Authorization is described on the Admin API: overview and authorization page, and the request, response and error format on the Request, response and error format page.

Methods in this group

Method and addressPurposeToken scope
GET /api/v1/conversion-typesList conversion typesfull or reports:read
POST /api/v1/conversion-typesCreate a typefull
PUT /api/v1/conversion-types/{id}Edit a typefull
DELETE /api/v1/conversion-types/{id}Delete a typefull
POST /api/v1/conversion-import/previewCheck a CSVfull
POST /api/v1/conversion-import/applyImport a CSVfull
GET /api/v1/deliveriesThe last 200 delivery tasksfull
GET /api/v1/deliveries/searchSearch delivery tasksfull
POST /api/v1/deliveries/{id}/retryRetry a deliveryfull

If {id} in the address is not a UUID, the response is 400 with the bad_request code. With an inactive license, all methods in the group respond with 402 — see Expired license.

A campaign's log of accepted conversions is returned by GET /api/v1/campaigns/{id}/conversions — see Admin API: campaigns.

Receiving postbacks and leads

The /api/v1/postback, /api/v1/lead and /api/v1/lead-file addresses accept data without a token; they do not need the Api-Key header. Postback parameters, statuses, payout, txid and the source secret are described on the Incoming postback page, repeats and corrections on the Transaction ID, duplicates and corrections page, and receiving data from forms on the Receiving leads from forms page.

Conversion types

A type maps the status value from an affiliate network's postback to a tracker status. The mapping rules are on the Conversion types page.

Type object:

FieldTypeDescription
idstring, UUIDType ID
namestringName
statusstringThe status the tracker records: lead, sale, rejected or hold
paramsstringComma-separated status values from the network, for example deposit,ftd
count_convbooleanCount in report conversions
count_revenuebooleanCount the payout in revenue
send_postbackbooleanSend outgoing S2S postbacks for such conversions
colorstringColor

List types

http
GET /api/v1/conversion-types

Returns all of the team's types in order of creation. Token scope: full or reports:read. No parameters.

Response — code 200 and an array of type objects. If there are no types, an empty array [].

Create a type

http
POST /api/v1/conversion-types

Creates a conversion type. Token scope: full.

FieldTypeRequiredDescription
namestringyesName
statusstringnolead, sale, rejected or hold. Default lead
paramsstringnoComma-separated status values from the network. A type without values matches nothing
count_convbooleannoDefault true
count_revenuebooleannoDefault true
send_postbackbooleannoDefault false. Pass true to send postbacks to the source
colorstringnoDefault is an empty string

Response — code 201 and the created type object.

bash
curl -X POST https://panel.example.com/api/v1/conversion-types \
  -H "Api-Key: <token>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Deposit","status":"sale","params":"deposit,ftd","send_postback":true}'

Errors: 422, code validation, message name is required — there is no name field or the body is not a JSON object.

Edit a type

http
PUT /api/v1/conversion-types/{id}

Replaces the type's settings. Token scope: full.

The body fields are the same as on creation; name is required. Pass the whole object:

  • omitted count_conv, count_revenue and send_postback become false;
  • omitted params and color become an empty string;
  • an omitted or empty status does not change.

Response — code 200 and the type object after the change.

Errors:

CodecodeWhen
404not_foundThere is no type with this ID
422validationThere is no name field or the body is not a JSON object

Delete a type

http
DELETE /api/v1/conversion-types/{id}

Deletes a type. Token scope: full. No request body.

Response — code 204 with no body. If there is no type with this ID — 404, code not_found. What happens to already accepted conversions is described in the Deleting and changing section.

Importing conversions from CSV

The import takes two requests: the check returns a token, and the import accepts the same data together with this token. The file format and the rules for each column are on the Conversion import from CSV page.

Body of both requests:

FieldTypeRequiredDescription
csvstringyesCSV text with the sub_id,payout,tid,status header. Up to 256 KB and up to 200 data rows
currencystringnoCurrency of the amounts in the file, three Latin letters. Default USD
notifybooleannotrue — send outgoing S2S and CAPI for the imported conversions. Default false
tokenstringimport onlyThe token value from the check response

Response of both requests — code 200:

FieldTypeDescription
rowsarrayOne object per file row
rows[].linenumberRow number in the file. The header is row 1
rows[].click_id, rows[].payout, rows[].statusstringValues of the sub_id, payout and status columns. The status is in lower case
rows[].tidstringTransaction ID. For an empty column — import: and the sub_id value
rows[].errorstringThe reason the row was not accepted. The field is absent if there is no error
rows[].resultstringThe row's import result. Present only in the import response
validbooleantrue — all rows passed the check
tokenstringFilled only in the check response with valid: true, otherwise an empty string
appliedbooleantrue — the import was performed
notifybooleanThe notify value from the request

Check a CSV

http
POST /api/v1/conversion-import/preview

Checks the file and writes nothing. Token scope: full.

If valid is false, fix the rows with the error field and repeat the check. Row error messages are covered in the If something went wrong section.

bash
curl -X POST https://panel.example.com/api/v1/conversion-import/preview \
  -H "Api-Key: <token>" \
  -H "Content-Type: application/json" \
  -d '{"csv":"sub_id,payout,tid,status\n1a2b3c4d5e6f,25.5,order-1001,sale\n","currency":"USD","notify":false}'
json
{
  "rows": [
    {"line": 2, "click_id": "1a2b3c4d5e6f", "payout": "25.5", "tid": "order-1001", "status": "sale"}
  ],
  "valid": true,
  "token": "1791021600.9f2c…",
  "applied": false,
  "notify": false
}

Errors:

Codecodemessage
400bad_requestНекорректный запрос (invalid request) — the body is not a JSON object
422validationНекорректная валюта (invalid currency), Файл больше 256 КБ (file larger than 256 KB), Не больше 200 строк за импорт (no more than 200 rows per import), В CSV нет данных (no data in the CSV)
422validationНужен CSV с заголовком sub_id,payout,tid,status (a CSV with the sub_id,payout,tid,status header is required), Нужны ровно 4 колонки: sub_id,payout,tid,status (exactly 4 columns are required: sub_id,payout,tid,status), Заголовок: sub_id,payout,tid,status (header: sub_id,payout,tid,status)
503unavailabletemporary error, retry later — repeat the request later

Import a CSV

http
POST /api/v1/conversion-import/apply

Writes conversions from the checked file. Token scope: full.

Send the same csv, currency and notify as in the check, and add the token. It is valid for 15 minutes and fits only this data and only the user whose API token ran the check. If you changed even one field, check the file again.

Rows are processed by the same rules as an incoming postback. With applied: true, each row has a result:

  • result with the value Принято (точный повтор не создаёт дубль) (accepted; an exact repeat does not create a duplicate) — the conversion was accepted;
  • error with the value Не принято: HTTP <код>. Проверьте журнал postback; строку можно повторить с тем же tid. (not accepted: HTTP code; check the postback log; the row can be repeated with the same tid) — the row was not written; the other rows are not affected.

If valid is false during import, nothing is written: applied is false.

Errors — the same as for the check, plus two more:

Codecodemessage
428preview_requiredСначала выполните предварительную проверку (run the preliminary check first) — there is no token field or it has the wrong form
409preview_expiredДанные изменились или проверка устарела. Повторите проверку. (the data has changed or the check has expired; repeat the check)

Deliveries

A delivery task is writing an accepted conversion to the statistics, an outgoing S2S postback or a Facebook Conversions API event. What the states and results mean and when a retry is safe is described on the Event delivery log page.

Task object:

FieldTypeDescription
idstring, UUIDTask ID
campaign_idstring, UUIDCampaign
click_idstringThe click's subid
kindstringconversion — writing a conversion, s2s — S2S postback, capi — Facebook event
destinationstringS2S recipient: source — the source, campaign — the campaign address, source_and_campaign — the addresses matched, one request. If there is no recipient, the field is absent
statestringpending — waiting, running — being processed, sent — done, failed — needs checking
attemptsnumberHow many times the tracker has run the task
result_codestringThe result of the last attempt, see result values
held_for_licensebooleanSending is held until the license is renewed. Filled only in GET /api/v1/deliveries; always false in the search response
created_at, updated_atstring, RFC 3339 dateCreation time and time of the last change
next_attempt_atstring, RFC 3339 dateTime of the next attempt

Latest deliveries

http
GET /api/v1/deliveries

Returns the team's last 200 tasks, newest first. Token scope: full. No parameters.

Response — code 200 and an array of task objects.

Search deliveries

http
GET /api/v1/deliveries/search

Searches tasks by click, period and filters. Token scope: full.

ParameterTypeRequiredDescription
click_idstringnoThe full click subid: from 1 to 64 characters, Latin letters, digits, _, - and dots (not at the start or end, and not two in a row)
fromstring, RFC 3339 datenoStart of the period by task creation time. Default — 24 hours ago
tostring, RFC 3339 datenoEnd of the period. Default — the current time
campaign_idstring, UUIDnoCampaign
statestringnopending, running, sent or failed
kindstringnoconversion, s2s or capi
destinationstringnosource, campaign or source_and_campaign
limitnumbernoPage size from 1 to 200. Default 100
cursorstringnoThe next_cursor value from the previous response

The period is no longer than 93 days. If click_id is passed without from and to, the search covers all time.

Response — code 200:

FieldTypeDescription
itemsarrayTask objects, newest first
next_cursorstringPass it in cursor to get the next page. An empty string means this is the last page
bash
curl "https://panel.example.com/api/v1/deliveries/search?state=failed&kind=s2s&from=2026-10-01T00:00:00Z&to=2026-10-04T00:00:00Z&limit=50" \
  -H "Api-Key: <token>"
json
{
  "items": [
    {
      "held_for_license": false,
      "id": "0b7e4c19-6a2d-4f85-b3c1-8d9e0f1a2b3c",
      "campaign_id": "c41a9e07-52bd-4f13-8a60-9d7e6f5a4b3c",
      "click_id": "1a2b3c4d5e6f",
      "kind": "s2s",
      "destination": "source",
      "state": "failed",
      "attempts": 1,
      "result_code": "http_404",
      "created_at": "2026-10-03T14:22:05.418332Z",
      "updated_at": "2026-10-03T14:22:06.102778Z",
      "next_attempt_at": "2026-10-03T14:22:05.418332Z"
    }
  ],
  "next_cursor": ""
}

Errors — code 400, code is validation.

Search error messages
  • Некорректный subid (invalid subid) — click_id does not match the format.
  • Некорректное начало периода (invalid period start), Некорректный конец периода (invalid period end) — the date is not in RFC 3339 format.
  • Выберите период до 93 дней (choose a period of up to 93 days) — the period is longer than 93 days or to is earlier than from.
  • Размер страницы: от 1 до 200 (page size: from 1 to 200) — limit is out of range or not a number.
  • Некорректная страница (invalid page) — cursor is not from this method's response.
  • Некорректная кампания (invalid campaign) — campaign_id is not a UUID.
  • Некорректный фильтр (invalid filter) — an unknown state, kind or destination value.

Retry a delivery

http
POST /api/v1/deliveries/{id}/retry

Puts the task back in the queue: state becomes pending, and sending happens immediately and in the same form. Token scope: full. The address contains the task id; there is no request body.

Only a task in the failed state can be retried. Tasks with result_code equal to invalid_url, blocked_address, invalid_payload or invalid_kind are not retried.

Response — code 200:

json
{"ok": true}

Errors: 404, code not_found — there is no task with this ID, it is not in the failed state, or it cannot be retried.

Warning.

If the recipient has already accepted the event, a retry may create a duplicate on its side. Check tasks with result_code equal to unknown_delivery with the recipient first — see Receipt not confirmed.

Updated Need help? ↗