Comp AI Context API

Manage organization context that helps Comp AI tailor policies, assessments, and compliance automation to the business.

Operations 5

GET /v1/context List organization context #
POST /v1/context Create a new context entry #
GET /v1/context/{id} Get organization context #
PATCH /v1/context/{id} Update organization context #
DELETE /v1/context/{id} Delete context entry #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/comp-ai:comp-ai-context-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

comp-ai-context-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Comp AI Context API
  description: Compliance automation API for SOC 2, ISO 27001, HIPAA, GDPR, evidence collection, policy workflows, Trust Access, security questionnaires, integrations, cloud checks, and device compliance.
  version: '1.0'
  contact: {}
servers:
- url: https://api.trycomp.ai
  description: Production API Server
tags:
- name: Context
  description: Manage organization context that helps Comp AI tailor policies, assessments, and compliance automation to the business.
paths:
  /v1/context:
    get:
      description: List organization context entries used as approved source material for evidence, questionnaires, policies, and AI workflows.
      operationId: ContextController_getAllContext_v1
      parameters:
      - name: search
        required: false
        in: query
        description: Search by question text
        schema:
          type: string
      - name: page
        required: false
        in: query
        description: Page number (1-based)
        schema:
          type: string
      - name: perPage
        required: false
        in: query
        description: Items per page
        schema:
          type: string
      responses:
        '200':
          description: Context entries retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        organizationId:
                          type: string
                        question:
                          type: string
                        answer:
                          type: string
                        tags:
                          type: array
                          items:
                            type: string
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                  count:
                    type: number
                  authType:
                    type: string
                    enum:
                    - api-key
                    - session
              example:
                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
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 401
              example:
                message: Unauthorized
                statusCode: 401
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 404
              example:
                message: Organization not found
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 500
              example:
                message: Internal server error
                statusCode: 500
      security:
      - apikey: []
      summary: List organization context
      tags:
      - Context
      x-mint:
        metadata:
          title: List organization context | Comp AI API
          sidebarTitle: List organization context
          description: List organization context entries used as approved source material for evidence, questionnaires, policies, and AI workflows.
          og:title: List organization context | Comp AI API
          og:description: List organization context entries used as approved source material for evidence, questionnaires, policies, and AI workflows.
      x-speakeasy-mcp:
        name: get-all-context
    post:
      description: Creates a new context entry for the authenticated organization. All required fields must be provided.
      operationId: ContextController_createContext_v1
      parameters: []
      requestBody:
        required: true
        description: Context entry data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateContextDto'
            examples:
              Authentication Context:
                value:
                  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. API keys are used for programmatic access while sessions are used for web interface interactions.
                  tags:
                  - authentication
                  - security
                  - api
                  - sessions
              Database Context:
                value:
                  question: What database do we use and why?
                  answer: We use PostgreSQL as our primary database with Prisma as the ORM. PostgreSQL provides excellent performance, ACID compliance, and supports advanced features like JSON columns and full-text search.
                  tags:
                  - database
                  - postgresql
                  - prisma
                  - architecture
      responses:
        '201':
          description: Context entry created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  organizationId:
                    type: string
                  question:
                    type: string
                  answer:
                    type: string
                  tags:
                    type: array
                    items:
                      type: string
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  authType:
                    type: string
                    enum:
                    - api-key
                    - session
              example:
                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-15T10:30:00.000Z'
                authType: apikey
        '400':
          description: Bad request - Invalid input data
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: array
                    items:
                      type: string
                  error:
                    type: string
                  statusCode:
                    type: number
              example:
                message:
                - question should not be empty
                - answer should not be empty
                error: Bad Request
                statusCode: 400
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 401
              example:
                message: Unauthorized
                statusCode: 401
        '404':
          description: Organization not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 404
              example:
                message: Organization not found
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 500
              example:
                message: Internal server error
                statusCode: 500
      security:
      - apikey: []
      summary: Create a new context entry
      tags:
      - Context
      x-mint:
        metadata:
          title: Create a new context entry | Comp AI API
          sidebarTitle: Create a new context entry
          description: Creates a new context entry for the authenticated organization. All required fields must be provided.
          og:title: Create a new context entry | Comp AI API
          og:description: Creates a new context entry for the authenticated organization. All required fields must be provided.
      x-speakeasy-mcp:
        name: create-context
  /v1/context/{id}:
    get:
      description: Retrieve one organization context entry with source details and approved content for compliance automation workflows.
      operationId: ContextController_getContextById_v1
      parameters:
      - name: id
        required: true
        in: path
        description: Context entry ID
        schema:
          example: ctx_abc123def456
          type: string
      responses:
        '200':
          description: Context entry retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: ctx_abc123def456
                  organizationId:
                    type: string
                    example: org_xyz789uvw012
                  question:
                    type: string
                  answer:
                    type: string
                  tags:
                    type: array
                    items:
                      type: string
                    example:
                    - authentication
                    - security
                  createdAt:
                    type: string
                    format: date-time
                  updatedAt:
                    type: string
                    format: date-time
                  authType:
                    type: string
                    enum:
                    - api-key
                    - session
              example:
                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
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
                  statusCode:
                    type: number
                    example: 401
              example:
                message: Unauthorized
                statusCode: 401
        '404':
          description: Context entry not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 404
              example:
                message: Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 500
              example:
                message: Internal server error
                statusCode: 500
      security:
      - apikey: []
      summary: Get organization context
      tags:
      - Context
      x-mint:
        metadata:
          title: Get organization context | Comp AI API
          sidebarTitle: Get organization context
          description: Retrieve one organization context entry with source details and approved content for compliance automation workflows.
          og:title: Get organization context | Comp AI API
          og:description: Retrieve one organization context entry with source details and approved content for compliance automation workflows.
      x-speakeasy-mcp:
        name: get-context-by-id
    patch:
      description: Update an organization context entry so approved business details stay current for evidence and questionnaire automation.
      operationId: ContextController_updateContext_v1
      parameters:
      - name: id
        required: true
        in: path
        description: Context entry ID
        schema:
          example: ctx_abc123def456
          type: string
      requestBody:
        required: true
        description: Partial context entry data to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContextDto'
            examples:
              Update Tags:
                value:
                  tags:
                  - authentication
                  - security
                  - api
                  - sessions
                  - updated
              Update Answer:
                value:
                  answer: 'Updated: We use a hybrid authentication system supporting both API keys and session-based authentication. Recent updates include support for OAuth2 providers.'
      responses:
        '200':
          description: Context entry updated successfully
          content:
            application/json:
              example:
                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
        '400':
          description: Bad request - Invalid input data
          content:
            application/json:
              example:
                message:
                - tags must be an array of strings
                error: Bad Request
                statusCode: 400
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              example:
                message: Unauthorized
                statusCode: 401
        '404':
          description: Context entry not found
          content:
            application/json:
              example:
                message: Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              example:
                message: Internal server error
                statusCode: 500
      security:
      - apikey: []
      summary: Update organization context
      tags:
      - Context
      x-mint:
        metadata:
          title: Update organization context | Comp AI API
          sidebarTitle: Update organization context
          description: Update an organization context entry so approved business details stay current for evidence and questionnaire automation.
          og:title: Update organization context | Comp AI API
          og:description: Update an organization context entry so approved business details stay current for evidence and questionnaire automation.
      x-speakeasy-mcp:
        name: update-context
    delete:
      description: Permanently removes a context entry from the organization. This action cannot be undone.
      operationId: ContextController_deleteContext_v1
      parameters:
      - name: id
        required: true
        in: path
        description: Context entry ID
        schema:
          example: ctx_abc123def456
          type: string
      responses:
        '200':
          description: Context entry deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  deletedContext:
                    type: object
                    properties:
                      id:
                        type: string
                      question:
                        type: string
                  authType:
                    type: string
                    enum:
                    - api-key
                    - session
              example:
                message: Context entry deleted successfully
                deletedContext:
                  id: ctx_abc123def456
                  question: How do we handle user authentication in our application?
                authType: apikey
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 401
              example:
                message: Unauthorized
                statusCode: 401
        '404':
          description: Context entry not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 404
              example:
                message: Context entry with ID ctx_abc123def456 not found in organization org_xyz789uvw012
                statusCode: 404
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  statusCode:
                    type: number
                    example: 500
              example:
                message: Internal server error
                statusCode: 500
      security:
      - apikey: []
      summary: Delete context entry
      tags:
      - Context
      x-mint:
        metadata:
          title: Delete context entry | Comp AI API
          sidebarTitle: Delete context entry
          description: Permanently removes a context entry from the organization. This action cannot be undone.
          og:title: Delete context entry | Comp AI API
          og:description: Permanently removes a context entry from the organization. This action cannot be undone.
      x-speakeasy-mcp:
        name: delete-context
components:
  schemas:
    UpdateContextDto:
      type: object
      properties:
        question:
          type: string
          description: The question or topic this context entry addresses
          example: How do we handle user authentication in our application?
        answer:
          type: string
          description: 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:
          description: Tags to categorize and help search this context entry
          example:
          - authentication
          - security
          - api
          - sessions
          type: array
          items:
            type: string
    CreateContextDto:
      type: object
      properties:
        question:
          type: string
          description: The question or topic this context entry addresses
          example: How do we handle user authentication in our application?
        answer:
          type: string
          description: 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:
          description: Tags to categorize and help search this context entry
          example:
          - authentication
          - security
          - api
          - sessions
          type: array
          items:
            type: string
      required:
      - question
      - answer
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication
x-speakeasy-timeout: 120000