POST
/
v1
/
screenshot
/
sync
curl --request POST \
  --url https://api.doczilla.app/v1/screenshot/sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "page": {
    "url": "<string>",
    "html": "<string>",
    "htmlTemplate": "<string>",
    "templateData": {},
    "waitUntil": "auto",
    "headers": {
      "x-foo": "bar"
    },
    "adblock": true,
    "javascript": true,
    "cookies": [
      {
        "name": "<string>",
        "value": "<string>",
        "domain": "<string>",
        "url": "<string>",
        "path": "<string>",
        "secure": true,
        "httpOnly": true,
        "sameSite": "Strict",
        "expires": 123
      }
    ],
    "authentication": {
      "username": "<string>",
      "password": "<string>"
    },
    "colorScheme": "<string>",
    "mediaType": "screen",
    "timezone": "<string>"
  },
  "screenshot": {
    "type": "png",
    "device": "Macbook Pro 16",
    "viewport": {
      "width": 2240,
      "height": 1260,
      "deviceScaleFactor": 1,
      "isMobile": true,
      "hasTouch": true,
      "isLandscape": true
    },
    "fullPage": true,
    "fromSurface": true,
    "omitBackground": true,
    "optimizeForSpeed": true,
    "quality": 50,
    "captureBeyondViewport": true,
    "clip": {
      "scale": 1,
      "width": 123,
      "height": 123,
      "x": 123,
      "y": 123
    },
    "element": "<string>",
    "overlay": {
      "background": "<string>",
      "filter": "none",
      "margin": 0.2,
      "browser": "light",
      "screenshotBorderRadius": 123
    }
  },
  "storage": {
    "preSignedUrl": "<string>"
  }
}'
{
  "id": "5KqYNUjbxRJ-rKbIeGsXo",
  "status": "PENDING",
  "fileUrl": "<string>",
  "signedUrlStatus": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
page
object
required

Page options, either provide the url, html or htmlTemplate option.

screenshot
object
storage
object

Response

201 - application/json
id
string
required

Id of the queued job.

status
enum<string>
required

Status of the job.

Available options:
PENDING,
RUNNING,
FAILED,
COMPLETED
fileUrl
string | null

URL to the generated file (will be null if storage.signedUrl is used). This url is valid for 1 hour, after that the file will be deleted from our storage.

signedUrlStatus
string | null

Status of the signed url request if provided.

  • NOT_PROVIDED, no storage.preSignedUrl was provided.
  • UPLOADED, storage.preSignedUrl was provided and file is uploaded.
  • FAILED, storage.preSignedUrl was provided but the upload failed.