Get an agent
curl --request GET \
--url https://api.mantle.chat/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mantle.chat/v1/agents/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mantle.chat/v1/agents/{agentId}', 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.mantle.chat/v1/agents/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.mantle.chat/v1/agents/{agentId}"
req, _ := http.NewRequest("GET", 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.get("https://api.mantle.chat/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mantle.chat/v1/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"modelId": "<string>",
"sharedWithWorkspace": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "invalid_cursor",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_credential",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "access_denied",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "agent_not_found",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "idempotency_conflict",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "response_expired",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_change_set",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "credential_service_unavailable",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Agents
Get an agent
GET
/
v1
/
agents
/
{agentId}
Get an agent
curl --request GET \
--url https://api.mantle.chat/v1/agents/{agentId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.mantle.chat/v1/agents/{agentId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.mantle.chat/v1/agents/{agentId}', 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.mantle.chat/v1/agents/{agentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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://api.mantle.chat/v1/agents/{agentId}"
req, _ := http.NewRequest("GET", 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.get("https://api.mantle.chat/v1/agents/{agentId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mantle.chat/v1/agents/{agentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"modelId": "<string>",
"sharedWithWorkspace": true,
"createdAt": "<string>",
"updatedAt": "<string>"
}{
"error": {
"code": "invalid_cursor",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_credential",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "access_denied",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "agent_not_found",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "idempotency_conflict",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "response_expired",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "invalid_change_set",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "rate_limited",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}{
"error": {
"code": "credential_service_unavailable",
"message": "<string>",
"requestId": "<string>",
"details": {}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Response
Success
Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Pattern:
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$Required string length:
1 - 100Maximum string length:
500Maximum string length:
256Required string length:
1 - 100Required string length:
1 - 64Pattern:
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1[0-4]):[0-5]\d)$Required string length:
1 - 64Pattern:
^\d{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[12]\d|3[01])T(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d{1,9})?(?:Z|[+-](?:0\d|1[0-4]):[0-5]\d)$