Get organization context
curl --request GET \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/context/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/context/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012",
"statusCode": 404
}{
"message": "Internal server error",
"statusCode": 500
}Context
Get organization context | Comp AI API
Retrieve one organization context entry with source details and approved content for compliance automation workflows.
GET
/
v1
/
context
/
{id}
Get organization context
curl --request GET \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trycomp.ai/v1/context/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trycomp.ai/v1/context/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"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"
}{
"message": "Unauthorized",
"statusCode": 401
}{
"message": "Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012",
"statusCode": 404
}{
"message": "Internal server error",
"statusCode": 500
}Authorizations
API key for authentication
Path Parameters
Context entry ID
Example:
"ctx_abc123def456"
Response
Context entry retrieved successfully
Was this page helpful?

