auto_write
ads

Connect a platform's server-side tracking (Conversions API), exactly as its form on Tracking → Connections does: Meta (p

Changed on

Connect a platform's server-side tracking (Conversions API), exactly as its form on Tracking → Connections does: Meta (pixel_id, test_event_code, dataset_id), TikTok Events API (pixel_code), Pinterest (ad_account_id) or Reddit (ad_account_id), plus the access_token the platform issued. Name only the fields to change: a field given is saved (null clears it), a field left out is kept; Meta's pixel_id and dataset_id are digits only. access_token is write-only: it goes to Magistry's vault, is never stored in the conversation and is never returned (the connection read answers token_set). It executes at once for the merchant's own assistant or key; a connection acting under a write grant, or one the merchant put behind an extra approval layer, is refused and the merchant sets the token in Magistry. Turning sending on is separate: Meta's starts after a test event, on the Connections page.

post/api/v1/tools/tracking_capi_connection_set

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopesads:write

Headers

Idempotency-Key, string

Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
platform, 'meta' | 'tiktok' | 'pinterest' | 'reddit' required
pixel_id, string nullable

Meta: the pixel id (digits only).

test_event_code, string nullable

Meta: the Test Events code from Events Manager.

dataset_id, string nullable

Meta: the dataset id, when it differs from the pixel id (digits only).

pixel_code, string nullable

TikTok: the pixel code.

ad_account_id, string nullable

Pinterest or Reddit: the ad account id.

access_token, string

The platform's Conversions API access token. Never stored in the conversation or returned.

idempotency_key, string required

Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Tool result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision