Update custom module
curl --request PUT \
--url https://apiweb.mile.app/api/v3/custom-module/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://dashboard.example.com/v2/?token={SHORT_TOKEN}",
"target": "_self"
}
'import requests
url = "https://apiweb.mile.app/api/v3/custom-module/{id}"
payload = {
"url": "https://dashboard.example.com/v2/?token={SHORT_TOKEN}",
"target": "_self"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://dashboard.example.com/v2/?token={SHORT_TOKEN}', target: '_self'})
};
fetch('https://apiweb.mile.app/api/v3/custom-module/{id}', 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/custom-module/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://dashboard.example.com/v2/?token={SHORT_TOKEN}',
'target' => '_self'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/custom-module/{id}"
payload := strings.NewReader("{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/custom-module/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/custom-module/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Custom Module `Driver Dashboard` has been updated successfully.",
"data": {
"_id": "6710c3e5e4b0a91d2c3f7d44",
"name": "Driver Dashboard",
"label": "driver-Dashboard-64d99303be0ad015c461c932",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_self",
"organizationId": "64d99303be0ad015c461c932",
"createdFrom": "WEB",
"updatedTime": "2026-10-16T03:30:00.000000Z",
"createdTime": "2026-10-16T03:30:00.000000Z"
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Custom Module
Update custom module
Changes a custom module’s type, url, pluginId or target. The name cannot be changed, because the module’s permission is tied to it.
url must be a valid URL. It may contain {SHORT_TOKEN}, which is replaced with a short-lived token for the signed-in user when the module opens.
Requires permission edit/customModule.
PUT
/
custom-module
/
{id}
Update custom module
curl --request PUT \
--url https://apiweb.mile.app/api/v3/custom-module/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://dashboard.example.com/v2/?token={SHORT_TOKEN}",
"target": "_self"
}
'import requests
url = "https://apiweb.mile.app/api/v3/custom-module/{id}"
payload = {
"url": "https://dashboard.example.com/v2/?token={SHORT_TOKEN}",
"target": "_self"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://dashboard.example.com/v2/?token={SHORT_TOKEN}', target: '_self'})
};
fetch('https://apiweb.mile.app/api/v3/custom-module/{id}', 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/custom-module/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://dashboard.example.com/v2/?token={SHORT_TOKEN}',
'target' => '_self'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://apiweb.mile.app/api/v3/custom-module/{id}"
payload := strings.NewReader("{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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/custom-module/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/custom-module/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://dashboard.example.com/v2/?token={SHORT_TOKEN}\",\n \"target\": \"_self\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Custom Module `Driver Dashboard` has been updated successfully.",
"data": {
"_id": "6710c3e5e4b0a91d2c3f7d44",
"name": "Driver Dashboard",
"label": "driver-Dashboard-64d99303be0ad015c461c932",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_self",
"organizationId": "64d99303be0ad015c461c932",
"createdFrom": "WEB",
"updatedTime": "2026-10-16T03:30:00.000000Z",
"createdTime": "2026-10-16T03:30:00.000000Z"
}
}{
"status": false,
"message": "Bad request - invalid parameters provided."
}{
"status": false,
"message": "Data not found"
}{
"status": false,
"message": "Internal server error, please contact [email protected]."
}Authorizations
Use a valid Bearer token to authenticate.
Path Parameters
Custom module ID.
Example: 6710c3e5e4b0a91d2c3f7d44
Body
application/json
The input type of the component (e.g., string, number, date, etc.)
Page URL. May contain {SHORT_TOKEN}.
Example: https://dashboard.example.com/?token={SHORT_TOKEN}
Add-on ID. Required when type is ADDONS.
Example: 68b440c9dad4c5d45707f6d2
Open in a new tab (_blank) or the same tab (_self).
Default: _blank
Available options:
_blank, _self