SDK

Link Session To Query

Link a user session to an AI query execution for attribution tracking.

This endpoint establishes the connection between an AI-generated answer and subsequent user activity, enabling closed-loop analytics from AI query → user visit → conversion → revenue.

Use Case: When a user clicks a link from an AI assistant (ChatGPT, Gemini, etc.), extract the query_id parameter and call this endpoint to establish attribution.

Example:

User clicks: https://yourapp.com?query_id=abc-123&utm_source=chatgpt
SDK extracts query_id and calls: POST /attribution/link

Request Body:

  • session_id: SDK session identifier (persistent for 7 days)
  • query_id: UUID of the query_execution record from our platform
  • ai_source: AI platform (chatgpt, gemini, claude, perplexity, grok)
  • confidence: Attribution confidence (0.0-1.0)
  • attribution_method: How attribution was determined (url_parameter, cookie, etc.)

Response: Returns attribution session details including first_seen_at and created flag.

post/api/sdk/v1/attribution/link

Request

  • Base URL: https://geo.sig.ai (the document declares no server; this is the origin it was published from)
  • URL: https://geo.sig.ai/api/sdk/v1/attribution/link
  • Auth: none declared

Headers

X-API-Keystring

Request body

session_idstring required

SDK session identifier

query_idstring required

Query execution UUID

ai_sourcestring required

AI platform (chatgpt, gemini, claude, etc.)

confidencenumber required

Attribution confidence (0.0-1.0)

attribution_methodstring

How attribution was determined

Response

Successful Response

session_idstring required
query_idstring required
ai_sourcestring required
confidencenumber required
attribution_methodstring required
first_seen_atstring date-time required
last_seen_atstring date-time required
createdboolean required

Changes

No recorded changes to this operation across all 1 revision of this API.