---
title: "Fill a form synchronously using a form-filler automation"
method: POST
path: "/v1/sessions/{sessionId}/windows/{windowId}/fill-form"
tags: ["windows"]
---

# Fill a form synchronously using a form-filler automation

`POST /v1/sessions/{sessionId}/windows/{windowId}/fill-form`

Fill a form of a browser window synchronously using a form-filler automation

## Path parameters

- `sessionId` string, required
- `windowId` string, required

## Request body

- object
  - `async` AsyncConfig
    - `webhookUrl` string — The URL to send the response to when the request is complete.
  - `automationId` string, required — The ID of the automation to execute
  - `clientRequestId` string
  - `costThresholdCredits` integer — A credit threshold that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended).
  - `parameters` object — Optional parameters to pass to the automation execution
  - `timeThresholdSeconds` integer — A time threshold in seconds that, once exceeded, will cause the operation to be cancelled. Note that this is *not* a hard limit, but a threshold that is checked periodically during the course of fulfilling the request. A default threshold is used if not specified, but you can use this option to increase or decrease as needed. Set to 0 to disable this feature entirely (not recommended). This setting does not extend the maximum session duration provided at the time of session creation.

## Response `201`

Created

- AiPromptResponse
  - `data` AiResponseEnvelope, required
    - `modelResponse` string, required
  - `errors` Issue[]
    - `code` string — Issue code.
    - `details` object — Any associated details.
    - `message` string, required — Message describing the issue.
    - `reason` string — Underlying reason for the issue.
  - `meta` ExternalSessionAiResponseMetadata, required
    - `clientProvided` ClientProvidedResponseMetadata
      - `clientRequestId` string
    - `requestId` string
    - `screenshots` ScreenshotMetadata[] — Array containing any requested screenshots from the operation.
      - `dataUrl` string — Base64 encoded data URL of screenshot image data
      - `fileId` string — Unique identifier for the uploaded file
      - `fileName` string — Name of the screenshot file
      - `format` 'base64' | 'url' — Format of the screenshot data
      - `scrollPosition` ScreenshotScrollPosition
        - `left` integer, required — Horizontal scroll position in pixels
        - `top` integer, required — Vertical scroll position in pixels
      - `signedDownloadUrl` string — Signed URL for downloading the screenshot (when format is 'url')
      - `urlExpiry` string — Expiration time for the signed URL in ISO format
      - `viewportDimensions` ScreenshotViewportDimensions
        - `height` integer, required — Height of the viewport in pixels
        - `width` integer, required — Width of the viewport in pixels
    - `status` 'success' | 'partial' | 'failure', required — Outcome of the operation.
    - `usage` ExternalSessionAiResponseMetadataUsage, required
      - `credits` integer, required — The credit usage for this request
      - `id` string, required — The id of the request
  - `warnings` Issue[]
    - `code` string — Issue code.
    - `details` object — Any associated details.
    - `message` string, required — Message describing the issue.
    - `reason` string — Underlying reason for the issue.

## Changes

- **2026-09-17** `f508c8a4c5e6` — 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `default` was added to the API
- **2026-09-12** `68dc554626c5` — 1 info
  - api operation id `fill-form` removed and replaced with `windows_fill-form`

[Change history](https://skmtc.dev/airtop/apis/airtop-api/changes/v1/sessions/:sessionId/windows/:windowId/fill-form/post.md)

---

[API](https://skmtc.dev/airtop/apis/airtop-api.md) · [All operations](https://skmtc.dev/airtop/apis/airtop-api/llms.txt) · [OpenAPI document](https://skmtc.dev/airtop/apis/airtop-api/revisions/f508c8a4c5e6?raw)
