GET
/
v1
/
context
Get all context entries
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"
}

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)

Response

Context entries retrieved successfully

data
object[]
count
number
authType
enum<string>
Available options:
api-key,
session