Authorizations
API key for authentication
Headers
Organization ID (required for session auth, optional for API key auth)
curl --request GET \
--url https://api.trycomp.ai/v1/context \
--header 'X-API-Key: <api-key>'{
"data": [
{
"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"
},
{
"id": "ctx_ghi789jkl012",
"organizationId": "org_xyz789uvw012",
"question": "What database do we use and why?",
"answer": "We use PostgreSQL as our primary database with Prisma as the ORM.",
"tags": [
"database",
"postgresql",
"prisma",
"architecture"
],
"createdAt": "2024-01-14T09:15:00.000Z",
"updatedAt": "2024-01-14T09:15:00.000Z"
}
],
"count": 2,
"authType": "apikey"
}Returns all context entries for the authenticated organization. Supports both API key authentication (X-API-Key header) and session authentication (cookies + X-Organization-Id header).
curl --request GET \
--url https://api.trycomp.ai/v1/context \
--header 'X-API-Key: <api-key>'{
"data": [
{
"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"
},
{
"id": "ctx_ghi789jkl012",
"organizationId": "org_xyz789uvw012",
"question": "What database do we use and why?",
"answer": "We use PostgreSQL as our primary database with Prisma as the ORM.",
"tags": [
"database",
"postgresql",
"prisma",
"architecture"
],
"createdAt": "2024-01-14T09:15:00.000Z",
"updatedAt": "2024-01-14T09:15:00.000Z"
}
],
"count": 2,
"authType": "apikey"
}API key for authentication
Organization ID (required for session auth, optional for API key auth)
Was this page helpful?