v2 Account

Link device to the current session's account (device-signed + session)

Device-signed (ES256) AND session-authenticated (cookie). Links the VERIFIED device to the account of the CURRENT web session directly (no OAuth round-trip) and migrates the device's anonymous jobs to that account. Idempotent. The web app calls this on /app/ load in account mode to self-heal a "session present but device unlinked" desync (a sign-in that skipped the device-link ticket, or a checkout-intent session) — otherwise device-signed job creation silently lands on the anonymous device and never appears in the account-scoped list. Both proofs are required: the device signature proves the device; the session proves the account.

post/api/v2/account/link/attach

Request

  • Base URL: https://pdf2md.dev
  • URL: https://pdf2md.dev/api/v2/account/link/attach
  • Auth: HTTP bearer

Response

Linked

linkedboolean required

true — the device is linked to an account

account_idstring uuid
emailstring
display_namestring nullable
avatar_urlstring nullable
tier'anonymous' | 'free' | 'lifetime' | 'builder' | 'pro' | 'business' | 'enterprise'

EP-069: lifetime is the one-time unlock, ranked BETWEEN free and builder — it raises the interactive limits and carries 600 pages/month, but grants no API keys, hosted MCP, webhooks or batch, so a subscription is genuinely more and its holder may still buy one.

affected_jobsinteger

How many jobs were re-attached/returned on link/unlink

slots_in_useinteger nullable

EP-025-T2 (additive): active jobs currently owned by the linked account.

Example response

{
  "limits": {
    "max_active_slots": 3,
    "max_concurrent_conversions": 1,
    "max_file_size_bytes": 10485760,
    "processing_soft_budget_sec": 900,
    "processing_timeout_sec": 1200,
    "ready_ttl_sec": 3600,
    "priority_base": 100
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.