cURL
curl --request GET \
--url https://api.{environment}.corti.app/v2/templates/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.templates.get("key");
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Templates.GetAsync("key");
import requests
url = "https://api.{environment}.corti.app/v2/templates/{key}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/templates/{key}",
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>",
"Tenant-Name: <tenant-name>"
],
]);
$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.{environment}.corti.app/v2/templates/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
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.{environment}.corti.app/v2/templates/{key}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"name": "<string>",
"description": "<string>",
"key": "<string>",
"status": "<string>",
"templateSections": [
{
"sort": 123,
"section": {
"name": "<string>",
"key": "<string>",
"description": "<string>",
"defaultWritingStyle": {
"name": "<string>"
},
"type": "<string>",
"translations": [
{
"languageId": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"alternateName": "<string>",
"defaultFormatRule": {
"name": "<string>"
},
"additionalInstructions": "<string>",
"content": "<string>",
"documentationMode": "global_sequential"
}
}
],
"translations": [
{
"languageId": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"additionalInstructions": "<string>",
"documentationMode": "global_sequential"
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Templates (Classic)
Get Template
Retrieves template by key.
GET
/
templates
/
{key}
cURL
curl --request GET \
--url https://api.{environment}.corti.app/v2/templates/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <tenant-name>'import { CortiClient, CortiEnvironment } from "@corti/sdk";
const client = new CortiClient({
environment: CortiEnvironment.Eu,
auth: {
clientId: "YOUR_CLIENT_ID",
clientSecret: "YOUR_CLIENT_SECRET"
},
tenantName: "YOUR_TENANT_NAME"
});
await client.templates.get("key");
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Templates.GetAsync("key");
import requests
url = "https://api.{environment}.corti.app/v2/templates/{key}"
headers = {
"Tenant-Name": "<tenant-name>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.{environment}.corti.app/v2/templates/{key}",
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>",
"Tenant-Name: <tenant-name>"
],
]);
$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.{environment}.corti.app/v2/templates/{key}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Tenant-Name", "<tenant-name>")
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.{environment}.corti.app/v2/templates/{key}")
.header("Tenant-Name", "<tenant-name>")
.header("Authorization", "Bearer <token>")
.asString();{
"name": "<string>",
"description": "<string>",
"key": "<string>",
"status": "<string>",
"templateSections": [
{
"sort": 123,
"section": {
"name": "<string>",
"key": "<string>",
"description": "<string>",
"defaultWritingStyle": {
"name": "<string>"
},
"type": "<string>",
"translations": [
{
"languageId": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"alternateName": "<string>",
"defaultFormatRule": {
"name": "<string>"
},
"additionalInstructions": "<string>",
"content": "<string>",
"documentationMode": "global_sequential"
}
}
],
"translations": [
{
"languageId": "<string>",
"name": "<string>",
"description": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"additionalInstructions": "<string>",
"documentationMode": "global_sequential"
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}{
"requestid": "<string>",
"status": 123,
"type": "<string>",
"detail": "<string>",
"validationErrors": [
{}
]
}Authorizations
Input your token
Headers
Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.
Example:
"base"
Path Parameters
The key of the template
Response
Template by key
Name of the template.
Description of the template.
Unique key for the template.
Status of the template.
List of sections included in the template.
Show child attributes
Show child attributes
Available translations for the template.
Show child attributes
Show child attributes
The timestamp when the template was updated.
Instructions or context for all template sections.
Configures the approach and underlying system prompt that govern how the LLM generates documentation.
Available options:
global_sequential, routed_parallel Example:
"global_sequential"
Was this page helpful?
⌘I