Conversion signals

Conversion APIs match a server-side event back to the person who saw your ad. The more identity you supply, the higher the match rate. Your app hands Ranksy those match keys once per merchant session, and Ranksy forwards them to the conversion APIs your app has connected — Meta's and Reddit's today.


POST/api/v1/apps/:app/capi

Send conversion signals

Store the latest identity and session match keys for one merchant. Send raw values — Ranksy hashes them per platform at send time. Call it once per merchant session; every page load is fine, because newer signals replace older ones and blank fields never overwrite stored ones.

Requires the integrations.manage permission, the same as Identify and Track events. Keys created before permissions also need the capi:write scope.

Path parameter

  • Name
    app
    Type
    string
    Description

    The team app's ULID, e.g. 01JN4HKQX0000000000000000.

Request body

  • Name
    myshopify_domain
    Type
    string
    Description

    The merchant's .myshopify.com domain.

  • Name
    occurred_at
    Type
    string
    Description

    ISO-8601 time these signals were observed. Defaults to now; a time in the future is treated as now. Ranksy uses it to reject out-of-order payloads — see Freshness.

  • Name
    user
    Type
    object
    Description

    Durable identity, all optional strings: email (a valid address, max 255), phone (max 50), first_name and last_name (max 100), zip (max 20), city, region, and country (max 100). Ranksy converts phone to E.164 using the shop's country or user.country; a number it can't parse is dropped and left out of stored.

  • Name
    context
    Type
    object
    Description

    Session state: ip (a valid IPv4 or IPv6 address) and user_agent (max 1000 chars), as observed on the merchant's own request to your backend. Both optional, but if you omit one, Ranksy uses the IP or User-Agent of the /capi request itself. That suits a call made from the merchant's browser; on a server-to-server call, send both, or your server's IP and User-Agent are stored as the merchant's.

Request

POST
/api/v1/apps/:app/capi
curl -X POST https://ranksyapp.com/api/v1/apps/01JN4HKQX0000000000000000/capi \
  -H "Authorization: Bearer rk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "myshopify_domain": "acme-supplies.myshopify.com",
    "occurred_at": "2026-07-23T14:36:00Z",
    "user": {
      "email": "sarah@acmesupplies.com",
      "phone": "+14155551234",
      "first_name": "Sarah",
      "last_name": "Chen",
      "zip": "94107",
      "city": "San Francisco",
      "region": "California",
      "country": "United States"
    },
    "context": {
      "ip": "203.0.113.42",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) ..."
    }
  }'

200 — Success

{
  "accepted": true,
  "shop_id": 68134502401,
  "stored": ["email", "phone", "zip", "ip", "user_agent"]
}

stored lists the fields this call actually wrote, using your own key names. A payload ignored as stale returns "accepted": true with an empty stored. shop_id is the shop's numeric Shopify id, or null while Ranksy doesn't know it yet.


Send raw values

Do not pre-hash anything. Each conversion API normalizes differently before hashing. Meta, for example, strips non-ASCII bytes from city names rather than transliterating them, so São Paulo hashes as sopaulo. Ranksy applies the correct normalization per platform at send time. A pre-hashed value cannot be normalized, so it will not match.

Freshness

Ranksy keeps the latest known signals per merchant, under two rules:

  • Newest wins. A payload whose occurred_at is older than the stored value is ignored as a whole (one with the same time is accepted), so an out-of-order request cannot regress a fresher IP.
  • Blank never overwrites. An omitted or empty field leaves the stored value untouched. This makes the endpoint safe to call on every page load: send only what you have, and a session where you cannot resolve the merchant's email does not erase the email you sent yesterday.

What Ranksy sends from these signals

A call that stores fresh signals can trigger a realtime send of the app's Meta events for that shop. /identify and /capi dispatch the same per-shop senders. The app's enabled mappings and gates decide which events Ranksy sends. None of these events appears in this endpoint's response.

