For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
DiscordDashboard
DocumentationAPI ReferenceCookbook
DocumentationAPI ReferenceCookbook
  • API Reference
    • POSTStart instance
    • GETGet instance by ID
    • GETList all instances
    • GETList all browser authentication states
      • GETGet environment variables
      • POSTSet environment variables
      • POSTDelete environment variables
  • SDK Reference
    • Python SDK
    • TypeScript SDK
Logo
DiscordDashboard
API ReferenceEnv

Set environment variables

POST
https://api.scrapybara.com/v1/instance/:instance_id/env
POST
/v1/instance/:instance_id/env
1import requests
2
3url = "https://api.scrapybara.com/v1/instance/instance_id/env"
4
5payload = { "variables": { "key": "value" } }
6headers = {
7 "x-api-key": "<apiKey>",
8 "Content-Type": "application/json"
9}
10
11response = requests.post(url, json=payload, headers=headers)
12
13print(response.json())
1{
2 "status": "status",
3 "message": "message"
4}
Was this page helpful?
Previous

Delete environment variables

Next
Built with

Authentication

x-api-keystring
API Key authentication via header

Path parameters

instance_idstringRequired

Request

This endpoint expects an object.
variablesmap from strings to stringsRequired

Response

Successful Response
statusstring
messagestring

Errors

422
Env Set Request Unprocessable Entity Error