### API Initialization with Python Source: https://pagedrop.dev/docs Initial setup for using the requests library with the PageDrop API. ```python import requests ``` -------------------------------- ### API Operations with cURL Source: https://pagedrop.dev/docs Command-line examples for deploying, retrieving, and deleting sites. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -H "Content-Type: application/json" \ -d '{"html": "

Hello!

"}' ``` ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -F "file=@document.pdf" ``` ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -F "file=@my-project.zip" ``` ```bash curl "https://pagedrop.dev/api/v1/sites/a1b2c3d4" ``` ```bash curl "https://pagedrop.dev/api/v1/sites/a1b2c3d4/files" ``` ```bash curl -X DELETE "https://pagedrop.dev/api/v1/sites/a1b2c3d4" \ -H "X-Delete-Token: dlt_YOUR_TOKEN_HERE" ``` -------------------------------- ### Create Site from HTML with OG Tags Source: https://pagedrop.dev/docs This example demonstrates creating a hosted site using raw HTML and configuring Open Graph tags for social media sharing. The `html` field accepts a string of HTML content. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -H "Content-Type: application/json" \ -d '{ "html": "

My Demo

", "ogTitle": "My Demo Page", "ogDescription": "Check out this awesome demo hosted on PageDrop", "ogImage": "https://example.com/preview.png" }' ``` -------------------------------- ### API Response Examples Source: https://pagedrop.dev/docs Standard JSON response formats for successful site operations and error handling. ```json { "status": "success", "data": { "siteId": "a1b2c3d4", "files": [ { "path": "index.html", "contentType": "text/html; charset=utf-8" }, { "path": "style.css", "contentType": "text/css" }, { "path": "app.js", "contentType": "application/javascript" } ], "totalSizeBytes": 8192 } } ``` ```json { "error": "Validation failed", "message": "Request body must include 'html' field or upload a file" } ``` -------------------------------- ### GET /api/v1/sites/:siteId/files Source: https://pagedrop.dev/docs List all files in a hosted site. ```APIDOC ## GET /api/v1/sites/:siteId/files ### Description List all files in a hosted site. Useful for ZIP-deployed sites with multiple assets. ### Method GET ### Endpoint /api/v1/sites/:siteId/files ### Parameters #### Path Parameters - **siteId** (string) - Required - The ID of the site ``` -------------------------------- ### Retrieve Site Metadata Example Response Source: https://pagedrop.dev/docs A successful response for retrieving site metadata includes `siteId`, `url`, creation and expiration timestamps, file details, and view statistics. ```json { "status": "success", "data": { "siteId": "a1b2c3d4", "url": "https://pagedrop.dev/s/a1b2c3d4", "createdAt": "2026-02-17T12:00:00.000Z", "expiresAt": null, "fileCount": 1, "totalSizeBytes": 1234, "viewCount": 42, "files": ["index.html"] } } ``` -------------------------------- ### GET /embed/:siteId Source: https://pagedrop.dev/docs Serve a hosted site in an iframe-friendly format. ```APIDOC ## GET /embed/:siteId ### Description Serve a hosted site in an iframe-friendly format. Uses Cross-Origin-Resource-Policy: cross-origin headers that allow embedding in blog posts, Notion pages, and other platforms. ### Method GET ### Endpoint /embed/:siteId ### Parameters #### Path Parameters - **siteId** (string) - Required - The unique identifier of the site. ``` -------------------------------- ### Retrieve Site Metadata Source: https://pagedrop.dev/docs Fetch metadata for a specific hosted site using its `siteId`. This GET request returns details such as `url`, `createdAt`, `fileCount`, and `viewCount`. ```bash GET /api/v1/sites/:siteId ``` -------------------------------- ### Initialize Application Insights Source: https://pagedrop.dev/ This snippet initializes Application Insights with a specific connection string. Ensure the connection string is correctly configured for your Azure environment. This setup is typically done once at the application's entry point. ```javascript var aiConfig = { connectionString: "InstrumentationKey=225ab5da-6b75-4367-8d91-881154a29b89;IngestionEndpoint=https://germanywestcentral-1.in.applicationinsights.azure.com/;LiveEndpoint=https://germanywestcentral.livediagnostics.monitor.azure.com/;ApplicationId=45c5d7ca-8188-47dc-907d-1af05a367db9" }; (function(appInsights) { var ai = window.appInsights || function(config) { function r(diag) { return diag.length === 0 ? null : diag.pop(); } var c = appInsights.q || []; var s = appInsights. Scarlett || { queue: c, Scarlett: true }; var t = config.instrumentationKey; var n = config.endpointUrl || "https://dc.services.visualstudio.com/v2/track"; if (!t) throw new Error("instrumentation key is required."); s. Scarlett = true; function i(e, t) { var n = []; for (var i = 0; i < e.length; i++) { var a = e[i]; var o = t && t.indexOf(a) !== -1; if (!o) { n.push(a); } } return n; } var a = window.navigator.userAgent; var o = function(e) { var t = s.queue; if (e) { t.push(e); } var n = r(t); while (n) { if (n.callback) { n.callback( n.config ); } n = r(t); } }; var u = Object.freeze({ trackPageView: function(e, t, n, i, a) { o({ name: "PageView", properties: e, config: { name: t, url: n, id: i, duration: a } }); }, trackEvent: function(e, t, n) { o({ name: "Event", properties: e, config: { name: t, value: n } }); }, trackException: function(e, t, n, i, a) { o({ name: "Exception", properties: e, config: { message: t, type: n, outerId: i, handledAt: a } }); }, trackTrace: function(e, t, n) { o({ name: "Trace", properties: e, config: { message: t, severityLevel: n } }); }, trackDependencyData: function(e, t, n, i, a, o, u) { o({ name: "DependencyData", properties: e, config: { name: t, kind: n, duration: i, success: a, responseCode: o, correlationId: u } }); }, trackMetric: function(e, t, n, i, a) { o({ name: "Metric", properties: e, config: { name: t, value: n, duration: i, count: a } }); }, startTrackPage: function(e) { o({ name: "StartPageView", config: { name: e } }); }, stopTrackPage: function(e, t, n, i) { o({ name: "StopPageView", config: { name: e, url: t, duration: n, properties: i } }); }, startTrackEvent: function(e) { o({ name: "StartEvent", config: { name: e } }); }, stopTrackEvent: function(e, t, n) { o({ name: "StopEvent", config: { name: e, properties: t, value: n } }); }, addTelemetryInitializer: function(e) { var t = s.telemetryInitializers; if (!t) { t = []; s.telemetryInitializers = t; } t.push(e); }, setAuthenticatedUserContext: function(e, t, n) { o({ name: "SetAuthenticatedUserContext", config: { accountId: e, id: t, storeRegion: n } }); }, clearAuthenticatedUserContext: function() { o({ name: "ClearAuthenticatedUserContext" }); }, flush: function() { o(); } }); return u; }({ instrumentationKey: t, endpointUrl: n }); appInsights.queue.push(a); return appInsights; }({}); var ai = window.appInsights; var cfg = config; ai.queue.push(function(config) { var ai = window.appInsights; var cfg = config; var L = "disableExceptionFlipOverlap"; var g = window.navigator; var C = window.document; var E = "appInsights"; var h = ai; var e = function(e) { var t = []; for (var n = 0; n < e.length; n++) { var i = e[n]; var a = C.scripts || C.getElementsByTagName("script"); var o = false; for (var r = 0; r < a.length; r++) { if (a[r].src.indexOf(i) !== -1) { o = true; break; } } if (!o) { t.push(i); } } return t; }; var d = "track"; var p = "TrackPageView"; var m = "TrackEvent"; var f = "TrackException"; var y = "TrackTrace"; var b = "TrackDependencyData"; var S = "TrackMetric"; var I = "start" + p; var R = "stop" + p; var O = "start" + m; var P = "stop" + m; var T = "addTelemetryInitializer"; var A = "setAuthenticatedUserContext"; var D = "clearAuthenticatedUserContext"; var x = "flush"; var v = [d + "Event", d + p, d + f, d + y, d + b, d + S, d + "PageViewPerformance", I, R, O, P, T, A, D, x]; var u = (g.extensionConfig || {}).ApplicationInsightsAnalytics || {}; return !0 !== g[L] && !0 !== u[L] && (e(["_" + (c = "onerror")]), u = C[c], C[c] = function(e, t, n, i, a) { var o = u && u(e, t, n, i, a); return !0 !== o && h["-" + c]({ message: e, url: t, lineNumber: n, columnNumber: i, error: a, evt: C.event }), o }, g.autoExceptionInstrumented = !0), h }({}) })(window.appInsights || (window.appInsights = {})); window.appInsights.queue.push(function(config) { var ai = window.appInsights; var cfg = config; var L = "disableExceptionFlipOverlap"; var g = window.navigator; var C = window.document; var E = "appInsights"; var h = ai; var e = function(e) { var t = []; for (var n = 0; n < e.length; n++) { var i = e[n]; var a = C.scripts || C.getElementsByTagName("script"); var o = false; for (var r = 0; r < a.length; r++) { if (a[r].src.indexOf(i) !== -1) { o = true; break; } } if (!o) { t.push(i); } } return t; }; var d = "track"; var p = "TrackPageView"; var m = "TrackEvent"; var f = "TrackException"; var y = "TrackTrace"; var b = "TrackDependencyData"; var S = "TrackMetric"; var I = "start" + p; var R = "stop" + p; var O = "start" + m; var P = "stop" + m; var T = "addTelemetryInitializer"; var A = "setAuthenticatedUserContext"; var D = "clearAuthenticatedUserContext"; var x = "flush"; var v = [d + "Event", d + p, d + f, d + y, d + b, d + S, d + "PageViewPerformance", I, R, O, P, T, A, D, x]; var u = (g.extensionConfig || {}).ApplicationInsightsAnalytics || {}; return !0 !== g[L] && !0 !== u[L] && (e(["-" + (c = "onerror")]), u = C[c], C[c] = function(e, t, n, i, a) { var o = u && u(e, t, n, i, a); return !0 !== o && h["-" + c]({ message: e, url: t, lineNumber: n, columnNumber: i, error: a, evt: C.event }), o }, g.autoExceptionInstrumented = !0), h }({}) ); ``` -------------------------------- ### GET /s/:siteId Source: https://pagedrop.dev/docs View the hosted site in a browser. This is the public URL users visit to see the deployed page. ```APIDOC ## GET /s/:siteId ### Description View the hosted site in a browser. Returns the raw HTML content with appropriate Content-Type headers. ### Method GET ### Endpoint /s/:siteId ### Parameters #### Path Parameters - **siteId** (string) - Required - The unique identifier of the site. ``` -------------------------------- ### Deploy HTML Content with PageDrop API Source: https://pagedrop.dev/docs Use this snippet to deploy HTML content to PageDrop. It returns the live URL, expiration date, and delete token. Ensure you have the 'requests' library installed. ```python response = requests.post( "https://pagedrop.dev/api/v1/sites", json={"html": "

