curl --request PATCH \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tags": [
"authentication",
"security",
"api",
"sessions",
"updated"
]
}
'{
"id": "ctx_abc123def456",
"organizationId": "org_xyz789uvw012",
"question": "How do we handle user authentication in our application?",
"answer": "Updated: We use a hybrid authentication system supporting both API keys and session-based authentication with OAuth2 support.",
"tags": [
"authentication",
"security",
"api",
"sessions",
"oauth2"
],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T15:45:00.000Z",
"authType": "apikey"
}{
"message": [
"tags must be an array of strings"
],
"error": "Bad Request",
"statusCode": 400
}{
"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
Update organization context | Comp AI API
Update an organization context entry so approved business details stay current for evidence and questionnaire automation.
PATCH
/
v1
/
context
/
{id}
curl --request PATCH \
--url https://api.trycomp.ai/v1/context/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"tags": [
"authentication",
"security",
"api",
"sessions",
"updated"
]
}
'{
"id": "ctx_abc123def456",
"organizationId": "org_xyz789uvw012",
"question": "How do we handle user authentication in our application?",
"answer": "Updated: We use a hybrid authentication system supporting both API keys and session-based authentication with OAuth2 support.",
"tags": [
"authentication",
"security",
"api",
"sessions",
"oauth2"
],
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T15:45:00.000Z",
"authType": "apikey"
}{
"message": [
"tags must be an array of strings"
],
"error": "Bad Request",
"statusCode": 400
}{
"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"
Body
application/json
Partial context entry data to update
The question or topic this context entry addresses
Example:
"How do we handle user authentication in our application?"
The answer or detailed explanation for the question
Example:
"We use a hybrid authentication system supporting both API keys and session-based authentication. API keys are used for programmatic access while sessions are used for web interface interactions."
Tags to categorize and help search this context entry
Example:
[
"authentication",
"security",
"api",
"sessions"
]
Response
Context entry updated successfully
Was this page helpful?