Lead. Every Lead the app sends goes through one merchant decision: install mapped to Lead, qualified install mapped to Lead, and the raw Lead that CRM events add when install maps to CompleteRegistration. Ranksy resolves the decision from the installation's stored plan_display_name, is_partner_dev_store, and store_created_at, and judges the store as it was at install time:

  • A recognized paid Shopify plan passes.
  • A development store or a recognized non-production plan fails, even when the mapping sets no gate.
  • An exact Shopify Trial plan passes only when store_created_at is strictly more than seven days before the install. Exactly seven days, a missing date, and a future date fail.
  • When the mapping's gate uses store age, the configured minimum store age applies on top.
  • An unknown plan passes only when the mapping does not use the plan gate. The raw CRM Lead uses no gate.

MerchantDisqualified. When enabled, this signal sends one exclusion event. The store profile must be fetched in the last seven days. The profile must show explicit development or non-production evidence, or an exact Shopify Trial plan that is not reliably older than seven days. A recognized paid plan suppresses the event. App subscription trials, the is_test flag alone, and an unknown plan alone do not qualify.

RanksyInvalidClick. This signal starts disabled and is opt-in. Ranksy sends it only for a live assessment of a tracked click in the last seven days:

  • invalid_network: provider abuse evidence plus hosting or datacenter context, plus Tor or proxy evidence.
  • invalid_automation: an automation user agent plus hosting, proxy, Tor, or abuse evidence.
  • Ranksy excludes a known crawler. A VPN, proxy, country, provider name, or network score alone is not sufficient. A verdict is not proof of fraud.

The click must have fbc, ip, and user_agent. The provider lookup must be within 24 hours of the click. Backfill assessments never send events.

Timing. A new tracked click queues an IP lookup after the click is stored. The app must be connected, and IP intelligence must be configured. During Lead processing, Ranksy classifies the attributed click from a stored observation less than 24 hours old. If no fresh observation exists, it queues the same lookup job. A live invalid verdict queues delivery promptly. A failed lookup does not block an otherwise qualified Lead. The 24-hour value is the freshness limit of the observation relative to the click, not a delivery delay.

Ranksy sends events only. Audience and exclusion setup, ad sets, IP lists, billing invalidation, and refunds stay in Meta. Matching does not guarantee that every flagged visit becomes an audience member.

Why there are no click ID fields

There is no fbclid, fbp, or rdt_cid parameter, by design. A merchant who clicks your ad installs through Shopify's OAuth flow and lands in an embedded admin iframe where third-party cookies are partitioned. The browser context that held the click ID is gone by the time your app runs. The app cannot read it, so asking for it would only invite bad data.

Ranksy captures the click ID earlier instead. When your ads point at your Ranksy ad landing page, the page records the click on Ranksy's server as the visitor arrives. Ranksy then matches the install to that click with the contacts[].ip and contacts[].user_agent you send to /identify. The context you send to /capi does not take part in that match.

Matching on Meta's side runs on external_id — the shop's domain and numeric Shopify ID, which collides with the identifier Shopify's own App Store pixel emits — plus the hashed identity you send here, plus the click's fbc and fbp when Ranksy matched the install to a landing-page click.

Errors

Beyond the universal 401 / 403 / 422 (see Errors); /capi is not rate limited, so it doesn't return 429:

  • Name
    404 — shop_not_identified
    Type
    invalid_request_error
    Description

    No installation exists for this domain on this app. Call /identify first.

  • Name
    422 — validation_failed
    Type
    invalid_request_error
    Description

    Most often a malformed email or ip.

Rate limits

/capi is exempt from the standard rate limit: it never returns 429 and doesn't use up the 120-requests-per-minute window your app's other endpoints share. There is no daily limit. /capi never counts toward your monthly plan quota, and keeps working without an active subscription.

Your data responsibility

You are sending your merchants' personal data to third-party advertising platforms. The legal basis for that — consent, disclosure, and a data processing agreement where required — is your obligation to your merchants, not Ranksy's.