Session Rotation

Session Rotation

Force an IP address change for an existing proxy session while maintaining the same session identifier.

Endpoint

GET https://api.evomi.com/public/rotate_session

Authentication

Requires API key in either:

  • x-apikey header
  • apikey query parameter

Parameters

Parameter Required Description Valid Values
sessionid Yes Current session identifier Active session ID
product Yes Proxy product type rpc, rp, sdc, mp

Example Request

curl -X GET "https://api.evomi.com/public/rotate_session?sessionid=AAAAA&product=rpc" \\
  -H "x-apikey: YOUR_API_KEY"

Or, without headers:

curl -X GET "https://api.evomi.com/public/rotate_session?sessionid=AAAAA&product=rpc&apikey=YOUR_API_KEY"

Success Response

{
  "success": true,
  "message": "Session reset successfully"
}

Error Responses

{
  "error": "Session ID not provided",
  "success": false
}

400 Bad Request - Missing required parameters

{
  "error": "Invalid product",
  "success": false
}

400 Bad Request - Invalid product type specified

{
  "error": "Failed to reset session",
  "success": false
}

500 Internal Server Error - Rotation failure

Rotation Behavior

  1. Immediate termination of existing connection
  2. Release of current IP address
  3. New IP assignment from same geographic pool
  4. Session ID remains identical
  5. Authentication credentials stay unchanged

Usage Notes

  • Previous IP becomes immediately unavailable
  • Session locks to new IP after first connection

Python Example

import requests

def rotate_session(api_key, session_id, product_type):
    url = "https://api.evomi.com/public/rotate_session"
    headers = {"x-apikey": api_key}
    params = {
        "sessionid": session_id,
        "product": product_type
    }
    
    response = requests.get(url, headers=headers, params=params)
    return response.json()

# Usage
print(rotate_session("YOUR_KEY", "SESSION_123", "rpc"))