TEASEDocs

Webhooks & CAPI

Forward conversions to Meta and TikTok server-side with per-smart-link Conversions API pixels.

Browser pixels lose events to ad blockers, iOS privacy, and cookie expiry — and they fire on the click, not on the money. TEASE closes that gap with server-side conversion forwarding: attach a Conversions API (CAPI) pixel to any smart link and TEASE sends the real downstream event — a subscribe, a purchase, a lead — straight to Meta or TikTok from our servers, so your ad platform optimizes on revenue instead of guesses.

There is nothing to host and no client SDK to embed. You configure a pixel once per smart link; conversions flow automatically as fans convert.

What this page covers

Today's supported integration is outbound, server-side conversion forwarding to Meta and TikTok via per-smart-link pixels. Subscribable outbound webhooks (HTTP callbacks to your own endpoint) are on the roadmap.

How it works

When a fan you sent through a smart link later converts, TEASE maps that conversion to a standard ad-platform event and forwards it to every active pixel attached to the link:

Attach a pixel. Configure a Meta or TikTok pixel on a smart link with its pixel_id and a write-only access_token.

Fans convert. A fan subscribes, rebills, tips, buys a PPV, or starts a conversation.

TEASE forwards the event. The conversion is mapped to a platform event (e.g. Subscribe, Purchase) and sent server-side to the platform's Conversions API, with all personally identifiable fields SHA-256 hashed.

Your ad platform optimizes. Meta/TikTok receive a real, revenue-backed conversion and feed it into bidding and attribution.

Forwarding is automatic once a pixel is active. You never call a "send event" endpoint — TEASE owns delivery end-to-end. The only API surface you manage is the pixel configuration below.

Conversion → event mapping

TEASE translates each conversion into the closest standard event for each platform. The defaults are:

ConversionMeta eventTikTok event
new_subscriberSubscribeSubscribe
new_transactionPurchaseCompletePayment
message_receivedLeadLead
fan_sent_3_messagesLeadLead

You can override or extend this mapping per pixel with event_map_json — a JSON object whose keys are conversion types and whose values are the platform event name to emit. Your overrides are merged on top of the defaults, so you only need to specify what you want to change. A conversion type that maps to nothing is simply not forwarded.

{
  "new_transaction": "Purchase",
  "fan_sent_3_messages": "Contact"
}

PII is hashed, always

Any identifying field included with a conversion (such as email, phone, or country) is normalized and SHA-256 hashed before it leaves TEASE, per the Meta and TikTok CAPI standards. Raw identifiers are never transmitted in clear text. This is the same hashing the platforms require from any compliant server-side integration.

Pixel configuration API

Pixels are managed per smart link. You need a smart link's provider_id (see Smart Links) and a write-scoped API key.

MethodPathPurpose
GET/api/admin/smart-links/{provider_id}/pixelsList pixels on a smart link
PUT/api/admin/smart-links/{provider_id}/pixelsCreate or update a pixel
DELETE/api/admin/smart-links/{provider_id}/pixels/{platform}Remove a pixel

A smart link holds at most one pixel per platform — one meta and one tiktok. PUT is an upsert keyed on (provider_id, platform): the first call creates the pixel, later calls update it.

Fields

FieldTypeRequiredDescription
platformstringyesmeta or tiktok.
pixel_idstringyesYour pixel / dataset ID. Alphanumerics, underscores, and hyphens only; 1 to 64 characters.
access_tokenstringsee noteWrite-only. Required when creating a pixel. On update, a blank value keeps the existing token.
event_map_jsonstringnoJSON string overriding the default conversion-to-event mapping. Merged on top of the defaults.
activebooleannoWhether the pixel forwards conversions. Defaults to true on create.

access_token is write-only

The access_token is never returned by any endpoint. List and upsert responses expose only has_token (a boolean) so you can confirm a token is set without reading it back. On update, omitting or sending a blank access_token keeps the stored token — a blank value can never accidentally wipe a working token. To rotate, send a new non-empty token.

Create or update a pixel

curl -X PUT https://app.tease.link/api/admin/smart-links/lnk_8fq2/pixels \
  -H "Authorization: Bearer $TEASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "platform": "meta",
    "pixel_id": "987654321098765",
    "access_token": "EAAB...your-system-user-token",
    "event_map_json": "{\"new_transaction\":\"Purchase\"}",
    "active": true
  }'
