{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upriver-ai/json-schema/upriver-ai-sponsorships-response-schema.json",
  "title": "SponsorshipsResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upriver-ai-sponsorships-api-openapi.yml#/components/schemas/SponsorshipsResponse",
  "properties": {
    "results": {
      "items": {
        "$ref": "#/$defs/SponsorshipPlacement"
      },
      "type": "array",
      "title": "Results",
      "description": "List of sponsorship placements. Each record connects one sponsor, piece of content, and publication. Coauthored content can appear once for each participating publication."
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count",
      "description": "Number of placement records. Coauthored content can count more than once because each participating publication has its own record."
    },
    "next_cursor": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Cursor",
      "description": "Cursor for fetching the next page"
    },
    "has_more": {
      "type": "boolean",
      "title": "Has More",
      "description": "Whether more results are available",
      "default": false
    },
    "next_sync_token": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Sync Token",
      "description": "Token for starting the next sponsorship activity request. Save it after processing the results from this response that you intend to keep. Returned only for activity searches."
    },
    "tracking_status": {
      "anyOf": [
        {
          "$ref": "#/$defs/SponsorshipTrackingStatus"
        },
        {
          "type": "null"
        }
      ],
      "description": "Tracking status when publication_url is provided."
    }
  },
  "type": "object",
  "required": [
    "results",
    "total_count"
  ],
  "$defs": {
    "AdEvidence": {
      "properties": {
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source",
          "description": "Origin of the evidence (e.g., 'transcript', 'description', 'post_body', 'title')."
        },
        "excerpt": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Excerpt",
          "description": "Short excerpt around the sponsor mention. May be raw text or HTML depending on source."
        },
        "offset_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Offset Seconds",
          "description": "Approximate timestamp in seconds when source is 'transcript'. Null for sources without timing (e.g., description)."
        },
        "confidence": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Confidence",
          "description": "Detection confidence for this specific piece of evidence (0-1), when available."
        }
      },
      "type": "object",
      "title": "AdEvidence",
      "description": "Structured evidence about where/how the sponsor was detected."
    },
    "SponsorshipPlacement": {
      "properties": {
        "sponsor_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Id",
          "description": "Canonical identifier for this sponsor. After finding a sponsor by name or domain, use this identifier for later sponsor-specific searches, saved filters, and deduplication. It may be null when unavailable."
        },
        "sponsor_name": {
          "type": "string",
          "title": "Sponsor Name",
          "description": "Name of the sponsor/brand"
        },
        "sponsor_domain": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Domain",
          "description": "Canonical apex domain associated with the sponsor"
        },
        "sponsor_linkedin_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Linkedin Url",
          "description": "LinkedIn company profile URL for the sponsor"
        },
        "sponsor_description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Description",
          "description": "Brief description of the sponsor brand when available"
        },
        "sponsor_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Type",
          "description": "Legacy single-label sponsorship category for this placement (for example explicit_ad, implicit_ad, affiliate, promotion, or unknown), kept for backward compatibility. It groups several sponsorship signals into one value; for example, explicit_ad can also represent gifted content and does not prove a cash payment. Use monetization_type to see the likely deal and disclosure_tier to see the relationship evidence. This field remains available for filtering."
        },
        "sponsor_channel_ids": {
          "anyOf": [
            {
              "items": {
                "type": "string",
                "format": "uuid"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Sponsor Channel Ids",
          "description": "Sponsor-owned social accounts observed in this placement's evidence, given as channel_id values (the same identifiers the sponsor channels endpoints return). A placement can list zero, one, or several. Absent when no sponsor-owned account was identified for the placement."
        },
        "partner_confidence": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Partner Confidence",
          "description": "Best-effort confidence that the creator-sponsor relationship is present (0-1). It is not confidence in a specific compensation mechanism or legal compliance conclusion."
        },
        "monetization_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Monetization Type",
          "description": "Likely type of deal: paid_partnership (paid sponsorship), affiliate (commission from attributed actions), gifted (a product, service, access, or experience was provided; cash is not implied), or unknown (the deal type could not be determined). The value is based on available content and platform signals; it does not confirm a private contract or payment. For some older records, it was translated from sponsor_type and can also be promotion, self_promotion, or merch_store. The field is omitted when it was not populated."
        },
        "disclosure_tier": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Disclosure Tier",
          "description": "Strongest evidence found for the creator-sponsor relationship: platform_verified (platform data identifies the named relationship), creator_disclosed (the creator's content discloses it), commercial_signal (a link, code, or similar cue supports it), or inferred (the context suggests it without a stronger signal). This field describes how the relationship was identified, not the deal type or legal compliance. For some older records, it was translated from sponsor_type. The field is omitted when it was not populated."
        },
        "is_first_party": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Is First Party",
          "description": "True when the placement promotes the creator's own product, service, or store; false when a third-party sponsor was identified. Omitted when the counterparty could not be determined."
        },
        "publication_name": {
          "type": "string",
          "title": "Publication Name",
          "description": "Name of the publication where the placement appeared"
        },
        "publication_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Publication Url",
          "description": "URL of the publication"
        },
        "publication_categories": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Publication Categories",
          "description": "Categories for the publication"
        },
        "publication_platform": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Publication Platform",
          "description": "Platform of the publication (e.g., substack, podcast, youtube)"
        },
        "content_title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Title",
          "description": "Title of the content containing the placement"
        },
        "content_url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content Url",
          "description": "Canonical URL of the specific content, if available"
        },
        "published_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Published Date",
          "description": "Publication date (YYYY-MM-DD)"
        },
        "evidence": {
          "anyOf": [
            {
              "$ref": "#/$defs/AdEvidence"
            },
            {
              "type": "null"
            }
          ],
          "description": "Structured evidence for the placement (source, excerpt, transcript offset)."
        }
      },
      "type": "object",
      "required": [
        "sponsor_name",
        "publication_name"
      ],
      "title": "SponsorshipPlacement",
      "description": "One sponsor, piece of content, and publication."
    },
    "SponsorshipTrackingStatus": {
      "properties": {
        "publication_url": {
          "type": "string",
          "title": "Publication Url",
          "description": "The YouTube URL that was checked"
        },
        "channel_name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Channel Name",
          "description": "Channel name if known"
        },
        "status": {
          "type": "string",
          "title": "Status",
          "description": "'active', 'pending', or 'not_tracked'"
        },
        "message": {
          "type": "string",
          "title": "Message",
          "description": "Human-readable explanation",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "publication_url",
        "status"
      ],
      "title": "SponsorshipTrackingStatus",
      "description": "Tracking status for a publication in the sponsorship pipeline."
    }
  }
}