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

# Create a new context



## OpenAPI

````yaml /deploy/api/openapi.json post /api/v1/appuid/{appUid}/contexts
openapi: 3.0.1
info:
  title: Mindset API Gateway
  version: 1.2.0
servers:
  - url: https://a.api.mindset.ai
  - url: https://b.api.mindset.ai
  - url: https://c.api.mindset.ai
  - url: https://d.api.mindset.ai
security: []
tags:
  - name: Agent Configuration
  - name: Agent Sessions
  - name: AppStatus
  - name: Context Files
  - name: Contexts
  - name: DynamicComponents
  - name: Labels
  - name: SDK Users
  - name: Threads
  - name: Webhooks
  - name: Agent Management (deprecated)
paths:
  /api/v1/appuid/{appUid}/contexts:
    post:
      tags:
        - Contexts
      summary: Create a new context
      operationId: createContext
      parameters:
        - name: appUid
          in: path
          description: Your application's uid
          required: true
          schema:
            minLength: 1
            type: string
      requestBody:
        content:
          application/json:
            schema:
              required:
                - name
              type: object
              properties:
                name:
                  maxLength: 100
                  minLength: 1
                  type: string
                  description: Name of the context
                description:
                  maxLength: 100
                  type: string
                  description: Description of the context
                externalId:
                  type: string
                  description: Optional External ID of the context
                externalTenantId:
                  type: string
                  description: >-
                    External tenant identifier (optional, immutable after
                    creation)
                isSynced:
                  type: boolean
                  description: Is the context synced
        required: true
      responses:
        '201':
          description: Context created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  uid:
                    type: string
                    description: Unique ID of the context
                  name:
                    type: string
                  description:
                    type: string
                  externalId:
                    type: string
                    description: Optional External ID of the context
                  createdAt:
                    type: string
                    description: Creation timestamp (ISO 8601)
                    format: date-time
                  isSynced:
                    type: boolean
                    description: Is the context synced
                  externalTenantId:
                    type: string
                    description: External tenant identifier
        '400':
          description: Bad Request
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '403':
          description: Forbidden
          content: {}
        '422':
          description: Unprocessable Entity
          content: {}
        '500':
          description: Internal Server Error
          content: {}
      security:
        - APIKeyHeader: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      name: x-api-key
      in: header

````