stop and start a machine
POST
/v1/machines/{machine_id}/restartAuthorization
AuthorizationBearer token · headerrequiredan organization api key. browser clients use the session cookie instead.
or
computer_sessionAPI key · cookierequiredfirst-party httponly browser session; never readable from javascript.
Path parameters
machine_idstringrequiredmatches ^mch_[0-9a-z]{20,32}$
Header parameters
idempotency-keystringmin length 1 · max length 255
Responses
200OK
idstringrequiredmachine identifier
matches ^mch_[0-9a-z]{20,32}$
organization_idstringrequiredorganization identifier
matches ^org_[0-9a-z]{20,32}$
namestringrequiredmin length 1 · max length 63 · matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
stateMachineStaterequiredAllowed:
creatingrunningstoppingstoppedstartingerrordeletingosMachineOsrequiredAllowed:
linuxsizeMachineSizerequiredAllowed:
smallstandardlargeimage_idstringrequiredmachine image identifier
matches ^img_[0-9a-z]{20,32}$
template_idstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anycpuintegerrequiredmin -9007199254740991 · max 9007199254740991
memory_mbintegerrequiredmin -9007199254740991 · max 9007199254740991
disk_gbintegerrequiredmin -9007199254740991 · max 9007199254740991
regionstringrequiredplacement region hint
min length 1 · max length 63
metadataobjectrequiredcaller-defined key/value pairs, echoed back unchanged
created_atstring<date-time>requiredstarted_atstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
anystopped_atstring<date-time> | anyrequiredShow propertiesHide properties
Any of:
string<date-time>
string<date-time>any
any400invalid request
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any401unauthenticated
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any402quota exceeded
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any403permission denied
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any404not found
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any409conflict with current state
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any412precondition failed
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any429rate limited
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any500internal error
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any501unsupported operation
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
any503compute unavailable
errorobjectrequiredShow propertiesHide properties
codeErrorCoderequiredAllowed:
invalid_requestunauthenticatedpermission_deniednot_foundconflictprecondition_failedquota_exceededrate_limitedunsupported_operationinternal_errorcompute_unavailablemessagestringrequiredhuman-readable, not machine-parseable
request_idstringrequireddetailsFieldError[]Show propertiesHide properties
Array of
FieldErrorfieldstringrequireddotted path into the request body
messagestringrequiredquotaobjectShow propertiesHide properties
limitstringrequiredthe entitlement that declined this request
currentintegerrequiredmin 0 · max 9007199254740991
maximuminteger | anyrequiredShow propertiesHide properties
Any of:
integer
integerany
anyplan_idstringrequiredupgrade_urlstring | anyrequiredShow propertiesHide properties
Any of:
string
stringany
anyTry it
Server
Authorization
Parameters
Request
curl -X POST "https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/restart" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/restart", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.post(
"https://api.raster.sh/v1/v1/machines/mch_01h8xk2q4v9m3n7p5r0t/restart",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"id": "mch_01h8xk2q4v9m3n7p5r0t",
"organization_id": "org_01h8xk2q4v9m3n7p5r0t",
"name": "research-box",
"state": "creating",
"os": "linux",
"size": "small",
"image_id": "img_01h8xk2q4v9m3n7p5r0t",
"template_id": "tpl_01h8xk2q4v9m3n7p5r0t",
"cpu": -9007199254740991,
"memory_mb": -9007199254740991,
"disk_gb": -9007199254740991,
"region": "us-east",
"metadata": {
"property1": "string",
"property2": "string"
},
"created_at": "2026-08-19T12:00:00Z",
"started_at": "2026-08-19T12:00:00Z",
"stopped_at": "2026-08-19T12:00:00Z"
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}{
"error": {
"code": "invalid_request",
"message": "string",
"request_id": "string",
"details": [
{
"field": "string",
"message": "string"
}
],
"quota": {
"limit": "running_machines",
"current": 9007199254740991,
"maximum": 9007199254740991,
"plan_id": "string",
"upgrade_url": "string"
}
}
}