Files

Import a PDF from an export URL

Create a file by server-side download of an allowlisted HTTPS export URL (e.g. a Canva design export). PDF only, redirect-free, capped at your plan's size; uses a file slot (403 when full). Returns uuid, shortId, shareUrl and an optional advisory palette. Scope files:write.

The response may include palette - colour swatches extracted from the imported document during the import (see the Palette schema). The palette is advisory and best-effort: extraction reads the first page's embedded images with a short time budget, so vector-only documents (and any extraction failure or timeout) simply omit the field. A missing palette is normal, never an error, and never fails the import.

Canva design lane (republish-in-place): sending a verified canvaUserToken AND designToken pair binds the import to the Canva design. When a live file of yours is already bound to that design, the import REPLACES its bytes in place - same UUID, short id, QR and readership history - and the response reports republished: true with the new contentVersion. Works on every plan (unlike the /content endpoint), and a republish consumes no file-limit slot; the owner can switch the lane off per file (canvaUpdatesEnabled) or sever it permanently (detachCanvaDesign) via the settings endpoint. A designToken WITHOUT a valid canvaUserToken is ignored (the import proceeds as a plain create), as is any token that fails verification - a bad optional token never fails a publish.

post/api/v1/files/import

Request

  • Base URL: https://everypage.co
  • URL: https://everypage.co/api/v1/files/import
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://everypage.co/oauth/authorize, token URL https://everypage.co/oauth/token, scopes: files:write)

Request body

urlstring uri required

Plain HTTPS export URL on the import host allowlist.

filenamestring

Display name for the new file. Defaults to design.pdf.

canvaUserTokenstring

Canva Apps SDK user JWT (verified against Canva's JWKS). Required for the design lane; travels in the body because the Authorization header already carries your EveryPage credential.

designTokenstring

Canva design token (contentMetadata.designToken) binding the publish to a design. Ignored unless canvaUserToken is present and verifies.

Response

Imported (or republished in place - see republished)

uuidstring uuid
shortIdstring
shareUrlstring
republishedboolean

True when the Canva design lane replaced an existing file's bytes in place (the uuid/shortId are the EXISTING link's); false/absent on a plain create.

contentVersioninteger

The file's content version after a republish (present only when republished is true; increments on every in-place replacement).

palettestring[]

Colour palette extracted from the document at import time: hex swatches ("#rrggbb"), dominant colour first, at most 6. ADVISORY ONLY - extraction is best-effort (first-page embedded raster images, short time budget), so the field is simply absent for vector-only documents, for files uploaded through non-import paths, for files created before the feature, and whenever extraction fails or times out. Absence is normal, never an error; use the palette for theming (e.g. styling a share card), never for logic.

Example response

{
  "shortId": "aB3xY9kQ2mZ7",
  "shareUrl": "https://everypage.co/aB3xY9kQ2mZ7",
  "palette": [
    "#1a2b3c"
  ]
}

Changes

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