Skip to content

CLI Usage

Multilogin X operations can be performed via command-line using curl or any HTTP client.

Quick Reference

Authentication

bash
# Sign in
curl -X POST https://api.multilogin.com/user/signin \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}'

# Save token to variable
TOKEN=$(curl -s -X POST https://api.multilogin.com/user/signin \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"your-password"}' \
  | jq -r '.data.token')

# Refresh token
curl -X POST https://api.multilogin.com/user/refresh_token \
  -H "Authorization: Bearer $TOKEN"

Profile Operations

bash
# List profiles
curl "https://api.multilogin.com/workspace/profiles?limit=50" \
  -H "Authorization: Bearer $TOKEN"

# Create profile
curl -X POST https://api.multilogin.com/profile/create \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "cli-profile",
    "browser_type": "mimic",
    "os_type": "windows",
    "folder_id": "FOLDER_UUID"
  }'

# Start profile
curl "https://launcher.mlx.yt:45001/api/v1/profile/f/FOLDER_ID/p/PROFILE_ID/start" \
  -H "Authorization: Bearer $TOKEN"

# Stop profile
curl "https://launcher.mlx.yt:45001/api/v1/profile/stop/p/PROFILE_ID" \
  -H "Authorization: Bearer $TOKEN"

# Stop all profiles
curl "https://launcher.mlx.yt:45001/api/v1/profile/stop/all" \
  -H "Authorization: Bearer $TOKEN"

# Delete profile
curl -X POST https://api.multilogin.com/profile/remove \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"profile_ids": ["PROFILE_UUID"]}'

Folder Operations

bash
# List folders
curl "https://api.multilogin.com/workspace/folders" \
  -H "Authorization: Bearer $TOKEN"

# Create folder
curl -X POST https://api.multilogin.com/workspace/folder/create \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "my-folder"}'

Script Runner

bash
# List scripts
curl "https://launcher.mlx.yt:45001/api/v1/scripts" \
  -H "Authorization: Bearer $TOKEN"

# Run script on profiles
curl -X POST https://launcher.mlx.yt:45001/api/v1/run_script \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "script_file": "my_script.py",
    "profile_ids": [
      {"profile_id": "UUID1", "is_headless": false}
    ]
  }'

Shell Script Wrapper

bash
#!/bin/bash
# mlx.sh - Multilogin X CLI helper

MLX_EMAIL="${MLX_EMAIL:-you@example.com}"
MLX_PASSWORD="${MLX_PASSWORD:-your-password}"
MLX_API="https://api.multilogin.com"
MLX_LAUNCHER="https://launcher.mlx.yt:45001"

mlx_signin() {
    export MLX_TOKEN=$(curl -s -X POST "$MLX_API/user/signin" \
        -H "Content-Type: application/json" \
        -d "{\"email\":\"$MLX_EMAIL\",\"password\":\"$MLX_PASSWORD\"}" \
        | jq -r '.data.token')
    echo "Signed in. Token set."
}

mlx_profiles() {
    curl -s "$MLX_API/workspace/profiles?limit=${1:-50}" \
        -H "Authorization: Bearer $MLX_TOKEN" \
        | jq '.data.profiles[] | {name, uuid, browser_type}'
}

mlx_start() {
    curl -s "$MLX_LAUNCHER/api/v1/profile/f/$1/p/$2/start?automation_type=${3:-selenium}" \
        -H "Authorization: Bearer $MLX_TOKEN"
}

mlx_stop() {
    curl -s "$MLX_LAUNCHER/api/v1/profile/stop/p/$1" \
        -H "Authorization: Bearer $MLX_TOKEN"
}

# Usage: source mlx.sh && mlx_signin && mlx_profiles

Using with jq

All API responses are JSON. Use jq for parsing:

bash
# Get profile names
curl -s "$MLX_API/workspace/profiles" \
  -H "Authorization: Bearer $TOKEN" \
  | jq -r '.data.profiles[].name'

# Get profile IDs
curl -s "$MLX_API/workspace/profiles" \
  -H "Authorization: Bearer $TOKEN" \
  | jq -r '.data.profiles[].uuid'

# Count profiles
curl -s "$MLX_API/workspace/profiles" \
  -H "Authorization: Bearer $TOKEN" \
  | jq '.data.total'