Prioritise solutions
curl --request POST \
--url https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"beforeId": "e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a",
"solutionIds": [
"d4e71c2b-a498-42af-b7f5-69de06a0d7c4",
"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4",
"c0e195d9-b918-4a3a-bd8b-f730361d044e"
]
}
'import requests
url = "https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise"
payload = {
"beforeId": "e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a",
"solutionIds": ["d4e71c2b-a498-42af-b7f5-69de06a0d7c4", "b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4", "c0e195d9-b918-4a3a-bd8b-f730361d044e"]
}
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({
beforeId: 'e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a',
solutionIds: [
'd4e71c2b-a498-42af-b7f5-69de06a0d7c4',
'b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4',
'c0e195d9-b918-4a3a-bd8b-f730361d044e'
]
})
};
fetch('https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise', 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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise",
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([
'beforeId' => 'e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a',
'solutionIds' => [
'd4e71c2b-a498-42af-b7f5-69de06a0d7c4',
'b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4',
'c0e195d9-b918-4a3a-bd8b-f730361d044e'
]
]),
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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise"
payload := strings.NewReader("{\n \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise")
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 \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\n}"
response = http.request(request)
puts response.read_bodySolutions
Prioritise solutions
Reorders one or more solutions based on provided order
POST
/
organisations
/
{orgId}
/
workspaces
/
{workspaceId}
/
solutions
/
prioritise
Prioritise solutions
curl --request POST \
--url https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"beforeId": "e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a",
"solutionIds": [
"d4e71c2b-a498-42af-b7f5-69de06a0d7c4",
"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4",
"c0e195d9-b918-4a3a-bd8b-f730361d044e"
]
}
'import requests
url = "https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise"
payload = {
"beforeId": "e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a",
"solutionIds": ["d4e71c2b-a498-42af-b7f5-69de06a0d7c4", "b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4", "c0e195d9-b918-4a3a-bd8b-f730361d044e"]
}
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({
beforeId: 'e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a',
solutionIds: [
'd4e71c2b-a498-42af-b7f5-69de06a0d7c4',
'b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4',
'c0e195d9-b918-4a3a-bd8b-f730361d044e'
]
})
};
fetch('https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise', 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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise",
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([
'beforeId' => 'e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a',
'solutionIds' => [
'd4e71c2b-a498-42af-b7f5-69de06a0d7c4',
'b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4',
'c0e195d9-b918-4a3a-bd8b-f730361d044e'
]
]),
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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise"
payload := strings.NewReader("{\n \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\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://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.meetsquad.ai/organisations/{orgId}/workspaces/{workspaceId}/solutions/prioritise")
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 \"beforeId\": \"e3f2c1b4-7a8d-5e4f-b8c7-7a8c9d1e2f3a\",\n \"solutionIds\": [\n \"d4e71c2b-a498-42af-b7f5-69de06a0d7c4\",\n \"b5f2a0f4-6a7d-4a1f-9e6b-6bcb9c22d7c4\",\n \"c0e195d9-b918-4a3a-bd8b-f730361d044e\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
JWT authentication for organization-scoped endpoints.
Body
application/json
Request schema for prioritising solutions
ID of solution before which to place the solutions, or null to place at the end
List of solution IDs to move
Minimum array length:
1Who triggered the priority update. If not provided, defaults to 'user'
Available options:
user, AI Response
Solution prioritization request accepted and queued for processing
⌘I