const res = await fetch(
  'https://app.tease.link/api/admin/smart-links/lnk_8fq2/pixels',
  {
    method: 'PUT',
    headers: {
      Authorization: `Bearer ${process.env.TEASE_API_KEY}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      platform: 'meta',
      pixel_id: '987654321098765',
      access_token: 'EAAB...your-system-user-token',
      event_map_json: JSON.stringify({ new_transaction: 'Purchase' }),
      active: true,
    }),
  },
);
const pixel = await res.json();
import os, json, requests

res = requests.put(
    "https://app.tease.link/api/admin/smart-links/lnk_8fq2/pixels",
    headers={"Authorization": f"Bearer {os.environ['TEASE_API_KEY']}"},
    json={
        "platform": "meta",
        "pixel_id": "987654321098765",
        "access_token": "EAAB...your-system-user-token",
        "event_map_json": json.dumps({"new_transaction": "Purchase"}),
        "active": True,
    },
)
pixel = res.json()

The response is the saved pixel, without the token:

{
  "platform": "meta",
  "pixel_id": "987654321098765",
  "active": true,
  "event_map_json": "{\"new_transaction\":\"Purchase\"}",
  "has_token": true,
  "updated_at": 1751280000
}
FieldTypeDescription
platformstringmeta or tiktok.
pixel_idstringThe configured pixel / dataset ID.
activebooleanWhether the pixel is forwarding conversions.
event_map_jsonstringThe effective override map (empty string if none set).
has_tokenbooleantrue when an access token is stored. The token itself is never returned.
updated_atintegerUnix timestamp of the last change.

List pixels

curl https://app.tease.link/api/admin/smart-links/lnk_8fq2/pixels \
  -H "Authorization: Bearer $TEASE_API_KEY"
{
  "items": [
    {
      "platform": "meta",
      "pixel_id": "987654321098765",
      "active": true,
      "event_map_json": "",
      "has_token": true,
      "updated_at": 1751280000
    }
  ]
}

Delete a pixel

Remove a pixel by platform. Forwarding to that platform stops immediately.

curl -X DELETE https://app.tease.link/api/admin/smart-links/lnk_8fq2/pixels/meta \
  -H "Authorization: Bearer $TEASE_API_KEY"

To pause forwarding without losing the configuration, set active: false with a PUT instead of deleting. The pixel_id and stored token are kept, and you can re-enable later by sending active: true (no need to re-enter the token).

Errors

StatusCodeWhen
400invalid_platformplatform is not meta or tiktok.
400invalid_pixel_idpixel_id contains disallowed characters or is over 64 chars.
400token_requiredCreating a new pixel without an access_token.
404smart_link_not_foundNo smart link with that provider_id exists under your account.

Per-platform setup

Meta setup

Find your Pixel / Dataset ID. In Meta Events Manager, open your dataset; the numeric ID at the top is your pixel_id.

Generate a Conversions API access token. In the dataset's Settings → Conversions API, generate an access token. Use a System User token with ads_management for a long-lived credential. This is your access_token.

Attach the pixel. PUT the pixel with platform: "meta", your pixel_id, and the access_token. Leave event_map_json empty to use the defaults (Subscribe / Purchase / Lead).

Verify in Events Manager. As conversions arrive, server events appear in the dataset's Test events / overview with a Server origin. Allow a short delay for the first events to surface.

Deduplication

If you also run a browser pixel, Meta deduplicates browser and server events. TEASE sends server-side events with hashed user data; keep your browser pixel's event names aligned with the mapping above so the platform can match them.

TikTok setup

Find your Pixel ID. In TikTok Events Manager, open your web event set; the Pixel ID is your pixel_id.

Generate an Events API access token. In the event set's settings, create an Events API 2.0 access token. This is your access_token.

Attach the pixel. PUT the pixel with platform: "tiktok", your pixel_id, and the access_token. The defaults map subscriptions to Subscribe and transactions to CompletePayment.

Verify in Events Manager. Confirm incoming server events in the event set's activity view. Override event_map_json if your campaign optimizes on a different standard event.

FAQ

Roadmap: subscribable webhooks

Coming soon

Today the webhook surface is outbound CAPI forwarding to Meta and TikTok only. A subscribable webhook product — where TEASE posts conversion and account events to an HTTPS endpoint you control, with a signed payload, an event catalog, and delivery retries — is on the roadmap. If you need event delivery to your own backend, reach out and we will flag your account for early access.

Next steps

On this page