> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add context to workspace

> Add arbitrary context through unstructured text. This endpoint allows you to provide contextual information about (new or existing) people or companies. Returns an artifact_id that can be used to retrieve the processing results via GET /v1/context/artifacts/{artifact_id}.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/context/text
openapi: 3.0.0
info:
  description: >-
    REST API for accessing and managing your Nex data. Generate API keys from
    the Nex web UI and use them to authenticate requests.
  title: Nex Developer API
  contact: {}
  version: '1.0'
servers:
  - url: https://app.nex.ai/api/developers
security: []
paths:
  /v1/context/text:
    post:
      tags:
        - Context
      summary: Add context to workspace
      description: >-
        Add arbitrary context through unstructured text. This endpoint allows
        you to provide contextual information about (new or existing) people or
        companies. Returns an artifact_id that can be used to retrieve the
        processing results via GET /v1/context/artifacts/{artifact_id}.
      operationId: addContext
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/developer.AddContextTextRequest'
        description: Context text to add
        required: true
      responses:
        '200':
          description: >-
            Context processing initiated, returns artifact_id for retrieving
            results
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/developer.AddContextTextResponse'
        '400':
          description: Bad request - Invalid data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/httpx.APIError'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    developer.AddContextTextRequest:
      type: object
      required:
        - content
      properties:
        content:
          type: string
          description: >-
            The unstructured text containing context information about people,
            companies, or other entities
        context:
          type: string
          description: >-
            Optional additional context about the content (e.g., source, type of
            activity)
      example:
        content: 'Marcus Rodriguez commented: "Would love to book a demo"'
        context: New LinkedIn activity
    developer.AddContextTextResponse:
      type: object
      properties:
        artifact_id:
          type: integer
          description: >-
            Unique identifier for the processing artifact. Use this ID to
            retrieve results via GET /v1/context/artifacts/{artifact_id}
      example:
        artifact_id: 32710180831586560
    httpx.APIError:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: 'API key for authentication (format: "Bearer YOUR_API_KEY")'
      type: apiKey
      name: Authorization
      in: header

````