Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.
cURL
curl --request POST \ --url https://api.e2b.app/sandboxes/{sandboxID}/timeout \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <api-key>' \ --data '{ "timeout": 1 }'
{ "code": 123, "message": "<string>" }
Timeout in seconds from the current time after which the sandbox should expire
x >= 0
Successfully set the sandbox timeout
Was this page helpful?