Hello World

Deployed with PageDrop

"} ) result = response.json() site = result["data"] print(f"Live at: {site['url']}") print(f"Expires: {site['expiresAt'] or 'Never'}") print(f"Delete token: {site['deleteToken']}") # Save this! ``` -------------------------------- ### GET /api/v1/sites/:siteId Source: https://pagedrop.dev/docs Retrieve metadata about a specific hosted site. ```APIDOC ## GET /api/v1/sites/:siteId ### Description Retrieve metadata about a hosted site. ### Method GET ### Endpoint /api/v1/sites/:siteId ### Parameters #### Path Parameters - **siteId** (string) - Required - The unique site identifier ### Response #### Success Response (200) - **siteId** (string) - The site identifier - **url** (string) - The site URL - **viewCount** (number) - Number of views #### Response Example { "status": "success", "data": { "siteId": "a1b2c3d4", "url": "https://pagedrop.dev/s/a1b2c3d4", "viewCount": 42 } } ``` -------------------------------- ### Get Site Metadata Source: https://pagedrop.dev/docs Retrieve metadata for a specific hosted site using its site ID. ```APIDOC ## GET /api/v1/sites/{siteId} ### Description Retrieves metadata for a specific hosted site. ### Method GET ### Endpoint https://pagedrop.dev/api/v1/sites/{siteId} ### Parameters #### Path Parameters - **siteId** (string) - Required - The unique identifier of the site. ### Response #### Success Response (200) - **data** (object) - Contains site information. - **url** (string) - The live URL of the deployed site. - **expiresAt** (string) - The expiration date of the site. - **deleteToken** (string) - The token required to delete the site. - **siteId** (string) - The unique identifier for the site. #### Response Example ```json { "data": { "url": "https://pagedrop.dev/site/abcdef123", "expiresAt": "2024-12-31T23:59:59Z", "deleteToken": "your_delete_token_here", "siteId": "abcdef123" } } ``` ``` -------------------------------- ### GET /api/v1/sites/:siteId/analytics Source: https://pagedrop.dev/docs Get detailed view analytics for a site, including daily view counts, top referrers, and recent views. ```APIDOC ## GET /api/v1/sites/:siteId/analytics ### Description Get detailed view analytics for a site. Returns daily view counts, top referrers, and the 20 most recent individual views. Requires the delete token — only the site owner can access analytics. ### Method GET ### Endpoint /api/v1/sites/:siteId/analytics ### Parameters #### Path Parameters - **siteId** (string) - Required - The ID of the site #### Headers - **X-Delete-Token** (string) - Required - The delete token returned when the site was created ### Response #### Success Response (200) - **status** (string) - Status of the operation - **data** (object) - Analytics data including `viewCount`, `recentViews`, `dailyViews`, and `topReferrers` #### Response Example { "status": "success", "data": { "siteId": "a1b2c3d4", "viewCount": 42, "recentViews": [ { "timestamp": "2026-03-11T14:30:00.000Z", "referrer": "https://twitter.com/someone/status/123" } ], "dailyViews": { "2026-03-11": 15 }, "topReferrers": [ { "referrer": "(direct)", "count": 20 } ] } } ``` -------------------------------- ### Upload PDF to Create Site Source: https://pagedrop.dev/docs Create a new hosted site by uploading a PDF file. The `file` field should contain the path to the PDF, prefixed with `@`. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -F "file=@document.pdf" ``` -------------------------------- ### GET /api/v1/sites/:siteId Source: https://pagedrop.dev/llms.txt Retrieve metadata and analytics for a specific site. ```APIDOC ## GET /api/v1/sites/:siteId ### Description Get site metadata including viewCount analytics. ### Method GET ### Endpoint /api/v1/sites/:siteId ### Parameters #### Path Parameters - **siteId** (string) - Required - The unique identifier of the site ``` -------------------------------- ### Initialize Theme Management Source: https://pagedrop.dev/ Sets the document theme based on localStorage or system preference. ```javascript (function() { var saved = localStorage.getItem('sv-theme'); var prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches; var theme = saved || (prefersDark ? 'dark' : 'light'); document.documentElement.setAttribute('data-theme', theme); })(); ``` -------------------------------- ### Create Site from Markdown Source: https://pagedrop.dev/docs Use this endpoint to create a new hosted site from Markdown content. A slug can be provided to customize the site's URL. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -H "Content-Type: application/json" \ -d '{ "markdown": "# Hello World\n\nThis is **bold** and this is `code`.\n\n## Features\n\n- Auto-styled HTML\n- Dark/light mode\n- Responsive design", "slug": "my-readme" }' ``` -------------------------------- ### POST /sites Source: https://pagedrop.dev/docs Creates a new hosted site by accepting raw HTML, Markdown, or a file upload. ```APIDOC ## POST /api/v1/sites ### Description Create a new hosted site. Accepts JSON with raw HTML, Markdown, or a multipart form upload with a file (HTML, PDF, or ZIP). ### Method POST ### Endpoint /api/v1/sites ### Parameters #### Request Body **Option 1: JSON Body** - **html** (string) - required* - Raw HTML content to host. Max 15 MB. *Provide `html` or `markdown`, not both. - **markdown** (string) - required* - Markdown content — auto-rendered to a responsive, styled HTML page with dark/light mode support. Max 15 MB. *Provide `html` or `markdown`, not both. - **title** (string) - optional - Page title for markdown rendering. Auto-detected from the first `# heading` if omitted. - **ttl** (string) - optional - Time-to-live. Format: number + unit (`h`=hours, `d`=days, `m`=months). Examples: `1d`, `12h`, `30d`. Default: **never expires** (permanent). - **slug** (string) - optional - Custom vanity slug for the URL. 3-64 characters, lowercase alphanumeric and hyphens. Example: `"my-project"` → `/s/my-project`. Must be unique. - **ogTitle** (string) - optional - Custom Open Graph title for social media previews. Max 200 characters. Injected as `` when the page is served. - **ogDescription** (string) - optional - Custom Open Graph description for social media previews. Max 500 characters. Also sets ``. - **ogImage** (string) - optional - URL to an Open Graph image (1200x630px recommended). Enables `twitter:card=summary_large_image` for rich Twitter/X previews. - **password** (string) - optional - Password-protect the page. Visitors must enter this password before viewing the content. - **passwordExpiry** (number) - optional - Password cookie expiry in hours (1–720). Default: 24. After this period, visitors must re-enter the password. **Option 2: Multipart Upload** - **file** (file) - required - HTML file (.html), PDF file (.pdf), or ZIP archive (.zip) containing a project with an `index.html` at the root. PDF files are auto-wrapped in a viewer page. Max 10MB for PDF and ZIP. ### Request Example #### JSON Body Example ```json { "html": "

