Skip to main content
Browser profiles allow you to persist cookies, login sessions, and browser state across multiple workflow executions. This enables workflows to maintain authentication without requiring manual login each time.

Endpoints

1. Create Browser Profile

POST /public/browser-profiles Creates a new browser profile to store persistent browser state. Headers:
X-API-Key: your_api_key_here
Content-Type: application/json
Request Body:
{
  "name": "my-profile-name"
}
Response:
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "my-profile-name",
  "created_at": "2025-11-30T12:00:00Z"
}
Example:
curl -X POST http://localhost:8080/public/browser-profiles \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"name": "linkedin-profile"}'

2. List Browser Profiles

GET /public/browser-profiles Lists all browser profiles in your workspace. Headers:
X-API-Key: your_api_key_here
Response:
{
  "profiles": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "linkedin-profile",
      "created_at": "2025-11-30T12:00:00Z"
    }
  ]
}
Example:
curl http://localhost:8080/public/browser-profiles \
  -H "X-API-Key: your_api_key"

3. Create Session with Browser Profile

POST /public/sessions Creates a browser session using a profile. This is how you set up authentication by manually logging into websites. Headers:
X-API-Key: your_api_key_here
Content-Type: application/json
Request Body:
{
  "profile_id": "550e8400-e29b-41d4-a716-446655440000",
  "persist_changes": true,
  "ttl": 3600
}
Parameters:
  • profile_id - UUID of the browser profile to use
  • persist_changes (optional) - Whether to save cookies/changes back to the profile
    • true (default): Changes ARE saved to profile
    • false: Use profile’s current state but don’t save changes
  • ttl (optional) - Session lifetime in seconds (max 86400 / 24 hours)
Response:
{
  "session_id": "07f3dc95-e558-45ae-9d34-2a1746c427b7",
  "cdp_url": "wss://browser-provider.example/cdp?sessionId=...",
  "screen_config": {
    "width": 1280,
    "height": 720
  },
  "status": "active",
  "expires_at": "2025-11-30T13:00:00Z",
  "metadata": {
    "live_url": "https://browser-provider.example/view/...",
    "profile_id": "550e8400-e29b-41d4-a716-446655440000",
    "persist_changes": true
  },
  "created_at": "2025-11-30T12:00:00Z",
  "updated_at": "2025-11-30T12:00:00Z"
}
Response Fields:
  • session_id - Unique session identifier
  • cdp_url - Chrome DevTools Protocol WebSocket URL for programmatic control
  • metadata.live_url - Browser view URL to open in your browser for manual interaction
  • metadata.persist_changes - Whether changes will be saved to the profile
Example (with persistence):
curl -X POST http://localhost:8080/public/sessions \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "550e8400-e29b-41d4-a716-446655440000",
    "persist_changes": true,
    "ttl": 3600
  }'
Example (without persistence):
curl -X POST http://localhost:8080/public/sessions \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "profile_id": "550e8400-e29b-41d4-a716-446655440000",
    "persist_changes": false,
    "ttl": 3600
  }'

4. Terminate Session

POST /public/sessions/{session_id}/terminate Terminates an active browser session. If persist_changes was set to true, changes will be saved to the profile. Headers:
X-API-Key: your_api_key_here
Response:
204 No Content
Example:
curl -X POST http://localhost:8080/public/sessions/07f3dc95-e558-45ae-9d34-2a1746c427b7/terminate \
  -H "X-API-Key: your_api_key"

5. Run Workflow with Browser Profile

POST /public/workflows/start/{workflow_id} Starts a workflow execution using a specific browser profile. Headers:
X-API-Key: your_api_key_here
Content-Type: application/json
Request Body:
{
  "input_variables": {},
  "browser_profile_id": "550e8400-e29b-41d4-a716-446655440000",
  "timeout_minutes": 30,
  "should_update_cache": true,
  "allow_public_live_view": false
}
Parameters:
  • browser_profile_id (optional) - Override the workflow’s configured profile
  • input_variables - Workflow input variables
  • timeout_minutes (optional) - Maximum execution time
  • should_update_cache (optional) - Whether to update the cache
  • allow_public_live_view (optional) - Enable public viewing of execution
Response:
{
  "execution_url": "https://app.usedari.com/workflow-executions/...",
  "execution_id": "exec-123..."
}
Example:
curl -X POST http://localhost:8080/public/workflows/start/9b964811-5b49-4877-8a6d-b329481dcb22 \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "input_variables": {},
    "browser_profile_id": "550e8400-e29b-41d4-a716-446655440000"
  }'

Usage Workflow

  1. Create a profile - Use the Create Browser Profile endpoint
  2. Create a session with the profile - Use Create Session endpoint with persist_changes: true
  3. Open the live_url in your browser from the session response
  4. Log in manually to the websites you need
  5. Terminate the session - Your login state is now saved to the profile
  6. Run workflows - Use the profile in workflow executions to maintain authentication
Set persist_changes: false when you want to use a profile’s state without modifying it - useful for testing or read-only operations.