Skip to main content
POST
Fill a credential
See the credential fill guide for SDK examples and how to choose the page and fields.

Authorizations

x-api-key
string
header
required

Path Parameters

id
string<uuid>
required

Session ID.

Body

application/json

Provide exactly one of credential, vault and onePassword (otherwise 400 "Pass one of credential, vault or onePassword"). With vault, every field has field; with onePassword, every field has ref; with credential, fields have only a selector.

fields
object[]
required

The inputs to type into. Each selector may appear once.

Required array length: 1 - 16 elements
credential
string

A secret's name or ID (names are matched first). It must have been attached to the session when the session was created, directly or through a vault. Each field then has only a selector.

Required string length: 1 - 255
vault
string

A vault's name. Each field's field names the entry whose secret is typed; the entry's secret must have been attached when the session was created.

Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{0,127}$
onePassword
object

Fill fields read from 1Password with an op_token secret attached to the session as {"onePassword": name} in credentials (otherwise 403 CREDENTIAL_NOT_ATTACHED). Each field names its 1Password field in ref. The session's host reads the fields at fill time; nothing is stored. 1Password errors carry details.tokenSecretId and details.tokenVersion.

pageId
string

CDP target ID of the tab to fill, at most 128 UTF-8 bytes. Pass it, or pageUrl, when more than one tab could be the target. Not with pageUrl.

Minimum string length: 1
pageUrl
string

Fill the tab whose URL starts with this prefix, at most 2048 UTF-8 bytes, instead of naming its pageId. Not with pageId.

Minimum string length: 1
frame
object

Target an iframe, such as an embedded login form. Without it, the tab's main frame is filled.

Response

Success

What was typed where. Never contains values.

pageId
string
required

CDP target ID of the tab filled.

origin
string
required

Origin of the frame filled.

fields
object[]
required

One result per requested field, in request order.

version
integer

The secret version filled, for credential fills only. Absent for vault and onePassword fills, whose fields each report their own.