Hello World

Deployed with PageDrop!

" } ``` #### cURL Example (JSON Body) ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -H "Content-Type: application/json" \ -d '{"html": "

Hello World

Deployed with PageDrop!

"}' ``` ``` -------------------------------- ### Upload ZIP to Create Site Source: https://pagedrop.dev/docs This endpoint allows creating a hosted site by uploading a ZIP archive. Ensure the `file` field is correctly set to the path of your ZIP file, prefixed with `@`. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -F "file=@my-project.zip" ``` -------------------------------- ### POST /api/v1/sites Source: https://pagedrop.dev/llms.txt Create a new hosted site by providing HTML, Markdown, or file content. ```APIDOC ## POST /api/v1/sites ### Description Create a new hosted site (HTML paste, Markdown paste, PDF upload, file upload, or ZIP deploy). ### Method POST ### Endpoint /api/v1/sites ### Request Body - **markdown** (string) - Optional - Auto-rendered Markdown content - **slug** (string) - Optional - Vanity URL slug - **ttl** (integer) - Optional - Time to live for expiry - **ogTitle** (string) - Optional - Custom Open Graph title - **ogDescription** (string) - Optional - Custom Open Graph description - **ogImage** (string) - Optional - Custom Open Graph image URL - **password** (string) - Optional - Password for protected pages ``` -------------------------------- ### Create Multiple Sites in Batch Source: https://pagedrop.dev/docs Efficiently create up to 20 sites in a single API call. This endpoint supports both HTML and Markdown content for each site within the `sites` array. Optional fields like `slug`, `ttl`, and OG tags can be specified per site. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites/batch" \ -H "Content-Type: application/json" \ -d '{ "sites": [ { "html": "

