Skip to main content
POST
/
browser
/
v1
/
sessions
/
{id}
/
commands
Run commands in a session
curl --request POST \
  --url https://api.voyant.travel/browser/v1/sessions/{id}/commands \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "commands": [
    {
      "url": "<string>",
      "selector": "<string>",
      "text": "<string>",
      "values": [
        "<string>"
      ],
      "ms": 123,
      "script": "<string>",
      "urls": [
        "<string>"
      ],
      "cookies": [
        {
          "name": "<string>",
          "value": "<string>",
          "url": "<string>",
          "domain": "<string>",
          "path": "<string>",
          "expires": 123,
          "httpOnly": true,
          "secure": true
        }
      ],
      "width": 123,
      "height": 123,
      "deviceScaleFactor": 123,
      "userAgent": "<string>",
      "headers": {},
      "options": {}
    }
  ]
}
'
{
  "sessionId": "<string>",
  "results": [
    {
      "op": "<string>",
      "durationMs": 123,
      "ok": true,
      "result": "<unknown>",
      "error": "<string>"
    }
  ],
  "totalMs": 123
}

Authorizations

Authorization
string
header
required

Voyant Cloud API token, passed as Authorization: Bearer <token>. Each token carries a fixed set of scopes; an operation rejects tokens missing its required scope.

Path Parameters

id
string
required

Body

application/json
commands
object[]
required

Response

Command results

sessionId
string
required
results
object[]
required
totalMs
number
required