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

# Create a link context item

> Invokes the Tavily access Lambda to extract content from the supplied URL (single-page) or crawl up to `pageLimit` pages when `isCrawl` is true. The extracted markdown is stored in tenant S3; only metadata is kept on the context_items row.

**Requires:** `context:write`



## OpenAPI

````yaml https://api.getmodus.com/openapi.json post /api/v1/context/links
openapi: 3.0.3
info:
  title: Modus Public API
  version: 1.0.0
servers: []
security:
  - bearerAuth: []
tags:
  - name: Scopes
    description: Create, configure, deploy, and manage scopes.
  - name: Scopes · Conversations
    description: Read scope conversation threads.
  - name: Scopes · Supervision
    description: Scope supervision sub-resource.
  - name: Scopes · Memories
    description: Long-term memory stored per scope.
  - name: Scopes · Chat
    description: Chat with a published scope.
  - name: Scopes · Context
    description: Compose a scope’s context without an LLM call.
  - name: Modus · Chat
    description: Chat with Modus — your org-wide assistant.
  - name: Modus · Conversations
    description: Read Modus and cross-scope conversation threads.
  - name: Modus · Context
    description: Compose full-environment context without an LLM call.
  - name: Workflows
    description: Create, configure, deploy, and manage workflows.
  - name: Workflows · Runs
    description: Inspect workflow run history.
  - name: Workflows · Interfaces
    description: Slack / MCP / Teams interface management.
  - name: Connections
    description: Read connected integrations.
  - name: Tools
    description: Catalog of tools/integrations a scope can select in its toolset.
  - name: Suggestions
    description: Approved suggested questions and first-party suggestion usage events.
  - name: Context
    description: Create and manage organization context items.
  - name: Usage
    description: Organization LLM usage reporting.
  - name: Users
    description: Organization and membership management.
  - name: Runs · Streaming
    description: 'Run lifecycle: stream, poll, resume, interrupt, and cancel executions.'
  - name: Scopes · Runs
    description: Run a published or draft scope.
  - name: Modus · Runs
    description: Run the Modus home agent.