Page One

", "slug": "page-one", "ttl": "7d" }, { "markdown": "# Page Two\nHello world", "title": "My Doc" }, { "html": "

Page Three

" } ] }' ``` -------------------------------- ### POST /api/v1/sites Source: https://pagedrop.dev/docs Create a new hosted site by uploading content in Markdown, HTML, PDF, or ZIP format. ```APIDOC ## POST /api/v1/sites ### Description Create a new hosted site. Supports Markdown, HTML, PDF, or ZIP file uploads. ### Method POST ### Endpoint /api/v1/sites ### Request Body - **markdown** (string) - Optional - Markdown content for the site - **html** (string) - Optional - HTML content for the site - **slug** (string) - Optional - Custom URL slug - **ogTitle** (string) - Optional - Open Graph title - **ogDescription** (string) - Optional - Open Graph description - **ogImage** (string) - Optional - Open Graph image URL - **file** (binary) - Optional - PDF or ZIP file upload ### Response #### Success Response (201) - **siteId** (string) - Unique identifier for the site - **url** (string) - Public URL of the site - **deleteToken** (string) - Token required for future updates or deletion #### Response Example { "status": "success", "data": { "siteId": "a1b2c3d4", "url": "https://pagedrop.dev/s/a1b2c3d4", "deleteToken": "dlt_e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8" } } ``` -------------------------------- ### Create Hosted Site with JSON Body Source: https://pagedrop.dev/docs This cURL command demonstrates how to create a new hosted site by sending raw HTML content in a JSON payload. Ensure the 'Content-Type' header is set to 'application/json'. ```bash curl -X POST "https://pagedrop.dev/api/v1/sites" \ -H "Content-Type: application/json" \ -d '{"html": "

