{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/sendgrid/main/json-schema/sendgrid-singlesends-link-stats-response-schema.json", "title": "SinglesendsLinkStatsResponse", "x-generated": "2026-10-12", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/sendgrid-stats-api-openapi.yml#/components/schemas/SinglesendsLinkStatsResponse", "type": "object", "properties": { "results": { "type": "array", "description": "This is the index of the link's location in the email contents.", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "This is the URL of the link clicked. If `{{custom_fields}}` are part of the URL, they will be included.", "format": "uri" }, "url_location": { "type": "integer", "description": "This is the location of the link clicked in each Single Send A/B variation, or in the Single Send itself if there are no variations. Links are numbered from the top down; the topmost link is index `0`.", "minimum": 0 }, "ab_variation": { "type": "string", "description": "This is the A/B variation of the Single Send stat returned. It is set to `\"all\"` if the `ab_variation` query parameter was not set in the request and `group_by` doesn't contain `ab_variation`.", "format": "uuid" }, "ab_phase": { "type": "string", "description": "This is the A/B phase of the Single Send stat returned. If the `ab_phase` query parameter was not provided, it will return `\"all\"`.", "$ref": "#/$defs/AbPhase1" }, "clicks": { "type": "integer", "minimum": 1, "description": "the number of clicks on this particular link" } }, "required": [ "url", "ab_variation", "ab_phase", "clicks" ] } }, "_metadata": { "$ref": "#/$defs/LinkTrackingMetadata" }, "total_clicks": { "type": "integer" } }, "required": [ "results", "_metadata" ], "$defs": { "AbPhase1": { "type": "string", "enum": [ "send", "test", "all" ] }, "LinkTrackingMetadata": { "title": "link tracking metadata", "type": "object", "properties": { "prev": { "type": "string", "format": "uri", "description": "The URL of the previous page of results. If this field isn't present, you're at the start of the list." }, "self": { "type": "string", "format": "uri", "description": "The URL of the current page of results." }, "next": { "type": "string", "format": "uri", "description": "The URL of the next page of results. If this field isn't present, you're at the end of the list." }, "count": { "type": "number", "description": "The number of items in the entire list, i.e., across all pages." } } } } }