Documentation
Use this prelaunch guide to plan branded links and printed QR codes for a single business or across client workspaces.
Development status
The local preview runs on Node.js with SQLite. The configured control host serves the workspace app and API. Published links, dynamic QR codes, and landing pages can use the control host or a verified customer hostname. The guides identify which capabilities are available in the preview and which are planned.
Links and destination changes
Choose the address people will keep
The public address includes a hostname and a path. For example, https://go.example.com/spring uses go.example.com as the hostname and /spring as the path. Keep a record of the address, the client who controls the hostname, the destination, and the places the address is published. If the address is already in circulation, preserve its scheme, hostname, path, and any required query behavior during a migration.
Edit a published destination
Publishing a destination edit in the local preview keeps the link ID and public address stable. A draft leaves the previously published revision in service. Disabling the published revision makes the link and its linked dynamic QR route return 404. Before publishing a new destination, record the previous URL and confirm the new page belongs to the campaign.
The preview uses 302 with Cache-Control: no-store. It uses the query stored in the destination URL and excludes query parameters from the public request. Put required campaign parameters on the destination and keep credentials and personal data out of links. HTTP redirect semantics
Branded domains and DNS
A dedicated subdomain such as go.example.com can handle redirect traffic while the main site and email keep their own records. The local preview verifies control of the exact hostname through a DNS TXT record. Routing and HTTPS readiness depend on how the instance is set up.
- Identify the registrar, authoritative DNS provider, client owner, and people authorized to change records. Export the current records and record the time to live (TTL) for the hostname.
- Claim the hostname in the correct client workspace and publish the exact TXT name and value shown in the app or API. Choose Check DNS in the app or call the verification endpoint. Set routing records using the instructions for the infrastructure you control. The DNS apex already has zone records and requires a supported provider-specific arrangement.
- Check the authoritative DNS answer and a public recursive answer. If they differ, check caching, DNS proxy settings, record placement, and conflicting records for that name. Keep unrelated web and mail records intact.
- Check that TLS presents a trusted certificate for the exact hostname, then try a known redirect over HTTPS from outside your own network. Verify both the returned redirect and the final landing page before sharing the address.
Keep registration and certificate renewal ownership recorded. For planned cutovers, reduce TTL ahead of the window where practical and allow the earlier TTL to expire. Existing DNS cache entries can continue directing traffic to the old service during a change or reversal. DNS concepts and caching
The bootstrap operator can release a pending or revoked hostname claim or recover it as a fresh pending claim. Recovery generates a new claim ID and TXT proof. Links and scan tokens belonging to the retired claim stay inactive, so reconcile the new mapping before switching traffic.
Static and dynamic QR codes
- Static
The symbol contains the selected payload. A URL printed this way stays encoded as printed. If you control that URL, you can change what it serves. A direct URL to a destination can bypass the ArchURL resolver entirely and yields no ArchURL visit event from that scan.
- Dynamic
The symbol contains a stable scan URL under
/q/. A dynamic code can point to a standalone destination or follow a short link’s published destination and active state. The workspace app previews saved codes and offers SVG and PNG downloads. Record the exact scan URL for every placement.
Decode existing artwork before classifying a code for migration. A symbol generated as a static image can still contain a provider’s short URL and depend on that redirect. Keep one record per artwork placement so you can identify every poster, package, or insert affected by a later change.
Print proof and approval
Use the exact final PDF sent to the printer and identify each zone that should contain a saved dynamic QR code. The instance checks the declared zones against the expected stable scan addresses and captures the current routing bindings.
- Record each placement, page or panel, expected encoded value, expected destination, and intended routing version if available. Include a readable short address nearby where practical.
- Use a vector file when your print workflow supports it. Preserve contrast and a clear quiet zone on all four sides. A standard QR Code needs a four-module quiet zone. DENSO WAVE QR Code area guidance
- Decode the actual PDF going to the printer. Match every symbol to the placement list, including duplicates at different positions. Flag missing, unexpected, unreadable, and swapped codes. Follow the decoded addresses to verify the destinations.
- Scan a physical proof with representative devices under expected lighting and at the intended viewing distance. Check the actual material, finish, scale, and placement. Use calibrated barcode verification where the application requires it. GS1 barcode verification guidance
- Record who approved the result and the checksum of the final PDF. Rerun checks when the file or approved routing changes.
Describe placements in the PDF
Each placement has a saved qrId, a 1-based page number, and a rectangle. Use fractions of the visible, rotated PDF CropBox. The top-left origin is 0,0. In this example, start 10% from the left and 20% from the top on page 1. The zone spans 25% of the page width and 20% of the height. Include the full symbol and its quiet area. Reuse the same QR ID for additional occurrences and keep zone interiors disjoint on each page.
In the workspace preview, open Print Proof, upload the final PDF, and enter the dynamic QR ID and page number. Use the suggested QR IDs if your credential also has qr:read. In the browser, enter Left 10%, Top 20%, Width 25%, and Height 20% for the placement in the API example below. Add one placement per zone and choose Check PDF artwork.
[
{"qrId":"REPLACE_WITH_QR_ID","page":1,"x":0.10,"y":0.20,"width":0.25,"height":0.20}
]
Save the array as placements.json. The preview accepts 1–32 zones, up to 12 PDF pages, and a decoded PDF up to 8 MiB. Each side of the MediaBox and visible CropBox may be up to 14 inches. The local runtime needs Poppler’s pdfinfo and pdftoppm and the bundled QR decoder.
Submit and review the evidence
Use the control origin with print:write to submit, print:read to retrieve the proof, and print:approve to approve it. Keep artwork and generated request files in a restricted directory. Enter your writer key as ARCHURL_PRINT_KEY.
node <<'NODE' > print-proof-request.json
const { readFileSync } = require('node:fs')
const pdfBase64 = readFileSync('final-artwork.pdf').toString('base64')
const placements = JSON.parse(readFileSync('placements.json', 'utf8'))
process.stdout.write(JSON.stringify({ pdfBase64, placements }))
NODE
curl --fail-with-body -sS "$ARCHURL_API_ORIGIN/api/v1/print-proofs" \
-H "Authorization: Bearer $ARCHURL_PRINT_KEY" \
-H "Content-Type: application/json" \
--data-binary @print-proof-request.json
Review the artwork SHA-256, proof digest, expected URL, measured zone and symbol widths, and samples at 150 and 300 DPI. A sample can report match, unreadable, unexpected_qr, or multiple_qrs. The preview requires a readable symbol at least 15 mm wide at the PDF’s native printed size and identifies undersized symbols with sizeWarning. It checks only the submitted zones.
Read the latest state with GET /api/v1/print-proofs/<id>. A ready proof passed the checks. A failed proof needs artwork or placement corrections. A needs_review proof has a saved binding that no longer matches the current routes. The binding can change when a linked QR’s latest or published link revision changes, even before a draft goes live. Submit a new proof after artwork, placement, or routing changes.
For separate review, have an editor submit the proof and an owner review it. In Print Proof, select the saved record, confirm the artwork hash and placement report, and choose Approve exact proof. For the API, send POST /api/v1/print-proofs/<id>/approve with the exact reviewed digest. Keep the receipt with the final artwork. Check physical samples under the intended printing and scanning conditions before production.
GS1 Digital Link preview
The registry supports a defined subset of GS1 Digital Link on owned, verified customer hostnames. Use a GTIN as a 14-digit string with its leading zeroes and a valid GS1 check digit. DNS verification checks hostname control. Confirm the right to use each product identifier independently. GS1 Resolver Standard
Register a product and optional qualifiers
In the workspace preview, open Packaging. Select a saved product record to review its typed destinations and revision history, or choose New product record to enter a verified hostname, GTIN, and optional qualifier. Add the destination types and URLs, choose the default, and save. Only editable fields can change after the identifier is saved.
Use gs1:write for creates and edits and gs1:read for records and history. For the example, replace go.example.com with a verified customer hostname. Use this fixture GTIN for local checks and your authorized identifiers for real packaging.
curl --fail-with-body -sS "$ARCHURL_API_ORIGIN/api/v1/gs1" \
-H "Authorization: Bearer $ARCHURL_GS1_KEY" \
-H "Content-Type: application/json" \
--data '{
"hostname":"go.example.com",
"gtin":"09524000059109",
"title":"Example product",
"defaultType":"gs1:pip",
"links":[
{"type":"gs1:pip","title":"Product information","href":"https://example.com/product"},
{"type":"gs1:instructions","title":"Instructions","href":"https://example.com/instructions"}
]
}'
Use a separate record with lot or serial for a more specific target. Each record accepts one qualifier. A public scan path can contain both, ordered as /01/<gtin>/10/<lot>/21/<serial>. This subset allows 1–20 case-sensitive ASCII letters, digits, dots, hyphens, or underscores per qualifier, with standalone dot and double dot reserved.
Supported types include gs1:pip, gs1:instructions, gs1:nutritionalInfo, gs1:recallStatus, gs1:sustainabilityInfo, and gs1:traceability. Choose one existing type as defaultType. The resolver checks active records by serial, then lot, then GTIN. A type absent on the most specific record can inherit a match from a broader record.
Check the printed address and resolution
The public branded address combines the customer origin and the returned path. Check the deployed scheme and port before printing an address. A normal request redirects to the most specific active default. Query linkType to request a type or a linkset. A linkset groups descriptive links and exposes the effective default. Run these examples after configuring customer DNS and HTTPS.
ARCHURL_PACK_URL="https://go.example.com/01/09524000059109"
curl -sSI "$ARCHURL_PACK_URL"
curl -sSI "$ARCHURL_PACK_URL?linkType=gs1:instructions"
curl -fsS -H "Accept: application/linkset+json" "$ARCHURL_PACK_URL"
Update editable fields with PATCH /api/v1/gs1/<id> and the current expectedRevision. The identifier and path stay fixed while the edit appends a revision. Retrieve history from GET /api/v1/gs1/<id>/history. The preview covers the listed syntax and resolution behavior. Full GS1 conformity, compressed identifiers, and other product-key families are outside this preview.
Client migration and DNS cutover
Inventory and stage
Use a client-authorized export or the provider’s published API. For each item, retain the exact public URL, destination, redirect status and query policy where known, campaign, workspace owner, and any expiry or disable state. Decode samples of published QR artwork and include every scan host and path you find. Keep historical provider totals in a separate inventory with their date range, timezone, and metric definitions.
Group addresses by hostname ownership. A client-controlled domain can be repointed after the receiving resolver is ready. A URL on a vendor-owned shared hostname depends on that vendor continuing to serve it. For those URLs, plan continued forwarding where permitted, a replacement link, or reprinting. Control of a shared hostname remains with its provider.
Compare exact case, percent encoding, trailing slashes, reserved paths, and any root path before importing. Choose who resolves conflicts and review each destination before changing DNS. Inventory any web routes or mail records that share the hostname or zone.
Cut over and verify
- Give the client a change window, decision owner, and rollback criteria. Keep the previous resolver and TLS usable and copy the old DNS values. Freeze writes or reconcile a final export before the change.
- Stage the approved mappings while the old provider still serves public traffic. Publish the TXT ownership proof and arrange routing and a trusted certificate for the exact customer hostname on your own infrastructure. Configure the proxy to preserve validated public hostnames and restrict access to the Node listener.
- Test the new path with the intended HTTPS hostname before cutover. Check representative statuses and destinations, query handling, disabled links, and the exact scan URLs already in circulation. Transfer of the hostname claim requires fresh verification. Before replacing a resolver, check that it can serve each previously printed token.
- Change the authorized DNS record and check independent networks. Compare the return status and destination of every imported URL against the approved mapping. Test representative physical codes.
- If the rollback criteria are met, restore the prior DNS path and check both services while caches expire. Reconcile route edits made during the window before retrying.
CSV import and export
In the workspace preview, open Imports, choose a CSV, review the column mapping, and select Preview CSV. Save the job after reviewing its rows. Open it from Import history to run or resume it and download its results. The API walkthrough below uses the same workflow.
Prepare a file and preview the mapping
Use the control-origin API setup and a workspace key with links:write for preview, submission, and execution. Use links:read to inspect jobs and download exports. Save the example as migration.csv and replace go.example.com with the hostname claimed by the destination workspace.
Branded Domain,Back-half,Long URL,Title
go.example.com,field-guide,https://example.com/guide,"Field guide, 2026"
go.example.com,Open-House,https://example.com/open-house,Open house
Map the column labels exactly. The sample uses separate hostname and slug columns. A source with a single short address can map shortUrl alongside destination. Mapping values can also be 1-based column numbers. A supplied mapping selects only the named fields.
node <<'NODE' > import-preview.json
const { readFileSync } = require('node:fs')
const csv = readFileSync('migration.csv', 'utf8')
const mapping = {
hostname: 'Branded Domain',
slug: 'Back-half',
destination: 'Long URL',
title: 'Title'
}
process.stdout.write(JSON.stringify({ csv, mapping }))
NODE
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/jobs/preview" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @import-preview.json
For an unused, verified hostname, this sample resolves hostname to column 1, slug to 2, destination to 3, and title to 4. Preview reports 2 ready rows with row numbers 2 and 3. Review the mapped hostnames, exact slug casing, destinations, and any issues before submitting. Preview leaves the workspace unchanged. Split larger imports into files of up to 500 data records and 64 columns, with up to 256 KiB of CSV text per file.
Use plain UTF-8 CSV with a header row. CSV quoting supports commas and line breaks in fields. A combined short address requires a single supported path segment. Paths with percent escapes, queries, fragments, extra segments, or trailing slashes need a separate migration plan. Duplicate input addresses and collisions with existing links are reported as row failures. A CSV title is an asset label. Use a destination with the intended campaign query already attached.
Submit, run, and resume
Pick a fresh idempotency key for a new import and keep it with the source file. The request below creates a durable job. Repeating the same request with the same key returns the existing job. Changed input with an already used key returns 409.
node -p 'JSON.stringify({...JSON.parse(require("node:fs").readFileSync("import-preview.json","utf8")), idempotencyKey: "field-guide-cutover-01"})' \
> import-submit.json
ARCHURL_JOB=$(curl -fsS "$ARCHURL_API_ORIGIN/api/v1/jobs" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @import-submit.json)
ARCHURL_JOB_ID=$(node -p 'JSON.parse(process.argv[1]).id' "$ARCHURL_JOB")
curl -fsS -X POST "$ARCHURL_API_ORIGIN/api/v1/jobs/$ARCHURL_JOB_ID/run" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
Inspect the job’s counts and per-row status. Jobs report pending, complete, partial, or failed. Running again resumes pending rows and retries rows marked retryable. A pending claim can be retried after verification. A quota failure can be retried when capacity is available. Transfer or replacement of the original claim requires a new preview and submission for those rows.
For permanent errors, correct the failed source rows and submit them with a fresh key. Successful rows keep their link IDs. Imports create new links and leave existing publications intact. Check the job before retrying after an interruption or an uncertain response.
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/jobs/$ARCHURL_JOB_ID" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
Export results and compare routes
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/jobs/$ARCHURL_JOB_ID/export.csv" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
--output import-results.csv
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/links/export.csv" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
--output workspace-links.csv
The job export contains mapped addresses and row outcomes. The workspace export contains the latest managed link values and the published revision pointer. A managed draft can differ from the public destination, so check actual redirect responses before cutover. Imports preserve eligible hostnames and slugs. The deployment supplies the public scheme and port. Import rows create links. Plan QR token continuity and historical analytics separately.
Reporting after destination changes
Successful public GET requests are eligible for first-party reporting after the redirect is sent. A short link records a click. A dynamic QR URL records a scan. A linked QR records one scan with its QR ID, link ID, and published link revision. A standalone dynamic QR records an event with its QR ID. Use HEAD to check a redirect without counting a visit. Misses and static QR images are excluded.
The report’s revision identifies the publication the resolver used. If /spring sent Monday traffic to a signup page and Friday traffic to a waitlist under different revisions, filter the rows by revision to see the counts for each publication. A publication with routing variants groups them under the same revision. Automated GET requests and previews can contribute to totals. The counts describe requests, and the preview has no unique-visitor metric.
Read the report
In the workspace preview, open Analytics, set the UTC dates, and choose Update report. A key with exports:read and links:read can then use Download analytics CSV to save the daily rows for that report.
A key with links:read can read its workspace report. With no dates, the API uses the current UTC month through today. Custom ranges use inclusive UTC dates and accept up to 366 days per request. Report rows include day, kind, linkId, qrId, revision, and count. The response includes click and scan totals and usage for the current calendar month.
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/analytics" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
- Reporting windows. Free exposes 30 UTC days including today, and Plus exposes 365. The window filters report results. Older aggregates can remain in SQLite. Reports can lag redirects, and a successful redirect still serves when the monthly reporting allowance has been reached or a reporting write fails.
- Imported history. Keep vendor totals labeled with their source, time zone, and methodology. Compare the periods before combining vendor totals with native counts.
The privacy draft describes the data behind these counts.
Report exports and workspace inventory
Use the control origin and a bearer for the workspace you intend to export. Each download is scoped to that workspace. Supply optional inclusive UTC from and to dates. The defaults match the corresponding reports and the workspace’s current plan determines the available history.
In the workspace preview, open Exports and choose a date range. Use Download analytics CSV, Download conversions CSV, or Download workspace JSON when your credential permits that download. Dates apply to report data. The inventory’s assets reflect the current workspace snapshot. In Analytics, a key with conversions:read can also preview conversion aggregates for the selected dates. Each report’s download button requires its export permissions.
GET /api/v1/exports/analytics.csvneedsexports:readandlinks:read. It returns daily click and scan rows withday,kind,linkId,qrId,revision,count.GET /api/v1/exports/conversions.csvneedsexports:readandconversions:read. It returnsday,kind,source,linkId,pageId,revision,currency,count,amountMinor.GET /api/v1/exports/workspace.jsonneedsexports:readplus member-owner authority or bootstrap authority in the bootstrap workspace. Scoped integration keys can download permitted report CSVs. The inventory is reserved for workspace ownership.
The report CSV headers X-ArchURL-Report-From, X-ArchURL-Report-To, and X-ArchURL-Report-Covered describe the effective results. A fully uncovered period returns only the header row. Empty fields represent absent values. Conversion counts and amounts remain grouped by event kind, revision, and currency.
curl --fail-with-body -sS -D analytics-headers.txt \
"$ARCHURL_API_ORIGIN/api/v1/exports/analytics.csv?from=2026-11-01&to=2026-11-26" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
--output archurl-analytics.csv
curl --fail-with-body -sS "$ARCHURL_API_ORIGIN/api/v1/exports/workspace.json" \
-H "Authorization: Bearer $ARCHURL_OWNER_KEY" \
--output archurl-workspace.json
Use an authorized owner credential for ARCHURL_OWNER_KEY. The workspace inventory has schemaVersion set to 1 and contains the workspace, plan and usage, report summaries, managed link records, QR and page metadata, GS1 metadata, and current hostname claims. The inventory includes base destinations for active published links. Draft destinations require links:read. Use the dedicated report CSVs for detailed daily aggregates.
The inventory covers current managed records and omits credentials, invitation and member records, DNS proofs, raw event records, QR tokens and payloads, page blocks, typed GS1 destinations, and detailed routing rules. Keep exported data private and use a separate backup procedure for a restorable instance.
Free and Plus limits
New workspaces use Free. These are the local preview’s enforced limits. See the pricing preview for proposed offers.
- Free. 1 verified custom domain, 500 new links per UTC calendar month, 25 dynamic QR codes, 25,000 tracked events per UTC calendar month, 30 days of report history, and one owner seat.
- Plus. 5 verified custom domains, 5,000 new links per UTC calendar month, 250 dynamic QR codes, 250,000 tracked events per UTC calendar month, 365 days of report history, and three seats including the owner.
The monthly link and event counters start a new period on the first day of each month at 00:00 UTC. The domain limit counts verified customer claims. The dynamic QR limit counts codes on current claims that remain pending or verified. A direct write that exceeds its limit returns 429 with limit_reached. Import jobs report the limit on affected rows. The tracked-event cap limits reporting, and published redirects continue to resolve.
Use GET /api/v1/entitlements with any valid workspace key to see the plan, limits, and link, QR, and domain usage. Read tracked-event usage from the analytics endpoint. The bootstrap operator can assign Free or Plus with PUT /api/v1/workspaces/<id>/plan and a JSON object containing plan set to free or plus.
Invite and manage workspace members
The operator provisions the first owner for a workspace. Owners can then invite editors and viewers. An inviter supplies the recipient email as a label for the membership. The inviter delivers the one-time code privately. Mail delivery and open registration are outside the local workflow.
Choose a role
- Viewer. Reads links, domains, QR codes, campaigns, pages, conversion reports, GS1 records, and print proof reports. A client reviewer can open Packaging and Print Proof to inspect saved records.
- Editor. Adds link and QR writes, campaign proposals, page editing and publication, GS1 writes, and print proof submission. A production editor can save typed packaging destinations and submit final artwork.
- Owner. Adds domain writes, campaign approval and publication, conversion submission, team administration, print approval, continuity export, and report and workspace exports. An owner can sign off a ready proof and issue standby renewals.
Integration keys remain separate from invited accounts. The bootstrap operator retains workspace provisioning, API key issuance, and plan administration. Members receive the scopes of their role.
Send and accept an invitation
In Teams, choose Editor or Viewer and set the recipient’s email and expiration. For example, choose Editor for an authorized artwork submitter. Create the invitation, copy the code, and deliver it privately. To provision the initial owner, the bootstrap operator can open Issue an owner invitation for the current workspace.
- The operator issues an owner invitation with
POST /api/v1/workspaces/<id>/team/owner-invite, supplyingemailand optionallyexpiresInHours. The owner usesPOST /api/v1/team/invitationsto supply a collaborator’semailandroleofeditororviewer. - Copy the returned
inviteTokenonce and share it through a private channel. The default lifetime is 48 hours. An operator can set 1–168 hours. Keep codes and member credentials out of URLs and shared records. - The recipient opens the control-host workspace and chooses Accept invitation. They paste the invitation code and save the member token to their password manager when issued by the app. Use that token in the normal connection form on a future visit.
API clients accept through POST /api/v1/team/invitations/accept with inviteToken and memberToken in the JSON body. Generate the member token as archurl_member_ followed by unpadded base64url encoding of 32 cryptographically random bytes. Keep the same two secrets while retrying an uncertain result. A matching retry returns the existing membership while the invitation and credential remain valid. An unavailable invitation returns 410.
Seats and access recovery
The owner slot is reserved even before onboarding. Plus can admit two collaborators. Pending invitations occupy no seat, and the runtime checks capacity at issuance and acceptance. A Free downgrade suspends collaborators while retaining their account history. An upgrade restores access for collaborators whose credentials remain active. Published routes continue through a plan change.
An owner can revoke a pending invitation or remove a collaborator. Removal also revokes the credential. Reinvite a collaborator to recover access or contact the operator for owner recovery. The operator issues a fresh owner invitation to the same email label. Accepting it replaces the previous owner token and preserves the owner account ID.
Optional Stripe test integration
The local preview supports test-mode subscription reconciliation. It is disabled by default. The operator can assign preview plans directly without configuring Stripe. Public checkout, payments, and paid activation remain pending.
- For a test instance, set
ARCHURL_STRIPE_WEBHOOK_ENABLED=1together withARCHURL_STRIPE_WEBHOOK_SECRET,ARCHURL_STRIPE_TEST_KEY, andARCHURL_STRIPE_PLUS_PRICE_IDS. Use the endpoint signing secret, a Stripe test API key, and a comma-separated list of Plus test price IDs. Keep credentials in your operator secret store. - With the bootstrap bearer, send
PUT /api/v1/workspaces/<id>/stripewith a JSON object containingcustomerIdandsubscriptionIdfor the same test subscription. - Use
POST /api/v1/billing/stripe/webhookon the control origin for thecustomer.subscriptionevent typescreated,updated,deleted,paused, andresumed. Pass the raw request body andStripe-Signatureheader through unchanged. The endpoint checks the signature and timestamp and accepts only test-mode events. Stripe signature verification - Check
GET /api/v1/entitlementsfor the resulting plan. The runtime reads the current subscription from Stripe. An active or trialing test subscription with a matching price qualifies for Plus. Other supported states resolve to Free. Repeated reconciliation of the same applied event leaves the plan unchanged.
The local checks exercised signed test events with an injected Stripe response. An operator should verify delivery on their own test instance before relying on the integration.
REST API quickstart
Download the workspace OpenAPI JSON. The OpenAPI 3.1.2 document describes 58 workspace operations relative to /api/v1. Use your exact control origin when importing it into an API client. It covers workspace operations and leaves public redirects, deployment configuration, and operator-only routes to their respective guides.
Start a local instance
From the project root, use a current Node.js 22 or newer runtime with node:sqlite. Generate a random secret locally and keep it in your secret store. The bootstrap token accepts 32–256 ASCII letters, digits, dots, underscores, tildes, or hyphens. Paste the secret when prompted. Omitting the token leaves bootstrap access disabled.
npm ci
export ARCHURL_PUBLIC_ORIGIN=http://127.0.0.1:3000
printf 'Bootstrap token (input hidden)\n'
read -rs ARCHURL_BOOTSTRAP_TOKEN
export ARCHURL_BOOTSTRAP_TOKEN
npm start
HOST and PORT default to 127.0.0.1 and 3000. The public control origin defaults to http://127.0.0.1 on the listener port. SQLite defaults to data/archurl.sqlite under the working directory. Set ARCHURL_DB_PATH to use another file. The bootstrap workspace defaults to local and ArchURL local workspace. Set ARCHURL_WORKSPACE_ID and ARCHURL_WORKSPACE_NAME when initializing a new instance.
Choose the control origin before initializing its database. The startup check requires the database’s saved origin and control workspace ID to match your configuration. For a hosted instance, configure an HTTPS control origin and arrange TLS and routing on your infrastructure. Preserve the browser’s validated Host all the way to the Node listener. Call the app and API on the control origin and use customer hostnames for published routes.
Connect to the control origin
In a second terminal, enter the same bootstrap key for the local walkthrough or an issued key for the control workspace with the scopes used below. Use the control origin’s exact scheme, hostname, and port. Public short links and scan URLs open without a bearer key.
export ARCHURL_API_ORIGIN=http://127.0.0.1:3000
printf 'API key (input hidden)\n'
read -rs ARCHURL_API_KEY
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/me" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
Check the returned workspace, scopes, and origin before creating assets. The configured operator credential is intended for bootstrap and operator actions. Use a scoped workspace key for routine integrations.
Verify a branded hostname
This step is optional when testing with the control workspace’s default host. To use a hostname you control, set ARCHURL_CUSTOM_HOST to that DNS name and create a claim with a key for the workspace that will own it.
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/domains" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data "$(node -p 'JSON.stringify({hostname: process.argv[1]})' "$ARCHURL_CUSTOM_HOST")"
Publish a TXT record at the exact verification.name with the exact verification.value in the response. The preview uses _archurl.<hostname> and a value beginning archurl-verification=. If your DNS provider appends the zone, enter the relative name needed to produce the returned record name. Set ARCHURL_DOMAIN_ID to the returned id and verify it when the record is visible.
curl -fsS -X POST "$ARCHURL_API_ORIGIN/api/v1/domains/$ARCHURL_DOMAIN_ID/verify" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
The response marks the claim as verified. A missing matching proof returns 409. Routing that hostname to your instance and configuring its HTTPS certificate are separate steps. Customer public URLs use the configured origin’s scheme and port. Use the hostname field on link creation to select the verified host.
Create and list links
ARCHURL_LINK=$(curl -fsS "$ARCHURL_API_ORIGIN/api/v1/links" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data '{"slug":"field-guide","destination":"https://example.com/guide"}')
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/links" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
The creation response is a link object. The list returns an items array. Creation publishes immediately by default. Use a fresh slug if you repeat the example. Slugs use 1–64 ASCII letters, digits, hyphens, or underscores and are case-sensitive. The response contains the stable publicUrl and the current and published revisions. Use PATCH /api/v1/links/<id> with publish: false to save a draft and POST /api/v1/links/<id>/publish to publish it. Use expectedRevision to check that you are updating the revision you reviewed.
Preview a linked dynamic QR code
ARCHURL_LINK_ID=$(node -p 'JSON.parse(process.argv[1]).id' "$ARCHURL_LINK")
ARCHURL_QR=$(curl -fsS "$ARCHURL_API_ORIGIN/api/v1/qr" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data "$(node -p 'JSON.stringify({type: "dynamic", linkId: process.argv[1]})' "$ARCHURL_LINK_ID")")
ARCHURL_QR_IMAGE=$(node -p 'JSON.parse(process.argv[1]).imageUrl' "$ARCHURL_QR")
curl -fsS "$ARCHURL_API_ORIGIN$ARCHURL_QR_IMAGE?format=svg" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
--output archurl-qr.svg
Open archurl-qr.svg to preview the code. The authenticated image route also accepts format=png. In a browser client, fetch that route with the bearer key and use a temporary Blob URL for display. The public scan URL in the response follows the link’s published destination and active state. For a standalone dynamic code, pass destination during creation and use PATCH /api/v1/qr/<id> to change it while keeping the same scan URL.
ARCHURL_SCAN_URL=$(node -p 'JSON.parse(process.argv[1]).publicUrl' "$ARCHURL_QR")
curl -sSI "$ARCHURL_SCAN_URL"
A published route returns 302 with a Location and Cache-Control: no-store. The resolver sends the stored destination as published. Incoming query parameters are excluded from that destination.
Read the response and choose a scope
- Use
links:readandlinks:writefor link operations,domains:readanddomains:writefor hostname operations, andqr:readandqr:writefor QR operations. - Expect
201on creation and200on success for reads and other JSON actions. API failures use{error: {code, message}}. Check400for invalid input,401for credential issues,403for missing scope,404for an unavailable resource, and409for a conflict.
Operations and integrations
The preview includes CSV jobs, report and inventory downloads, and optional signed campaign delivery.
CLI and MCP stdio
Use the scripts in your ArchURL checkout with Node.js 22 or later and the dependencies from npm ci. Configure ARCHURL_API_ORIGIN and a scoped ARCHURL_API_KEY in the process environment. Use the exact control origin and HTTPS for non-loopback deployments. Keep the key in your environment or secret store.
Run the CLI
npm ci
node scripts/archurl.mjs --help
node scripts/archurl.mjs links list
node scripts/archurl.mjs links create --slug spring-draft \
--destination https://example.com/spring
node scripts/archurl.mjs report --from 2026-11-01 --to 2026-11-26
List and report use links:read. Creating a link uses links:write and saves a draft unless you explicitly add --publish. A draft’s public URL starts serving when you publish the revision. Check any existing slug before using the example.
node scripts/archurl.mjs csv preview --file migration.csv
node scripts/archurl.mjs csv import --file migration.csv \
--idempotency-key spring-cutover-01
node scripts/archurl.mjs csv run REPLACE_WITH_JOB_ID
node scripts/archurl.mjs csv export --job REPLACE_WITH_JOB_ID --out import-results.csv
node scripts/archurl.mjs qr download REPLACE_WITH_QR_ID --format svg --out spring.svg
Preview, import submission, and execution use links:write. Submission saves the job. Use csv run or csv import --run to execute eligible rows. For a custom CSV mapping, pass --mapping with a JSON mapping file. CSV export uses links:read and omitting --job selects the managed-link export. QR download uses qr:read and defaults to PNG. Use --format svg for SVG. The CLI creates named output files exclusively and leaves an existing file intact.
Configure a local MCP client
In an MCP client that supports stdio, set the command to node and the argument to the absolute path to scripts/mcp.mjs in the checkout. Supply the ArchURL environment to that subprocess. The server uses newline-delimited UTF-8 JSON-RPC over stdin and stdout and negotiates protocol revision 2025-11-25. MCP stdio transport
The tools are archurl_list_links with an empty input object, archurl_get_report with optional UTC from and to, and archurl_create_draft with slug and destination plus optional hostname and title. The first two need links:read. Draft creation needs links:write and explicitly creates an unpublished revision. Configure a read-scoped key if you only need the two read tools.
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"archurl-example","version":"1"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"archurl_list_links","arguments":{}}}' \
| node scripts/mcp.mjs
The client initializes the process before tool discovery or calls. Let the local MCP client start the subprocess and keep authentication in its process environment. Stdout is reserved for protocol responses. The server allows frames up to 64 KiB, four concurrent tool calls, and 60 starts per minute. MCP initialization lifecycle
Browser capture and sharing
Load the Chromium extension
Start your instance. In Chromium or Chrome, open chrome://extensions, enable Developer mode, and use Load unpacked to select the checkout’s extension directory. The extension defaults to http://127.0.0.1:3000. Open Workspace origin and save the exact control origin to use another instance. The field accepts HTTPS and HTTP on localhost, 127.0.0.1, or [::1], with an optional port. Chrome extension loading instructions
The browser capture extension takes the active tab’s HTTP or HTTPS address when you invoke its action. It opens the configured control host’s workspace in a new tab and passes the destination in #new=. The workspace removes that fragment from the address and holds the validated destination in tab memory.
Use the ArchURL toolbar action and check the Destination URL field. Paste a URL if the browser cannot supply the active tab’s address. Choose Open draft. Connect with links:write to review the destination in the link creation form. If an editor is already open, choose Review captured link. Opening the form makes no create request. Review the address and choose Publish link when you intend to publish. The browser handoff carries the destination URL alone.
Share a short address
Share is available when the browser provides Web Share and the link’s latest revision is active and published. Share sends the short address to the browser’s native share interface. Use Copy when Share is unavailable. The app also falls back to copying when the browser cannot share the address. Closing the native share sheet cancels the action. Web Share specification
Campaign releases and rollback
A release proposes changes to 1–50 distinct existing links in the same workspace. It can change their destinations, titles, and routing in one publication. Their short addresses stay stable. Linked dynamic QR URLs follow each link’s approved publication. Standalone dynamic QR codes and landing pages have separate workflows.
Work in Campaigns
- Open the workspace preview and select Campaigns. Connect with
campaigns:readto open saved releases. To create a proposal, addcampaigns:writeandlinks:readto the editing key. - Create or choose a campaign, select New release, and add existing links. Review each link’s latest and published revisions. Enter its destination and title. The Routing rules field accepts the routing object in the example below.
- Save the proposal. Open View exact proposal JSON and compare the before and after values and digest. Use Simulate routing to check a UTC time, traffic bucket, and any device, language, or country inputs. Save a new proposal if the exact changes need editing.
- Open the same saved release with a key that has
campaigns:readandcampaigns:approveto confirm and approve its digest. Usecampaigns:readandcampaigns:publishto publish the approved batch or roll back a published release. Keep the receipts and review any conflicts before starting another proposal.
Create and inspect a proposal with the API
Use the control origin setup. In this example ARCHURL_API_KEY has links:read and campaigns:read and campaigns:write. Use GET /api/v1/links to get the link ID, latest revision, and publishedRevision. Use an active link on a current verified claim.
ARCHURL_CAMPAIGN=$(curl -fsS "$ARCHURL_API_ORIGIN/api/v1/campaigns" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data '{"name":"Spring campaign"}')
ARCHURL_CAMPAIGN_ID=$(node -p 'JSON.parse(process.argv[1]).id' "$ARCHURL_CAMPAIGN")
ARCHURL_RELEASES_URL="$ARCHURL_API_ORIGIN/api/v1/campaigns/$ARCHURL_CAMPAIGN_ID/releases"
Save the example as campaign-release.json. Replace the link ID and both revision values with the ones you reviewed. Explicitly use null for a link that is still an unpublished draft. Include the title in each proposal item.
{
"links": [{
"linkId": "REPLACE_WITH_LINK_ID",
"expectedLatestRevision": 1,
"expectedPublishedRevision": 1,
"destination": "https://example.com/spring",
"title": "Spring campaign",
"routing": {
"rules": [{
"when": {"devices": ["mobile"], "languages": ["en"]},
"variants": [
{"destination": "https://example.com/spring/mobile", "weight": 7500},
{"destination": "https://example.com/spring/mobile-alt", "weight": 2500}
]
}]
}
}]
}
ARCHURL_RELEASE=$(curl --fail-with-body -sS "$ARCHURL_RELEASES_URL" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @campaign-release.json)
ARCHURL_RELEASE_ID=$(node -p 'JSON.parse(process.argv[1]).id' "$ARCHURL_RELEASE")
ARCHURL_RELEASE_URL="$ARCHURL_RELEASES_URL/$ARCHURL_RELEASE_ID"
curl -fsS "$ARCHURL_RELEASE_URL" \
-H "Authorization: Bearer $ARCHURL_API_KEY"
The response contains the normalized proposal, its digest, and the status and receipts. The digest is the lowercase hexadecimal SHA-256 of the server’s stored UTF-8 JSON snapshot. It binds the workspace, campaign, link IDs, captured claim IDs, both expected revision pointers, and the normalized before and after values. Review and use the server’s digest for this exact proposal. Save a new proposal to change any proposed value.
Simulate and approve the exact digest
With campaigns:read, simulate up to 128 contexts against the stored before and after values. Each context has an ISO UTC at and accepts device, language, country, and bucket. The result includes the same digest and gives the selected destinations and rule and variant indices. Null indices indicate fallback. An unpublished before-state returns null.
curl -fsS "$ARCHURL_RELEASE_URL/simulate" \
-H "Authorization: Bearer $ARCHURL_API_KEY" \
-H "Content-Type: application/json" \
--data '{"contexts":[
{"at":"2026-11-26T15:00:00Z","device":"mobile","language":"en-US","bucket":7499},
{"at":"2026-11-26T15:00:00Z","device":"mobile","language":"en-US","bucket":7500},
{"at":"2026-11-26T15:00:00Z","device":"desktop","language":"en-US","bucket":0}
]}'
Once you have reviewed the snapshot and simulation, use a key with campaigns:approve for approval and a key with campaigns:publish for publish or rollback. Set ARCHURL_APPROVE_KEY and ARCHURL_PUBLISH_KEY from your secret store. In an isolated local preview the operator bearer has all campaign scopes.
ARCHURL_DIGEST_BODY=$(node -p 'JSON.stringify({digest:JSON.parse(process.argv[1]).digest})' \
"$ARCHURL_RELEASE")
curl --fail-with-body -sS "$ARCHURL_RELEASE_URL/approve" \
-H "Authorization: Bearer $ARCHURL_APPROVE_KEY" \
-H "Content-Type: application/json" --data "$ARCHURL_DIGEST_BODY"
curl --fail-with-body -sS "$ARCHURL_RELEASE_URL/publish" \
-H "Authorization: Bearer $ARCHURL_PUBLISH_KEY" \
-H "Content-Type: application/json" --data "$ARCHURL_DIGEST_BODY"
Publishing adds a fresh revision to every link in one local SQLite transaction. The receipt records the actor, digest, UTC timestamp, and before and after revision pointers. Test the public links and any printed QR placements after the transaction. External reachability and propagation depend on the deployment.
Roll back and interpret conflicts
curl --fail-with-body -sS "$ARCHURL_RELEASE_URL/rollback" \
-H "Authorization: Bearer $ARCHURL_PUBLISH_KEY" \
-H "Content-Type: application/json" --data "$ARCHURL_DIGEST_BODY"
Rollback compares both current pointers with the publication receipt for every link. It restores the earlier public values and any earlier draft by appending fresh revisions. A link that was previously unpublished returns to an unpublished state. Save the rollback receipt and verify live routes. Repeating an action with its exact digest returns its original receipt. To check the current state, read the release’s status and all receipts.
A 409 can indicate a stale digest, an invalid action for the release state, or a link conflict. A release_conflict lists affected link IDs and expected and actual revision numbers in error.details.conflicts.
revision_changedmeans a draft or publication changed after the snapshot. Refresh the links and review a new proposal for any remaining changes.claim_unavailablemeans the original hostname claim is no longer current and verified for the workspace. Recheck ownership and public routes.link_disabledmeans the latest or published revision is inactive. Resolve that decision with the owner before proposing changes.link_missingmeans an expected link is unavailable to the release. Recheck the workspace and affected assets.
A conflict leaves the batch and its receipts unchanged. If a later edit blocks rollback, review those later values before preparing a new corrective release.
Weighted routing and geography
Rules run in order and the first matching rule wins. Within a predicate list any value can match. A rule with multiple predicates requires all of them to match. Supported predicates cover device, language, country, and a UTC time window with an inclusive start and exclusive end. Missing attributes fail a predicate that requires them. The link’s base destination is the fallback when no rule matches.
Each rule’s integer weights sum to 10,000. In the example, mobile requests matching English use buckets 0–7499 for /spring/mobile and 7500–9999 for /spring/mobile-alt. A desktop case uses the base /spring destination. Simulation with specific buckets lets you verify the boundaries. The public resolver draws a bucket for each evaluation, so repeat requests can select different variants.
The resolver uses the server clock and derives device and language hints from User-Agent and Accept-Language. Country is unknown by default. A deployment can supply a trusted, server-side countryFromRequest adapter. Authenticate the adapter’s data source and prevent direct origin traffic from supplying trusted geo input. Forwarded country headers and public URL parameters supply no country by default. An explicit country in a simulation tests the rule for that case.
Linked QR redirects use the same published rules. First-party reports group routed requests by the published revision. Analytics leave out the chosen variant, device, language, country, and bucket. When an ordinary link edit changes the base destination, its new revision starts without the earlier rules. An edit that keeps the base destination carries those rules forward.
Landing pages
Landing pages use the stable path /p/<slug> on a current verified hostname owned by the workspace. Use a key with pages:read to list or inspect pages and pages:write to create, edit, publish, or discard a draft.
In the workspace preview, open Pages with both scopes to choose a saved page or create one. Add or reorder blocks and use Preview content to inspect the result. Save draft records a revision. Publish draft makes that revision live, and Discard draft clears it while keeping the existing publication.
Create a draft and publish a specific revision
With the default local control origin, use 127.0.0.1 as the hostname. For a branded page, provide the verified hostname without its port. Save the workspace key as ARCHURL_PAGE_KEY.
ARCHURL_PAGE=$(curl -fsS "$ARCHURL_API_ORIGIN/api/v1/pages" \
-H "Authorization: Bearer $ARCHURL_PAGE_KEY" \
-H "Content-Type: application/json" \
--data '{
"hostname":"127.0.0.1",
"slug":"spring",
"title":"Spring campaign",
"brand":"Example",
"blocks":[
{"type":"text","text":"Registration is open."},
{"type":"link","label":"Sign up","href":"https://example.com/signup"}
]
}')
ARCHURL_PAGE_ID=$(node -p 'JSON.parse(process.argv[1]).id' "$ARCHURL_PAGE")
ARCHURL_PAGE_API="$ARCHURL_API_ORIGIN/api/v1/pages/$ARCHURL_PAGE_ID"
ARCHURL_PAGE_PUBLIC_PATH=$(node -p 'JSON.parse(process.argv[1]).path' "$ARCHURL_PAGE")
Review the new draft before publishing. Its revision is the latest allocated number. Its draftRevision identifies the draft, and publishedRevision identifies what the public receives. The first draft is revision 1 and its public path returns 404 until publication.
ARCHURL_PAGE_DRAFT=$(node -p 'JSON.stringify({expectedRevision:JSON.parse(process.argv[1]).draftRevision})' \
"$ARCHURL_PAGE")
curl --fail-with-body -sS "$ARCHURL_PAGE_API/publish" \
-H "Authorization: Bearer $ARCHURL_PAGE_KEY" \
-H "Content-Type: application/json" --data "$ARCHURL_PAGE_DRAFT"
curl -fsS "$ARCHURL_API_ORIGIN$ARCHURL_PAGE_PUBLIC_PATH"
The final request checks the control-host example. For a branded page, open the returned path on its assigned hostname using the deployed scheme and port. The public route uses the published revision. Changes to its hostname claim can make the old path unavailable.
Edit, preview, or discard
Use PATCH /api/v1/pages/<id> with the latest revision as expectedRevision and at least one content field. Each edit creates a new draft. Use the exact draftRevision with /publish or /cancel. Discarding a draft leaves the existing publication in place. A 409 means you should reload the page record and review its current revisions before retrying.
Pages support up to 20 ordered text, link, or image blocks. A heading defaults to the title on creation. Use labels and alt text that describe links and images. The runtime escapes the content and renders its own HTML. Provide HTTP(S) URLs for links and images. A visitor’s browser can fetch a configured image directly from its provider.
Conversion events and reports
A trusted server-side integration or authorized operator can submit a lead, signup, sale, or refund. An event requires consent: true and an ISO timestamp with a timezone offset. Obtain and track the appropriate permission before submitting an event. A page view, link click, or QR scan alone creates no conversion event.
Use conversions:write to submit, and use conversions:read to report. Set ARCHURL_CONVERSION_KEY and ARCHURL_CONVERSION_READ_KEY with the corresponding credentials. Keep both credentials out of public pages.
Submit a consented event
Save the example as conversion.json. Supply a stable opaque eventId, the actual event time, and the page ID and published revision you want to attribute. Use one asset ID. For a link, provide linkId and its current active published revision. For a page, an explicit revision can refer to an earlier publication. Omit the page revision to use its current publication.
{
"eventId": "spring-sale-k8v2",
"kind": "sale",
"source": "integrated",
"consent": true,
"occurredAt": "2026-11-26T09:00:00-06:00",
"pageId": "REPLACE_WITH_PAGE_ID",
"revision": 1,
"amountMinor": 2500,
"currency": "USD"
}
curl --fail-with-body -sS "$ARCHURL_API_ORIGIN/api/v1/conversions" \
-H "Authorization: Bearer $ARCHURL_CONVERSION_KEY" \
-H "Content-Type: application/json" --data-binary @conversion.json
source defaults to manual. Use integrated for a submission from your integration. Sales and refunds may carry a nonnegative integer amount in minor currency units and a three-letter uppercase currency code. The example records 2,500 US cents. Keep contact details, visitor IDs, and other tracking fields out of the payload.
Both a new event and a matching retry return 200, with status recorded or duplicate. Reuse the same opaque ID and event contents when retrying a delivery. A changed event with the same ID in that workspace returns 409. A matching replay stays a duplicate after a later publication. A new event needs an eligible asset and revision at ingestion.
Read aggregate reports
curl -fsS "$ARCHURL_API_ORIGIN/api/v1/conversions?from=2026-11-26&to=2026-11-26" \
-H "Authorization: Bearer $ARCHURL_CONVERSION_READ_KEY"
Dates are inclusive UTC days. The defaults are the start of the current UTC month through today. A request accepts up to 366 days and follows the workspace’s 30-day or 365-day report window. If the whole range predates that window, covered is false. The report groups counts by day, kind, source, asset, revision, and currency. Sale and refund amounts are separate totals in minor units. Earlier stored counts keep their original revision attribution.
Signed campaign delivery
An operator can enable signed outbound delivery for one workspace on an instance. A dedicated worker sends new campaign publication and rollback events to a fixed HTTPS receiver. Delivery starts disabled and runs in its own process. Start the operator worker once for the intended workspace and endpoint before the releases you want it to capture.
Start the operator worker
Use an existing database migrated to the matching runtime schema and a dedicated secret of at least 32 UTF-8 bytes. Configure ARCHURL_DB_PATH, ARCHURL_DELIVERY_WORKSPACE_ID, ARCHURL_DELIVERY_URL, and ARCHURL_DELIVERY_HMAC_SECRET in the worker environment. Use an HTTPS URL supplied by the operator, with no credentials or fragment. Start the worker separately from the web runtime.
node scripts/delivery-worker.mjs
The first start binds that workspace and endpoint to the database. Delivery captures eligible receipts created after binding. Stopping the worker pauses sends while new eligible receipts continue to queue. Resume with the same workspace and endpoint. The worker rejects a changed workspace or endpoint for an existing binding. You can rotate the signing secret while preserving the binding. Coordinate the key change with the receiver.
Verify and acknowledge at the receiver
The worker sends POST with Content-Type: application/json. The body carries version set to 1, eventId, type, workspaceId, campaignId, releaseId, and occurredAt with the receipt’s UTC time. Types are campaign.published and campaign.rolled_back. Approval alone creates no delivery event.
Read X-ArchURL-Event-Id, X-ArchURL-Timestamp in Unix seconds, and X-ArchURL-Signature. Check timestamp freshness and verify the lowercase HMAC-SHA256 hex after v1=. The signed bytes are the UTF-8 timestamp, a dot, the event ID, a dot, and the exact raw body. Deduplicate by event ID. Retries keep the event ID and body stable and use a fresh attempt timestamp.
A 2xx response acknowledges delivery. The worker retries timeouts, transport errors, 408, 429, and 5xx within its bounded retry policy. Other HTTP statuses end the attempt sequence. The worker leaves redirects unfollowed. Defaults are six attempts, a five-second request deadline, a 30-second lease, and exponential retry delays from five seconds up to five minutes.
Deliveries can repeat or arrive out of order, and exhausted events may remain undelivered. The local worker’s queue and lease handling are separate from public redirects. Verify the receiver, network access, key rotation, and monitoring on the intended deployment before relying on delivery.
Continuity and offboarding
The local preview can issue an Ed25519-signed snapshot for a standby resolver you operate independently. It covers published short links and eligible dynamic QR routes on current verified customer hostnames. It carries supported routing rules and inactive routes as disable records. The format covers redirects. Plan separately for pages, GS1 routes, the control host, analytics, drafts, and static payloads.
Configure an issuer and pin its public key
Configure the ArchURL runtime with ARCHURL_CONTINUITY_SIGNING_KEY_FILE pointing to an Ed25519 PKCS#8 private PEM outside the repository. Restrict the file to the issuer. With a workspace key scoped to continuity:export, read GET /api/v1/continuity/key for the SPKI PEM and its key ID. Pin the workspace ID and public key on the standby using an authenticated channel independent of the snapshot download. The key ID is the SHA-256 of the public key’s DER SPKI.
Issue and accept a signed renewal
In the workspace’s Continuity view, download the public key through the trusted key-distribution process. Enter the validity in seconds, choose Issue signed snapshot, and download the signed JSON. Repeat these steps for each renewal.
This example issues an edition valid for one hour. Each issuance advances the workspace edition. Choose a TTL of 1–86,400 seconds on the issuer and schedule renewals before expiry. Keep the exported envelope private because it can contain destination URLs and scan tokens.
umask 077
curl --fail-with-body -sS "$ARCHURL_API_ORIGIN/api/v1/continuity/snapshots" \
-H "Authorization: Bearer $ARCHURL_CONTINUITY_KEY" \
-H "Content-Type: application/json" \
--data '{"ttlSeconds":3600}' \
--output snapshot.json
Transfer the signed file to the customer standby. In its shell, set the independent state database, workspace ID, permitted hosts, and pinned public-key file. The same accept command installs the first edition and each renewal.
export ARCHURL_STANDBY_DB_PATH=./standby-state.sqlite
export ARCHURL_STANDBY_WORKSPACE_ID=REPLACE_WITH_WORKSPACE_ID
export ARCHURL_STANDBY_HOSTS=go.example.com
export ARCHURL_STANDBY_PUBLIC_KEY_FILE=./pinned-public.pem
node scripts/standby.mjs accept snapshot.json
node scripts/standby.mjs serve
The listener defaults to 127.0.0.1:3001. An accepted edition replaces the whole table of routes. The standby checks the signer, signature, digest, workspace, validity window, and monotonically increasing edition. Preserve its SQLite state and the issuer’s edition counter when restarting or restoring. On expiry, the standby returns 503 for allowed hosts. Disabled and missing routes return 404 with no redirect. It serves locally without contacting the issuer.
Rehearse production cutover
Maintain an independent clock, DNS, certificates, proxy, and a way to deliver renewed editions. Preserve the original validated Host header through the customer’s TLS proxy. Test GET and HEAD on the exact short and QR URLs before switching DNS. Verify how the deployment handles optional country routing, stale editions, and restoring the primary.
Deliver an emergency disable as a new signed full edition. When delivery is unavailable, the last accepted edition can serve until its expiry. Rehearse that delay and choose a TTL your renewal process can sustain. For key rotation, distribute the new pinned key independently and accept a higher edition signed by it using the existing state database. Keep a replacement plan for vendor-owned URLs.