Hello World

Deployed with PageDrop!

"}' ``` -------------------------------- ### Host HTML via POST Request Source: https://pagedrop.dev/ Use this command to deploy raw HTML content to PageDrop. The API returns a live URL and a delete token for future management. ```bash curl -X POST https://pagedrop.dev/api/v1/sites -H 'Content-Type: application/json' -d '{"html":"

Hello World

"}' ``` -------------------------------- ### POST /api/v1/sites/batch Source: https://pagedrop.dev/docs Create multiple sites in a single request (up to 20). ```APIDOC ## POST /api/v1/sites/batch ### Description Create multiple sites in a single request. Supports HTML and Markdown content. ### Method POST ### Endpoint /api/v1/sites/batch ### Request Body - **sites** (array) - Required - Array of site objects (max 20). Each object supports html, markdown, title, slug, ttl, ogTitle, ogDescription, ogImage, password, passwordExpiry. ``` -------------------------------- ### Get Site Analytics Request Source: https://pagedrop.dev/docs Retrieve detailed view analytics for a specific site. This includes daily view counts, top referrers, and recent views. Access requires the site's delete token, ensuring only the owner can view analytics. ```bash curl "https://pagedrop.dev/api/v1/sites/a1b2c3d4/analytics" \ -H "X-Delete-Token: dlt_e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8" ``` -------------------------------- ### API Operations with JavaScript Source: https://pagedrop.dev/docs Implementation of site deployment, metadata retrieval, and deletion using the Fetch API. ```javascript // Deploy HTML const response = await fetch("https://pagedrop.dev/api/v1/sites", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ html: "

