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".Which links are supported
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.
Capturing a web page
A capture runs while you wait and can take up to two minutes, so set a generous client timeout. Request: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.
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 Poll every couple of seconds while
statusUrl from the previous response.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:frameId back as figmaFrameId when submitting the link.
Importing from Google Drive or Docs
Submit adrive.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 Poll every couple of seconds while
statusUrl exactly as returned, including its query string.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.Creating a promotion from a captured link
Identical to a file upload. The capture is just anotheruploadId:
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 acrossPOST /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
Is the page captured again when I create the promotion?
Is the page captured again when I create the promotion?
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.Can I reuse one capture across several promotions?
Can I reuse one capture across several promotions?
Yes. The returned upload ID behaves like any other — reference it from as many promotions or versions as you like.
Why is a screenshot immediate but Figma and Google Drive are not?
Why is a screenshot immediate but Figma and Google Drive are not?
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.Which Google files can I import?
Which Google files can I import?
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.Can I import a single tab of a Google Doc?
Can I import a single tab of a Google Doc?
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.My Figma frame fails as too large. Why?
My Figma frame fails as too large. Why?
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.
Can I submit a PDF by URL?
Can I submit a PDF by URL?
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.