Skip to content

Reference

Integrations

Server-side conversions to Meta and GA4.

View as Markdown

Every operation below is also in the OpenAPI document. One that names an MCP tool can be called through the MCP server; one that names none cannot.

Meta and GA4 settings#

GET /v1/integrations

Operation id listIntegrations. MCP tool list_integrations. SDK tickets.integrations.list.

The Meta and GA4 conversion integrations that are set up, with whether each is on, its ids, and secret_set. A token is never shown, to any key or person. problem is given while sending is paused: the platform refused the token or cannot use the settings, or the saved token cannot be read.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has integrations.manage (owner, admin).

Answers 200. The integrations set up.

Fields

FieldTypeDescription
object *"list"
data *array of IntegrationThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *"/v1/integrations"The path this list came from (/v1/integrations).

* required

Set up Meta or GA4#

PUT /v1/integrations/{kind}

Operation id upsertIntegration. MCP tool upsert_integration. SDK tickets.integrations.save.

Sets up, or changes, Meta (pixel_id, access_token, test_event_code) or GA4 (measurement_id, api_secret) for server-side purchases. kind is meta or ga4. The first save needs the id and the secret; later saves change only what you send. The secret is sealed and never shown again, and a new one (or, unless the token cannot be read, a new id) lifts a pause and sends what it held back. Any save lifts a setup_rejected pause. We choose the hosts we call: you cannot. The first save leaves it off until enabled is true, so a test can come first. An order is sent when its buyer said yes to ad tracking, or said nothing and send_when_consent_unknown is on (it is off until you turn it on); never when they said no, and never for an order with no attribution or a door, dashboard or guest-list sale. Changing the pixel or measurement id emails the owners. Owner or admin, or a full key.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has integrations.manage (owner, admin).

ParameterInTypeDescription
kind *pathIntegrationKindmeta: the Conversions API; ga4: the Measurement Protocol.

Request body (UpsertIntegrationInput)

FieldTypeDescription
enabledboolean
pixel_idstring
access_tokenstringMeta: written, never read back.
test_event_codestring | null
measurement_idstring
api_secretstringGA4: written, never read back.
send_when_consent_unknownboolean
JSON
{
  "enabled": true,
  "measurement_id": "G-ABC123XYZ",
  "api_secret": "EXAMPLEapisecret"
}

Answers 200. Saved (secrets are never shown again).

Fields (Integration)

FieldTypeDescription
object *"integration"
id *stringAn id starting with int_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
kind *IntegrationKindmeta: the Conversions API; ga4: the Measurement Protocol.
enabled *booleanWhether real purchases go. Off until someone turns it on, so a test can come first.
pixel_id *string | nullMeta.
test_event_code *string | nullMeta: only the test purchase uses it. Real purchases go to the real pixel.
measurement_id *string | nullGA4 (G-…).
secret_set *booleanThe access token (Meta) or API secret (GA4) is stored. It is never returned.
send_when_consent_unknown *booleanSend for an order whose ad consent is unknown (default false; turning it on is audited). Denied is never sent, and neither is an order with no attribution or a door, dashboard or guest-list sale, whatever this says.
problemobjectGiven only while sending is paused: token_rejected (the platform refused the token), setup_rejected (it can't use the id or the token together), token_unreadable (we can't open the saved token). Nothing is sent, and no…
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
updated_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Send a test conversion#

POST /v1/integrations/{kind}/test

Operation id testIntegration. MCP tool test_integration. SDK tickets.integrations.test.

Sends one test purchase and records it in the log. Meta: to your Test Events tab, with the saved test_event_code (refused without one, so a test never reaches your real pixel). GA4: to Google's validation endpoint, which keeps it out of reports and does not check your API secret. Leave order out to send a made-up sale; name a test-mode order to send that one. A few a minute.

Who may call it. Any one of: An API key with scope full. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has integrations.manage (owner, admin).

ParameterInTypeDescription
kind *pathIntegrationKindmeta: the Conversions API; ga4: the Measurement Protocol.

Request body (TestIntegrationInput)

FieldTypeDescription
orderstringA test-mode order to send (default: a made-up one).
JSON
{}

Answers 201. Sent with Meta's test_event_code or to GA4's debug endpoint.

Fields (ConversionDelivery)

FieldTypeDescription
object *"conversion_delivery"
id *stringAn id starting with cvd_.
mode *Modetest or live, decided by the key (rt_test_… or rt_live_…). Test and live data never mix.
integration *IntegrationKindmeta: the Conversions API; ga4: the Measurement Protocol.
order *string | nullAn id starting with ord_.
event_name *"Purchase" | "Refund"
event_id *stringThe order's tracking_event_id.
status *"pending" | "retrying" | "sent" | "failed" | "skipped"pending (its first try is queued), retrying (a try failed, another is booked: next_attempt_at), sent, failed (it did not arrive: every retry was used, or sending is paused, and a paused one goes again after a save), ski…
skip_reason *"ad_consent_denied" | "ad_consent_unknown" | "comp" | "test_mode" | "disabled" | "no_client_id" | "refunded" | nullad_consent_denied; ad_consent_unknown (nobody was asked: consent unknown with the switch off, no attribution, or a door, dashboard or guest-list sale); comp (a free order is no purchase); test_mode (a test order to a li…
test *boolean
attempts *integer
next_attempt_at *string | nullWhile retrying: the next try.
response_status *integer | null
error *string | null
created_at *string (date-time)An instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.
sent_at *string | nullAn instant in ISO 8601 with its zone, e.g. 2027-07-17T20:00:00Z. Answers are always UTC.

* required

Errors of its own. feature_disabled. The errors every operation can answer are on the errors page.

The conversion delivery log#

GET /v1/integrations/{kind}/deliveries

Operation id listConversionDeliveries. MCP tool list_conversion_deliveries. SDK tickets.integrations.deliveries.

The log of purchases and refunds sent to one platform, newest first: status (pending, retrying, sent, failed, skipped), the reason when skipped, the attempts and the platform's answer. Never a buyer's details. Filter by one of order, status or skip_reason. Page forward with starting_after.

Who may call it. Any one of: An API key with scope full, read. Any other scope answers insufficient_scope; A signed-in dashboard member whose role has integrations.manage (owner, admin).

ParameterInTypeDescription
kind *pathIntegrationKindmeta: the Conversions API; ga4: the Measurement Protocol.
limitqueryintegerHow many to return, 1 to 100 (default 20).
starting_afterquerystringAn id from the page before: the page after it.
ending_beforequerystringAn id from the page after: the page before it. A list read from the database offers it as the list comes and filtered by event alone, in the default order, and answers parameter_invalid to any other…
orderquerystringAn id starting with ord_.
statusquery"pending" | "retrying" | "sent" | "failed" | "skipped"
skip_reasonquery"ad_consent_denied" | "ad_consent_unknown" | "comp" | "test_mode" | "disabled" | "no_client_id" | "refunded"

Answers 200. A page of deliveries.

Fields

FieldTypeDescription
object *"list"
data *array of ConversionDeliveryThis page, newest first.
has_more *booleanTrue when there is another page: pass the last id as starting_after.
url *stringThe path this list came from (/v1/integrations/{kind}/deliveries).

* required