Hello World

Deployed with PageDrop

" }) }); const { data } = await response.json(); console.log(`Live at: ${data.url}`); console.log(`Expires: ${data.expiresAt ?? "Never"}`); console.log(`Delete token: ${data.deleteToken}`); // Save this! // Get site metadata const meta = await fetch(`https://pagedrop.dev/api/v1/sites/${data.siteId}`); console.log(await meta.json()); // Upload a PDF file const pdfForm = new FormData(); pdfForm.append("file", pdfBlob, "document.pdf"); const pdfUpload = await fetch("https://pagedrop.dev/api/v1/sites", { method: "POST", body: pdfForm }); console.log(await pdfUpload.json()); // Upload a ZIP file const formData = new FormData(); formData.append("file", zipFileBlob, "project.zip"); const upload = await fetch("https://pagedrop.dev/api/v1/sites", { method: "POST", body: formData }); console.log(await upload.json()); // Delete a site await fetch(`https://pagedrop.dev/api/v1/sites/${data.siteId}`, { method: "DELETE", headers: { "X-Delete-Token": data.deleteToken } }); ``` -------------------------------- ### Success Response for Site Creation Source: https://pagedrop.dev/docs This JSON structure represents a successful site creation, detailing the site's ID, URL, delete token, expiration, associated files, and size. ```json { "status": "success", "data": { "created": [ { "siteId": "page-one", "url": "https://pagedrop.dev/s/page-one", "deleteToken": "dlt_abc123...", "expiresAt": "2026-03-20T12:00:00.000Z", "files": ["index.html"], "totalSizeBytes": 22 }, { "siteId": "a1b2c3d4", "url": "https://pagedrop.dev/s/a1b2c3d4", "deleteToken": "dlt_def456...", "expiresAt": null, "files": ["index.html"], "totalSizeBytes": 150 }, { "siteId": "e5f6g7h8", "url": "https://pagedrop.dev/s/e5f6g7h8", "deleteToken": "dlt_ghi789...", "expiresAt": null, "files": ["index.html"], "totalSizeBytes": 24 } ], "failed": [], "totalCreated": 3, "totalFailed": 0 } } ``` -------------------------------- ### Site Creation Success Response Source: https://pagedrop.dev/docs A successful response after creating a site includes the `siteId`, `url`, and a crucial `deleteToken`. Save the `deleteToken` as it's only provided once and is necessary for future updates or deletions. ```json { "status": "success", "data": { "siteId": "a1b2c3d4", "url": "https://pagedrop.dev/s/a1b2c3d4", "deleteToken": "dlt_e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8", "expiresAt": null, "ttlDays": null, "files": ["index.html"], "totalSizeBytes": 1234, "viewCount": 0, "createdAt": "2026-02-17T12:00:00.000Z", "passwordProtected": false } } ``` -------------------------------- ### Success Response for Site Forking Source: https://pagedrop.dev/docs This JSON confirms a successful site fork operation, providing the new site's ID, URL, delete token, expiration, file list, size, and the ID of the original site it was forked from. ```json { "status": "success", "data": { "siteId": "my-remix", "url": "https://pagedrop.dev/s/my-remix", "deleteToken": "dlt_...", "expiresAt": null, "files": ["index.html"], "totalSizeBytes": 42, "forkedFrom": "abc123", "createdAt": "2026-03-17T..." } } ``` -------------------------------- ### Initialize Application Insights Telemetry Source: https://pagedrop.dev/docs Configures and loads the Azure Application Insights SDK for monitoring. ```javascript !(function (cfg){function e(){cfg.onInit&&cfg.onInit(n)}var x,w,D,t,E,n,C=window,O=document,b=C.location,q="script",I="ingestionendpoint",L="disableExceptionTracking",j="ai.device.";"instrumentationKey"[x="toLowerCase"](),w="crossOrigin",D="POST",t="appInsightsSDK",E=cfg.name||"appInsights",(cfg.name||C[t])&&(C[t]=E),n=C[E]||function(g){var f=!1,m=!1,h={initialize:!0,queue:[],sv:"8",version:2,config:g};function v(e,t){var n={},i="Browser";function a(e){e=""+e;return 1===e.length?"0"+e:e}return n[j+"id"]=i[x](),n[j+"type"]=i,n["ai.operation.name"]=b&&b.pathname||"_unknown_",n["ai.internal.sdkVersion"]="javascript:snippet_"+(h.sv||h.version),{time:(i=new Date).getUTCFullYear()+"-"+a(1+i.getUTCMonth())+"-"+a(i.getUTCDate())+"T"+a(i.getUTCHours())+":"+a(i.getUTCMinutes())+":"+a(i.getUTCSeconds())+"."+(i.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z",iKey:e,name:"Microsoft.ApplicationInsights."+e.replace(/-/g,"")+"."+t,sampleRate:100,tags:n,data:{baseData:{ver:2}},ver:undefined,seq:"1",aiDataContract:undefined}}var n,i,t,a,y=-1,T=0,S=["js.monitor.azure.com","js.cdn.applicationinsights.io","js.cdn.monitor.azure.com","js0.cdn.applicationinsights.io","js0.cdn.monitor.azure.com","js2.cdn.applicationinsights.io","js2.cdn.monitor.azure.com","az416426.vo.msecnd.net"],o=g.url||cfg.src,r=function(){return s(o,null)};function s(d,t){if((n=navigator)&&(~(n=(n.userAgent||"").toLowerCase()).indexOf("msie")||~n.indexOf("trident/"))&&~d.indexOf("ai.3")&&(d=d.replace(/(\/)(ai\.3\.)([^\d]*)$/,function(e,t,n){return t+"ai.2"+n})),!1!==cfg.cr)for(var e=0;e