Requests and identity
Guest publishing needs no bearer token. Account operations accept a scoped Linkifact API key. Browser sessions use secure host-only cookies on the app and API origins.
multipart/form-data
Artifact and collection routes
/v1/artifactsPublish JSON or multipart HTML; auth optional
/v1/artifactsList the current account's artifacts
/v1/artifacts/{id}Read metadata as owner or guest manager
/v1/artifacts/{id}Delete as owner or guest manager
/v1/artifacts/{id}/claimClaim a guest artifact into the current account
/v1/artifacts/{id}/versionsPublish an authenticated version with If-Match
/v1/collectionsList the current account's collections
/v1/collectionsCreate a collection
/v1/collections/{id}Read an owned collection and its ordered items
/v1/collections/{id}Rename an owned collection
/v1/collections/{id}Delete a collection, not its artifacts
/v1/collections/{id}/itemsAdd or reposition an owned artifact
/v1/collections/{id}/items/{artifactId}Remove an item, not its artifact
/v1/api-keysList API key metadata for the current browser session
/v1/api-keysCreate a scoped API key; the token is returned once
/v1/api-keys/{id}Revoke an API key from the current browser session
/v1/abuse-reportsReport an artifact without loading it on the trusted origin
POST /v1/artifacts
Send JSON with html and optional title, or multipart with a file part and optional title. Use a unique idempotency key for safe retries.
POST /v1/artifacts HTTP/1.1
Host: api.linkifact.com
Content-Type: application/json
Idempotency-Key: 018f-demo
{
"title": "Quarterly model",
"html": "<!doctype html>..."
}Guest response fields
idInternal artifact identifier used by management endpoints.
urlPublic, unlisted artifact URL. Anyone with this bearer link can view.
expires_atExact instant the public URL stops serving the artifact.
manage_urlSecret capability URL used to delete or claim. Returned once.
Keep the fragment secret
The management token lives after #, so browsers do not send it in the page request or referrer. The account app extracts it and passes it only to the API:
X-Linkifact-Manage-Token: <fragment-secret>Use this header on artifact GET, DELETE, and claim requests. The raw token cannot be recovered by Linkifact after the initial response.
Optimistic, immutable versions
Authenticated artifacts retain a stable public URL. Send the current version in If-Match when publishing a new version. A stale value returns 409 Conflict; fetch fresh metadata before retrying.
Use the narrowest credential
Browser account routes use a secure session cookie. Agent clients send Authorization: Bearer lfk_…. Reading artifact metadata requires artifacts:read; publishing versions and deleting require artifacts:write; collection mutations require collections:write. API-key create, list, and revoke routes accept browser sessions only, so an API key cannot mint another key.
Create requests use { "name": "Codex on laptop", "scopes": ["artifacts:read", "artifacts:write"] }. Save the returned token immediately; only its hash is retained.
Assemble an unlisted collection
Create with { "name": "Release demos" }. Add or reposition an active owned artifact with { "artifact_id": "…", "position": 0 }; omit position to append. Collection responses include a public url on c.linkifactpages.com. That platform-rendered page is unlisted and noindex, but anyone with its URL can view it.
Report without rendering
Send artifact_id, a reason of malware, phishing, harassment, copyright, privacy, or other, plus optional bounded details and contact. Browser reports also send the configured Turnstile token. A successful submission returns 201 with an opaque report ID and open status.
Stable codes, useful request IDs
Non-2xx responses use one envelope. Branch on code, show message, and include request_id when reporting a problem.
{
"error": {
"code": "html_validation_failed",
"message": "The HTML did not pass publication checks.",
"request_id": "req_01J...",
"details": {
"issues": [{ "code": "external_url", "message": "..." }]
}
}
}Documented error families cover authentication, validation, quota, expiry, conflict, plan limits, quarantine, and temporarily disabled guest publishing.
Retry deliberately
Retry 429 after the response's Retry-After delay. Retry transient 5xx failures with exponential backoff and the same idempotency key. Do not retry policy violations or size errors unchanged.