Skip to main content
Not everything you need reviewed exists as a file. A landing page, a live promotion, a design still in Figma, or a document in Google Drive can be submitted as a link. Adclear captures it and hands back an uploadId, which you use exactly like one from the File API.
Create the promotion with the fileFormat value from the capture response, not a fixed one. A screenshot and a Figma frame are always "image", but a Google Drive file can be any supported format, and native Google Docs, Sheets and Slides arrive as "pdf".
Figma files and Google files must be shared with anyone with the link. Adclear cannot read private files submitted through the API, because the API has no connected Figma or Google account of its own.
Always poll the statusUrl returned by POST /v1/links exactly as given. It carries the information the poll needs to find your import. Building the URL yourself can return a misleading completed before the file has finished importing.

Capturing a web page

A capture runs while you wait and can take up to two minutes, so set a generous client timeout. Request:
Response:
previewUrl is a time-limited signed link for previewing the capture. Don’t store it — it expires. The uploadId does not.

Capturing a Figma frame

A Figma link identifies a file; Adclear needs to know which frame to import. Provide it either way:
  • Paste a frame link — in Figma, right-click a frame and choose Copy link to selection. The URL carries a node-id, which Adclear reads automatically.
  • Or send the file URL plus an explicit figmaFrameId, discovered with frame lookup.
Sending a file-level URL with no frame returns 400, pointing you at the frame lookup endpoint.
1

Start the import

Request:
Response:
Unlike a web page, a Figma import runs in the background and returns 202.
2

Poll until it is ready

Request the statusUrl from the previous response.
Poll every couple of seconds while status is processing. When it reaches completed, use finalUploadId when creating the promotion. It can differ from the ID you polled. On failed, errorMessage explains why.

Discovering frames

To let someone choose a frame, list what the file contains: Request:
Response:
Pass any frameId back as figmaFrameId when submitting the link.

Importing from Google Drive or Docs

Submit a drive.google.com or docs.google.com link and Adclear downloads the file itself, rather than screenshotting the Drive preview page. Native Google Docs, Sheets and Slides are converted to PDF. Images, video, audio and PDFs are imported in their original format. Plain text files (.txt) are the one exception: they return 422. A text promotion takes its content inline rather than as an upload, so fetch the text yourself and pass it as content with "fileFormat": "text". See Promotions. The file must be shared with anyone with the link. The API has no connected Google account, so a private file, or one shared only with named people, cannot be reached. See Which Google files can I import? below.
1

Start the import

Request:
Response:
Note the fileFormat here is "pdf", because the link points at a native Google Doc. Read it from the response rather than assuming a value.
2

Poll until it is ready

Request the statusUrl exactly as returned, including its query string.
Poll every couple of seconds while status is processing. Large files take longer, since Adclear downloads the whole file. For a Google import finalUploadId matches the ID you polled, but read it from the response so the same code works for every link type.
Importing one tab of a multi-tab Google Doc is not yet available through the API. If you share a link that already points at a tab (the URL contains ?tab=), that tab is imported on its own. Otherwise the whole document is imported.
Identical to a file upload. The capture is just another uploadId:
Use the fileFormat from the capture response. For a screenshot or a Figma frame that is always "image", so the example above holds. For a Google Drive file it varies, and a native Google Doc needs "fileFormat": "pdf". Wait for status to reach completed before creating the promotion. An upload that is still importing has no file behind it yet. From here, trigger an evaluation as usual.
The submitted URL is not stored on the promotion. To keep it alongside the review, pass it in metadata — it is echoed back in webhook payloads.

Rate limits

Captures call third-party services, so they are limited more tightly than the rest of the API: 10 requests per minute per API key across POST /v1/links and POST /v1/links/figma/frames, whatever kind of link you submit. Polling GET /v1/links/{uploadId} is not affected and falls under the standard 60/minute limit. A 429 includes a Retry-After header. See Errors & rate limits.

Common error scenarios

For cross-cutting errors (401, 403, 429, 502), see Errors & rate limits.

Frequently asked questions

No. The capture happens once, when you call POST /v1/links. The promotion references that stored image, so a later change to the page does not alter what was reviewed.
Yes. The returned upload ID behaves like any other — reference it from as many promotions or versions as you like.
A screenshot is captured inline while the request is open. Figma frames and Google Drive files are fetched from their provider and processed in the background, so they return 202 with a statusUrl to poll.
Any file shared with anyone with the link: images, video, audio and PDFs come across in their original format, and native Google Docs, Sheets and Slides are converted to PDF. Plain text files return 422, because a text promotion takes its content inline rather than as an upload.Private files, and files shared only with named people, cannot be imported. Adclear’s API has no Google account of its own to authenticate as, so it can only reach files that are public to anyone holding the link. To review a private file, download it and upload it via the File API.
Only by sharing a link that already points at the tab. Google puts a ?tab= parameter in the URL when you copy a link to a specific tab, and Adclear imports just that tab. Choosing a tab through the API is not supported yet, so any other Docs link imports the whole document.
Very large frames (over roughly 6 megapixels) need a conversion step that isn’t available through the API yet. Export the frame as an image and upload it via the File API, or import it through the Adclear app.
A link to a PDF is captured as a screenshot of the rendered page, not downloaded as a PDF. To have the PDF itself reviewed, fetch it yourself and upload it via the File API.