paths:
  /api/v1/context/links:
    post:
      tags:
        - Context
      summary: Create a link context item
      description: >-
        Invokes the Tavily access Lambda to extract content from the supplied
        URL (single-page) or crawl up to `pageLimit` pages when `isCrawl` is
        true. The extracted markdown is stored in tenant S3; only metadata is
        kept on the context_items row.


        **Requires:** `context:write`
      operationId: ContextCreatorsController_createLink
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLinkDto'
            examples:
              singlePage:
                value:
                  url: https://example.com/blog/post
              crawl:
                value:
                  url: https://example.com
                  isCrawl: true
                  pageLimit: 25
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatedContextItemResponseDto'
        '400':
          description: >-
            Malformed request — invalid query parameters or request body (`code:
            BAD_REQUEST`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: BAD_REQUEST
                  status: INVALID_ARGUMENT
                  message: Invalid value for query parameter `pageSize`.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        '401':
          description: 'Missing, invalid, or expired access token (`code: UNAUTHORIZED`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: UNAUTHORIZED
                  status: UNAUTHENTICATED
                  message: Missing or invalid access token.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        '403':
          description: >-
            Authenticated, but the token lacks a required scope (`code:
            FORBIDDEN`). The missing scopes are listed in `info`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: FORBIDDEN
                  status: PERMISSION_DENIED
                  message: Missing required scope(s) for this operation.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
                  info:
                    missing:
                      - <required-scope>
        '404':
          description: >-
            The resource does not exist, or you do not have access to it (`code:
            NOT_FOUND`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: NOT_FOUND
                  status: NOT_FOUND
                  message: Resource not found.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        '409':
          description: >-
            The request conflicts with the current state of the resource, e.g. a
            duplicate (`code: CONFLICT`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: CONFLICT
                  status: ALREADY_EXISTS
                  message: A resource with that identifier already exists.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        '422':
          description: >-
            The request was well-formed but failed a business rule (`code:
            VALIDATION`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: VALIDATION
                  status: INVALID_ARGUMENT
                  message: Updates that would revoke your own access are not allowed.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        '500':
          description: 'An unexpected server error occurred (`code: INTERNAL_ERROR`).'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
              example:
                error:
                  code: INTERNAL_ERROR
                  status: INTERNAL
                  message: An unexpected error occurred.
                  requestId: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
      security:
        - bearerAuth: []
      servers:
        - url: https://api.getmodus.com
components:
  schemas:
    CreateLinkDto:
      type: object
      properties:
        url:
          type: string
          description: URL to extract content from. Invoked via Tavily.
          example: https://example.com/blog/post
        title:
          type: string
          description: >-
            Optional title override. When omitted, Tavily-derived metadata or
            the URL hostname is used.
          example: Example blog post
        isCrawl:
          type: boolean
          description: When true, crawls multiple pages starting from the supplied URL.
          example: false
          default: false
        pageLimit:
          type: number
          description: >-
            Maximum number of pages to crawl when `isCrawl` is true. Ignored
            otherwise.
          minimum: 1
          maximum: 200
          example: 10
        access:
          $ref: '#/components/schemas/AccessPolicyDto'
      required:
        - url
    CreatedContextItemResponseDto:
      type: object
      properties:
        contextItemId:
          type: string
          description: >-
            UUID of the newly-created context item. Use it on subsequent GET /
            PATCH / DELETE calls.
          example: 7a3f9d2c-1111-4000-a000-000000000abc
        kind:
          description: Kind of context item created.
          example: note
          allOf:
            - $ref: '#/components/schemas/ContextItemKind'
        s3Key:
          type: string
          description: >-
            Tenant S3 key for the raw content blob (notes, saved queries,
            links). Null for kinds without S3 backing.
          nullable: true
          example: context_notes/7a3f9d2c.../Q3_churn_analysis.md
        title:
          type: string
          description: >-
            Resolved title for the created item. Null for kinds without a title
            field.
          nullable: true
          example: Q3 churn analysis
      required:
        - contextItemId
        - kind
    ErrorResponseDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorEnvelopeDto'
      required:
        - error
    AccessPolicyDto:
      type: object
      properties:
        scope:
          type: string
          enum:
            - all
            - groups
            - users
          default: all
          description: Visibility mode. Defaults to org-wide ("all") when omitted.
        groupIds:
          description: Member group uuids granted access. Required when scope is "groups".
          type: array
          items:
            type: string
        userIds:
          description: Clerk user ids granted access. Required when scope is "users".
          type: array
          items:
            type: string
    ContextItemKind:
      type: string
      enum:
        - note
        - saved_query
        - link
      description: Kind of context item created.
    ErrorEnvelopeDto:
      type: object
      properties:
        code:
          description: Modus-specific machine code.
          allOf:
            - $ref: '#/components/schemas/ApiErrorCode'
        status:
          description: Canonical status string for the error.
          allOf:
            - $ref: '#/components/schemas/ApiErrorStatus'
        message:
          type: string
          example: Skill was not found or you lack permission.
        requestId:
          type: string
          example: req_01HQ7K8ABCDEFGHIJKLMNOPQRS
        info:
          type: object
          description: >-
            Optional domain-specific context. Shape varies per endpoint — see
            the operation's error response examples.
          additionalProperties: true
          example:
            skillId: sk_abc123
      required:
        - code
        - status
        - message
        - requestId
    ApiErrorCode:
      type: string
      enum:
        - VALIDATION
        - BAD_REQUEST
        - UNAUTHORIZED
        - FORBIDDEN
        - NOT_FOUND
        - CONFLICT
        - RATE_LIMITED
        - INTERNAL_ERROR
      description: Modus-specific machine code.
    ApiErrorStatus:
      type: string
      enum:
        - INVALID_ARGUMENT
        - UNAUTHENTICATED
        - PERMISSION_DENIED
        - NOT_FOUND
        - ALREADY_EXISTS
        - RESOURCE_EXHAUSTED
        - INTERNAL
      description: Canonical status string for the error.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      bearerFormat: Modus PAT (modus_<orgUuid>_<prefix>_<secret>) or OAuth 2.1 access token
      type: http
      description: >-
        A Modus personal access token (`modus_<orgUuid>_<prefix>_<secret>`) or
        an OAuth 2.1 access token, sent as `Authorization: Bearer <token>`.

````