GET
/
v1
/
context
/
{id}
Get context entry by ID
curl --request GET \
  --url https://api.trycomp.ai/v1/context/{id} \
  --header 'X-API-Key: <api-key>'
{
  "id": "ctx_abc123def456",
  "organizationId": "org_xyz789uvw012",
  "question": "How do we handle user authentication in our application?",
  "answer": "We use a hybrid authentication system supporting both API keys and session-based authentication.",
  "tags": [
    "authentication",
    "security",
    "api",
    "sessions"
  ],
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T14:20:00.000Z",
  "authType": "apikey"
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Organization-Id
string

Organization ID (required for session auth, optional for API key auth)

Path Parameters

id
string
required

Context entry ID

Example:

"ctx_abc123def456"

Response

Context entry retrieved successfully

id
string
Example:

"ctx_abc123def456"

organizationId
string
Example:

"org_xyz789uvw012"

question
string
answer
string
tags
string[]
Example:
["authentication", "security"]
createdAt
string<date-time>
updatedAt
string<date-time>
authType
enum<string>
Available options:
api-key,
session