curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/contexts/{contextId} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'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.agentic.contexts.get("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agentic.Contexts.GetAsync(
"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
new AgenticContextsGetRequest()
);
import requests
url = "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
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/agentic/contexts/{contextId}",
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: <api-key>"
],
]);
$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/agentic/contexts/{contextId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
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/agentic/contexts/{contextId}")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"id": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"agentId": "agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40",
"taskCount": 1,
"createdAt": "2026-05-19T12:00:00Z",
"updatedAt": "2026-05-19T12:00:01Z",
"expiresAt": null,
"tasks": [
{
"id": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"contextId": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"status": {
"state": "TASK_STATE_COMPLETED",
"timestamp": "2026-05-19T12:00:01Z"
},
"history": [
{
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5a01-7c10-8a2b-1f3c5d7e9b00",
"parts": [
{
"text": "Code this encounter: acute asthma exacerbation."
}
]
},
{
"role": "ROLE_AGENT",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"taskId": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"parts": [
{
"text": "J45.901"
}
]
}
],
"artifacts": [
{
"artifactId": "art.0192f4c8-6a9e-7f72-a35e-70c1ac6fbe84",
"parts": [
{
"text": "J45.901"
}
]
}
]
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Get a context
Returns the context’s metadata together with its tasks, oldest first.
Each task carries its full message history; the user’s prompt for a
task is the ROLE_USER message within that task’s history (there is no
separate top-level message list).
curl --request GET \
--url https://api.{environment}.corti.app/v2/agentic/contexts/{contextId} \
--header 'Authorization: Bearer <token>' \
--header 'Tenant-Name: <api-key>'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.agentic.contexts.get("ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51");
using Corti.Agentic;
using Corti;
var client = new CortiClient(
"TENANT_NAME",
CortiClientEnvironment.Eu,
new CortiClientAuth.ClientCredentials("client_id", "client_secret")
);
await client.Agentic.Contexts.GetAsync(
"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
new AgenticContextsGetRequest()
);
import requests
url = "https://api.{environment}.corti.app/v2/agentic/contexts/{contextId}"
headers = {
"Authorization": "Bearer <token>",
"Tenant-Name": "<api-key>"
}
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/agentic/contexts/{contextId}",
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: <api-key>"
],
]);
$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/agentic/contexts/{contextId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Tenant-Name", "<api-key>")
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/agentic/contexts/{contextId}")
.header("Authorization", "Bearer <token>")
.header("Tenant-Name", "<api-key>")
.asString();{
"id": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"agentId": "agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40",
"taskCount": 1,
"createdAt": "2026-05-19T12:00:00Z",
"updatedAt": "2026-05-19T12:00:01Z",
"expiresAt": null,
"tasks": [
{
"id": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"contextId": "ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51",
"status": {
"state": "TASK_STATE_COMPLETED",
"timestamp": "2026-05-19T12:00:01Z"
},
"history": [
{
"role": "ROLE_USER",
"messageId": "msg.0192f4c8-5a01-7c10-8a2b-1f3c5d7e9b00",
"parts": [
{
"text": "Code this encounter: acute asthma exacerbation."
}
]
},
{
"role": "ROLE_AGENT",
"messageId": "msg.0192f4c8-5f8d-7e61-924d-6fb09b5ead73",
"taskId": "task.0192f4c8-4e7c-7d50-b13c-5eaf8a4d9c62",
"parts": [
{
"text": "J45.901"
}
]
}
],
"artifacts": [
{
"artifactId": "art.0192f4c8-6a9e-7f72-a35e-70c1ac6fbe84",
"parts": [
{
"text": "J45.901"
}
]
}
]
}
]
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}{
"error": {
"code": "ASSIGNMENT_CONFLICT",
"message": "could not complete assignment",
"details": {
"assignment_id": "asg_99",
"expert_id": "exp_42"
}
}
}Authorizations
OAuth 2.0 / OIDC bearer token.
The tenant the request operates within.
Path Parameters
Context identifier (prefixed UUIDv7).
Context identifier. Accepts ctx.<uuidv7> or a bare UUIDv7 on input; always returned prefixed.
^(ctx\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
Query Parameters
Cap the number of history messages returned per task.
x >= 0Response
The context and its tasks.
A context together with its tasks. Returned by GET /contexts/{id}.
Tasks are ordered oldest first and each carries its full message
history — the user's prompt for a task is the ROLE_USER message
within that task's history.
Context identifier. Accepts ctx.<uuidv7> or a bare UUIDv7 on input; always returned prefixed.
^(ctx\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"ctx.0192f4c8-3d6b-7c4f-a02b-4d9e7f3c8b51"
The context's tasks, oldest first, each with full message history.
Show child attributes
Show child attributes
Agent identifier. Accepts agt.<uuidv7> or a bare UUIDv7 on input; always returned prefixed.
^(agt\.)?[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"agt.0192f4c8-2c5a-7b3e-9f1a-3c8d6e2b7a40"
Total number of tasks in the context.
x >= 0When the context was created.
When the context was last updated.
When the context expires; null means it does not expire. Not yet implemented — the server always returns null and performs no TTL-based cleanup.
Was this page helpful?