Set company URLs for external dashboard
curl --request PUT \
--url https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
]
}
'import requests
url = "https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls"
payload = { "companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
] }
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({
companyUrls: [{companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', url: '<string>'}]
})
};
fetch('https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls', 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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls",
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([
'companyUrls' => [
[
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'url' => '<string>'
]
]
]),
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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls"
payload := strings.NewReader("{\n \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls")
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 \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"url": "<string>",
"iconUrl": "<string>",
"displayOrder": 123,
"isActive": true,
"isDefault": true,
"allowInIframe": true,
"framePolicy": "<string>",
"roleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"roleNames": [
"<string>"
],
"companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyName": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Dashboards
Set company URLs for external dashboard
Set company-specific URL overrides for an external dashboard. This replaces all existing company URL assignments with the provided list. All URLs must use HTTPS. Companies must exist and belong to your tenant.
PUT
/
api
/
public
/
v1
/
dashboards
/
external
/
{id}
/
company-urls
Set company URLs for external dashboard
curl --request PUT \
--url https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
]
}
'import requests
url = "https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls"
payload = { "companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"url": "<string>"
}
] }
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({
companyUrls: [{companyId: '3c90c3cc-0d44-4b50-8888-8dd25736052a', url: '<string>'}]
})
};
fetch('https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls', 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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls",
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([
'companyUrls' => [
[
'companyId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'url' => '<string>'
]
]
]),
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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls"
payload := strings.NewReader("{\n \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\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://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/dashboards/external/{id}/company-urls")
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 \"companyUrls\": [\n {\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"url\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"url": "<string>",
"iconUrl": "<string>",
"displayOrder": 123,
"isActive": true,
"isDefault": true,
"allowInIframe": true,
"framePolicy": "<string>",
"roleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"roleNames": [
"<string>"
],
"companyUrls": [
{
"companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"companyName": "<string>",
"url": "<string>"
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Authorizations
Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.
Path Parameters
External dashboard ID
Body
application/json
Company URL assignments
Show child attributes
Show child attributes
Response
Company URLs updated
Show child attributes
Show child attributes
Was this page helpful?
⌘I