curl --request POST \
--url https://apiweb.mile.app/api/v3/custom-module \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Driver Dashboard",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank"
}
'import requests
url = "https://apiweb.mile.app/api/v3/custom-module"
payload = {
"name": "Driver Dashboard",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Driver Dashboard',
type: 'string',
url: 'https://dashboard.example.com/?token={SHORT_TOKEN}',
target: '_blank'
})
};
fetch('https://apiweb.mile.app/api/v3/custom-module', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Driver Dashboard',
'type' => 'string',
'url' => 'https://dashboard.example.com/?token={SHORT_TOKEN}',
'target' => '_blank'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://apiweb.mile.app/api/v3/custom-module")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/custom-module")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Custom Module `Driver Dashboard` has been added successfully.",
"data": {
"_id": "6710c3e5e4b0a91d2c3f7d44",
"name": "Driver Dashboard",
"label": "driver-Dashboard-64d99303be0ad015c461c932",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank",
"organizationId": "64d99303be0ad015c461c932",
"createdFrom": "WEB",
"updatedTime": "2026-10-16T03:30:00.000000Z",
"createdTime": "2026-10-16T03:30:00.000000Z"
},
"permission": {
"_id": "6710c3e5e4b0a91d2c3f7d45",
"name": "view/driver-Dashboard-64d99303be0ad015c461c932",
"displayName": "View Driver Dashboard",
"menu": "Driver Dashboard",
"type": "string",
"orderIndex": 1760585400,
"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]."
}Create custom module
Creates a custom module. A matching view permission (view/) is created at the same time and added to your own role, so you see the new menu right away; give it to other roles to share the module.
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.
Rules:
name: required, at most 50 characters, letters, numbers, spaces and-only, unique in your organization. It cannot be changed later.type:WEB,MOBILEorADDONS.pluginId: required whentypeisADDONS; the add-on must be global or your own, used once per organization, with a URL no other module uses.target:_blank(new tab, default) or_self. Requires permissionadd/customModule.
curl --request POST \
--url https://apiweb.mile.app/api/v3/custom-module \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Driver Dashboard",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank"
}
'import requests
url = "https://apiweb.mile.app/api/v3/custom-module"
payload = {
"name": "Driver Dashboard",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Driver Dashboard',
type: 'string',
url: 'https://dashboard.example.com/?token={SHORT_TOKEN}',
target: '_blank'
})
};
fetch('https://apiweb.mile.app/api/v3/custom-module', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Driver Dashboard',
'type' => 'string',
'url' => 'https://dashboard.example.com/?token={SHORT_TOKEN}',
'target' => '_blank'
]),
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"
payload := strings.NewReader("{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://apiweb.mile.app/api/v3/custom-module")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apiweb.mile.app/api/v3/custom-module")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Driver Dashboard\",\n \"type\": \"string\",\n \"url\": \"https://dashboard.example.com/?token={SHORT_TOKEN}\",\n \"target\": \"_blank\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"message": "Custom Module `Driver Dashboard` has been added successfully.",
"data": {
"_id": "6710c3e5e4b0a91d2c3f7d44",
"name": "Driver Dashboard",
"label": "driver-Dashboard-64d99303be0ad015c461c932",
"type": "string",
"url": "https://dashboard.example.com/?token={SHORT_TOKEN}",
"target": "_blank",
"organizationId": "64d99303be0ad015c461c932",
"createdFrom": "WEB",
"updatedTime": "2026-10-16T03:30:00.000000Z",
"createdTime": "2026-10-16T03:30:00.000000Z"
},
"permission": {
"_id": "6710c3e5e4b0a91d2c3f7d45",
"name": "view/driver-Dashboard-64d99303be0ad015c461c932",
"displayName": "View Driver Dashboard",
"menu": "Driver Dashboard",
"type": "string",
"orderIndex": 1760585400,
"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.
Body
Module name. Letters, numbers, spaces and - only.
Example: Driver Dashboard
50Page URL. May contain {SHORT_TOKEN}.
Example: https://dashboard.example.com/?token={SHORT_TOKEN}
The input type of the component (e.g., string, number, date, etc.)
Add-on ID. Required when type is ADDONS.
Example: 68b440c9dad4c5d45707f6d2
Open in a new tab (_blank) or the same tab (_self).
Default: _blank
_blank, _self