Skip to content
adscapi

Douyin CAPI Payload Preview

The server-side request adscapi builds when you track() a purchase and Douyin is configured. Secrets and hashed values show as placeholders.

Request

POST
Endpoint
https://analytics.oceanengine.com/api/v2/conversion
Headers
Content-Type: application/json; charset=utf-8
Body (purchase example)
{
  "event_type": "active_pay",
  "context": {
    "ad": {
      "callback": "clickid-example-123"
    }
  },
  "timestamp": 1739452800000,
  "properties": {
    "value": 49.99,
    "currency": "USD",
    "order_id": "order_1001"
  }
}

Verified against the library dispatcher (src/dispatchers/douyin.ts). See the Douyin setup guide for where to get each secret.

Required secrets

DOUYIN_ENABLED

Douyin activates when every secret is present. One missing key and the platform no-ops — the rest still receive the event.

Event-name mapping

Canonical eventDouyin receives
page_viewpage_view
leadform
signup_startsignup_start (custom event passthrough)
signupactive_register
checkout_createdaction_pay
purchaseactive_pay
reply_generatedreply_generated (custom event passthrough)
upgrade_clickedupgrade_clicked (custom event passthrough)

Good to know

  • No credential on the request: the per-click callback token in context.ad.callback is the whole identity. DOUYIN_ENABLED is only an opt-in switch, not a secret sent anywhere.
  • timestamp is UNIX epoch milliseconds, not seconds.
  • No hashed PII. The dispatcher no-ops without clickIds.clickid or without adPersonalization consent.
  • Sending an event_type outside Ocean Engine's enum (e.g. a raw unmapped canonical name) is rejected with API error 102.

Frequently Asked Questions

Related Tools

Discover more free tools to fix your tracking

Event Payload Playground

Pick a canonical conversion event, fill the fields, and see the exact JSON payload adscapi builds — before you write a line of code.

Try it now

PII Hash Previewer

Type a raw email or phone number and see the normalized value plus its SHA-256 hash — the exact rules adscapi applies per platform. Nothing leaves the browser.

Try it now

Platform Coverage Explorer

Search all 26 ad platforms adscapi dispatches to — support level, required secrets, and setup docs, always in sync with the library registry.

Try it now

Ready to track Douyin conversions server-side?

adscapi is free and open source. Set your platform tokens, call track() once, and every configured Conversions API receives the event — hashed the way each platform expects.