Restore flow by flow log ID
curl --request PUT \
--url https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"code": 200,
"message": "Flow has been updated successfully.",
"data": {
"_id": "6853f0cbb83015e4c60279f2",
"name": "Packing",
"pages": [
{
"id": "page0",
"enabled": true,
"components": [
{
"component": "input",
"id": "orderNumber",
"title": "Order Number",
"inputType": "string",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false,
"visible": true,
"preValue": null
},
{
"component": "input",
"id": "number",
"title": "Number",
"inputType": "number",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false,
"visible": true,
"preValue": null
},
{
"component": "select",
"id": "sel",
"title": "Sel",
"min": 1,
"max": 1,
"default": null,
"routeAs": null,
"showAs": null,
"options": [
"a",
"b"
],
"inputType": "string",
"onSelect": [],
"visible": true,
"preValue": null
}
]
},
{
"id": "page1",
"title": "Confirmation",
"components": [
{
"component": "view",
"id": "code",
"inputType": "string",
"title": "Code",
"value": "$orderNumber",
"visible": true,
"preValue": "$orderNumber"
}
],
"showTooltip": false
}
],
"configurations": [
{
"id": "startTime",
"adjustment": 0
},
{
"id": "endTime",
"adjustment": 24
}
],
"organizationId": "66791b2bf001a712b77b3622",
"version": 4,
"createdBy": "admin@mile.app",
"orderIndex": 72,
"updatedTime": "2025-06-20T04:00:16.727000Z",
"createdTime": "2025-06-19T11:13:15.550000Z",
"updatedBy": "admin@mile.app"
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Flow
Restore flow by flow log ID
PUT
/
flow
/
{flowId}
/
restore
/
{flowLogId}
Restore flow by flow log ID
curl --request PUT \
--url https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/flow/{flowId}/restore/{flowLogId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": true,
"code": 200,
"message": "Flow has been updated successfully.",
"data": {
"_id": "6853f0cbb83015e4c60279f2",
"name": "Packing",
"pages": [
{
"id": "page0",
"enabled": true,
"components": [
{
"component": "input",
"id": "orderNumber",
"title": "Order Number",
"inputType": "string",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false,
"visible": true,
"preValue": null
},
{
"component": "input",
"id": "number",
"title": "Number",
"inputType": "number",
"default": null,
"routeAs": null,
"showAs": null,
"isRequired": false,
"visible": true,
"preValue": null
},
{
"component": "select",
"id": "sel",
"title": "Sel",
"min": 1,
"max": 1,
"default": null,
"routeAs": null,
"showAs": null,
"options": [
"a",
"b"
],
"inputType": "string",
"onSelect": [],
"visible": true,
"preValue": null
}
]
},
{
"id": "page1",
"title": "Confirmation",
"components": [
{
"component": "view",
"id": "code",
"inputType": "string",
"title": "Code",
"value": "$orderNumber",
"visible": true,
"preValue": "$orderNumber"
}
],
"showTooltip": false
}
],
"configurations": [
{
"id": "startTime",
"adjustment": 0
},
{
"id": "endTime",
"adjustment": 24
}
],
"organizationId": "66791b2bf001a712b77b3622",
"version": 4,
"createdBy": "admin@mile.app",
"orderIndex": 72,
"updatedTime": "2025-06-20T04:00:16.727000Z",
"createdTime": "2025-06-19T11:13:15.550000Z",
"updatedBy": "admin@mile.app"
}
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact support@mile.app."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
The unique identifier of organization's flow.
Use Flow /flows API to get the list of flow ID's.
Example: 6352736c628401059b37a1d1
The unique name of organization's flow.
Use Flow Log Histories API to get the list of flow log ID's.
Example: 9f52736c628401059b37as34
⌘I